Skip to contentSkip to conversation

vmlinux.o: warning: objtool: __do_fast_syscall_32()+0x98: call to trace_hardirqs_off() leaves .noinstr.text section

PATCH In review kernel test robot 3 participants 5 messages Jun 29, 2021 – Jul 8, 2021

Subsystems (3)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y
head:   3de043c6851d7c604e0cabdf8e2aca7797952aa9
commit: e40384fcd6005bf887c5e31c6e8c408c0e55aad2 [3202/6129] x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls
config: x86_64-buildonly-randconfig-r002-20210629 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=e40384fcd6005bf887c5e31c6e8c408c0e55aad2
        git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
        git fetch --no-tags stable linux-5.10.y
        git checkout e40384fcd6005bf887c5e31c6e8c408c0e55aad2
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate

All warnings (new ones prefixed by >>):

>> vmlinux.o: warning: objtool: __do_fast_syscall_32()+0x98: call to trace_hardirqs_off() leaves .noinstr.text section

vmlinux.o: warning: objtool: match_held_lock()+0x10a: call to rcu_read_lock_any_held() leaves .noinstr.text section

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#1 lore raw

PATCH 1/1 x86/entry: Fix noinstr violation

The recent commit which fixed the entry/exit mismatch on failed 32-bit syscalls got the ordering vs. instrumentation_end() wrong, which makes objtool complain about tracer invocation in an instrumentation disabled region.

Stick the offending local_irq_disable() into the instrumentation enabled region so objtool stops complaining.

Fixes 5d5675df792f ("x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls")
Cc stable(a)vger.kernel.org
---
 arch/x86/entry/common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/entry/common.c +1 -1
@@ -130,8 +130,8 @@ static noinstr bool __do_fast_syscall_32
 		/* User code screwed up. */
 		regs->ax = -EFAULT;
 
-		instrumentation_end();
 		local_irq_disable();
+		instrumentation_end();
 		irqentry_exit_to_user_mode(regs);
 		return false;
 	}
#2 lore raw

Re: [PATCH] x86/entry: Fix noinstr violation

Quoted 9 lines · Thomas Gleixner

The recent commit which fixed the entry/exit mismatch on failed 32-bit syscalls got the ordering vs. instrumentation_end() wrong, which makes objtool complain about tracer invocation in an instrumentation disabled region.

Stick the offending local_irq_disable() into the instrumentation enabled region so objtool stops complaining.

Fixes 5d5675df792f ("x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls")

Bah. I looked at the wrong branch. It's fixed already in Linus tree:

commit 240001d4e3041832e8a2654adc3ccf1683132b92

Author: Peter Zijlstra <[email protected]>
Date:   Mon Jun 21 13:12:34 2021 +0200

x86/entry: Fix noinstr fail in __do_fast_syscall_32()

Though that lacks a CC: stable tag, which would have been appropriate because 5d5675df792f ("x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls") has been backported.

Can the stable folks pick this up please?

Thanks,

tglx

#3 lore raw

Re: [PATCH] x86/entry: Fix noinstr violation

Quoted 17 lines · Thomas Gleixner
Quoted 9 lines · Thomas Gleixner

The recent commit which fixed the entry/exit mismatch on failed 32-bit syscalls got the ordering vs. instrumentation_end() wrong, which makes objtool complain about tracer invocation in an instrumentation disabled region.

Stick the offending local_irq_disable() into the instrumentation enabled region so objtool stops complaining.

Fixes 5d5675df792f ("x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls")

Bah. I looked at the wrong branch. It's fixed already in Linus tree:

commit 240001d4e3041832e8a2654adc3ccf1683132b92

Author: Peter Zijlstra <[email protected]>
Date:   Mon Jun 21 13:12:34 2021 +0200
Quoted 7 lines

x86/entry: Fix noinstr fail in __do_fast_syscall_32()

Though that lacks a CC: stable tag, which would have been appropriate because 5d5675df792f ("x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls") has been backported.

Can the stable folks pick this up please?

It's already in 5.10.47 and 5.12.14. Does it need to go further back to older kernels?

thanks,

greg k-h

#4 lore raw

Re: [PATCH] x86/entry: Fix noinstr violation

Quoted 20 lines · Greg Kroah-Hartman
Quoted 19 lines · Thomas Gleixner
Quoted 9 lines · Thomas Gleixner

The recent commit which fixed the entry/exit mismatch on failed 32-bit syscalls got the ordering vs. instrumentation_end() wrong, which makes objtool complain about tracer invocation in an instrumentation disabled region.

Stick the offending local_irq_disable() into the instrumentation enabled region so objtool stops complaining.

Fixes 5d5675df792f ("x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls")

Bah. I looked at the wrong branch. It's fixed already in Linus tree:

commit 240001d4e3041832e8a2654adc3ccf1683132b92

Author: Peter Zijlstra <[email protected]>
Date:   Mon Jun 21 13:12:34 2021 +0200

x86/entry: Fix noinstr fail in __do_fast_syscall_32()

Quoted 8 lines
Quoted 5 lines

Though that lacks a CC: stable tag, which would have been appropriate because 5d5675df792f ("x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls") has been backported.

Can the stable folks pick this up please?

It's already in 5.10.47 and 5.12.14. Does it need to go further back to older kernels?

I was reacting on the syzbot report which was against 5.10.y and completely missed that it had checked out exactly the offending commit.

So if it's already backported, nothing to see. The original commit which got fixed by 5d5675df792f is 0b085e68f407 and that was introduced in 5.9 which is EOL.

Sorry for the noise.

Thanks,

tglx