2023-05-24 14:43:51

by kernel test robot

[permalink] [raw]
Subject: vmlinux.o: warning: objtool: xen_sched_clock+0x4a: call to ftrace_likely_update() leaves .noinstr.text section

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9d646009f65d62d32815f376465a3b92d8d9b046
commit: 8739c6811572b087decd561f96382087402cc343 sched/clock/x86: Mark sched_clock() noinstr
date: 4 months ago
config: x86_64-randconfig-a002-20230524
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8739c6811572b087decd561f96382087402cc343
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8739c6811572b087decd561f96382087402cc343
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

vmlinux.o: warning: objtool: ibt_selftest+0x11: sibling call from callable instruction with modified stack frame
vmlinux.o: warning: objtool: __asan_memset+0x3b: call to __memset() with UACCESS enabled
vmlinux.o: warning: objtool: __asan_memmove+0x4d: call to __memmove() with UACCESS enabled
vmlinux.o: warning: objtool: __asan_memcpy+0x4d: call to __memcpy() with UACCESS enabled
>> vmlinux.o: warning: objtool: xen_sched_clock+0x4a: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: __rdgsbase_inactive+0x26: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: __wrgsbase_inactive+0x2a: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: fixup_bad_iret+0x7f: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: noist_exc_debug+0x45: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: exc_nmi+0x3a: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: poke_int3_handler+0x36: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: native_sched_clock+0x8c: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: mce_check_crashing_cpu+0x30: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: mce_start+0x6d: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: do_machine_check+0x57: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: exc_machine_check+0x58: call to ftrace_likely_update() leaves .noinstr.text section
>> vmlinux.o: warning: objtool: kvm_clock_read+0x3b: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: pvclock_clocksource_read_nowd+0x82: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_nmi_enter+0x53: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_nmi_exit+0x4b: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: enter_from_user_mode+0x38: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_enter_from_user_mode+0x3d: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare+0x38: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_enter_from_user_mode+0x38: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_exit+0x32: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: ct_kernel_exit_state+0x27: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: ct_kernel_enter_state+0x27: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: ct_kernel_enter.constprop.0+0x2b: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: ct_kernel_exit.constprop.0+0x49: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: ct_idle_enter+0x18: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: ct_nmi_enter+0x40: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: ct_irq_enter+0x2a: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: ct_irq_exit+0x2a: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: mwait_idle+0x33: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: acpi_processor_ffh_cstate_enter+0xfb: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: acpi_idle_enter_s2idle+0x85: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: acpi_idle_enter+0x65: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: ibt_selftest+0x1e: return with modified stack frame


objdump-func vmlinux.o xen_sched_clock:
0000 0000000000001390 <xen_sched_clock>:
0000 1390: f3 0f 1e fa endbr64
0004 1394: 55 push %rbp
0005 1395: 48 89 e5 mov %rsp,%rbp
0008 1398: 41 54 push %r12
000a 139a: 53 push %rbx
000b 139b: 65 ff 05 00 00 00 00 incl %gs:0x0(%rip) # 13a2 <xen_sched_clock+0x12> 139e: R_X86_64_PC32 pcpu_hot+0x4
0012 13a2: 65 48 8b 3d 00 00 00 00 mov %gs:0x0(%rip),%rdi # 13aa <xen_sched_clock+0x1a> 13a6: R_X86_64_PC32 xen_vcpu-0x4
001a 13aa: 48 83 c7 20 add $0x20,%rdi
001e 13ae: e8 00 00 00 00 call 13b3 <xen_sched_clock+0x23> 13af: R_X86_64_PLT32 pvclock_clocksource_read_nowd-0x4
0023 13b3: 48 2b 05 00 00 00 00 sub 0x0(%rip),%rax # 13ba <xen_sched_clock+0x2a> 13b6: R_X86_64_PC32 .data..read_mostly+0x654
002a 13ba: 49 89 c4 mov %rax,%r12
002d 13bd: 65 ff 0d 00 00 00 00 decl %gs:0x0(%rip) # 13c4 <xen_sched_clock+0x34> 13c0: R_X86_64_PC32 pcpu_hot+0x4
0034 13c4: 40 0f 94 c6 sete %sil
0038 13c8: 0f 94 c3 sete %bl
003b 13cb: 48 c7 c7 00 00 00 00 mov $0x0,%rdi 13ce: R_X86_64_32S _ftrace_annotated_branch+0x2100
0042 13d2: 31 c9 xor %ecx,%ecx
0044 13d4: 31 d2 xor %edx,%edx
0046 13d6: 40 0f b6 f6 movzbl %sil,%esi
004a 13da: e8 00 00 00 00 call 13df <xen_sched_clock+0x4f> 13db: R_X86_64_PLT32 ftrace_likely_update-0x4
004f 13df: 84 db test %bl,%bl
0051 13e1: 75 0c jne 13ef <xen_sched_clock+0x5f>
0053 13e3: 4c 89 e0 mov %r12,%rax
0056 13e6: 5b pop %rbx
0057 13e7: 41 5c pop %r12
0059 13e9: 5d pop %rbp
005a 13ea: e9 00 00 00 00 jmp 13ef <xen_sched_clock+0x5f> 13eb: R_X86_64_PLT32 __x86_return_thunk-0x4
005f 13ef: e8 00 00 00 00 call 13f4 <xen_sched_clock+0x64> 13f0: R_X86_64_PLT32 __SCT__preempt_schedule_notrace-0x4
0064 13f4: 4c 89 e0 mov %r12,%rax
0067 13f7: 5b pop %rbx
0068 13f8: 41 5c pop %r12
006a 13fa: 5d pop %rbp
006b 13fb: e9 00 00 00 00 jmp 1400 <sysvec_xen_hvm_callback> 13fc: R_X86_64_PLT32 __x86_return_thunk-0x4

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


Attachments:
(No filename) (7.94 kB)
config (156.88 kB)
Download all attachments

2023-05-24 14:49:09

by Peter Zijlstra

[permalink] [raw]
Subject: Re: vmlinux.o: warning: objtool: xen_sched_clock+0x4a: call to ftrace_likely_update() leaves .noinstr.text section

On Wed, May 24, 2023 at 10:22:42PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 9d646009f65d62d32815f376465a3b92d8d9b046
> commit: 8739c6811572b087decd561f96382087402cc343 sched/clock/x86: Mark sched_clock() noinstr
> date: 4 months ago
> config: x86_64-randconfig-a002-20230524
> compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
> reproduce (this is a W=1 build):
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8739c6811572b087decd561f96382087402cc343
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 8739c6811572b087decd561f96382087402cc343
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> make W=1 O=build_dir ARCH=x86_64 olddefconfig
> make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <[email protected]>
> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
>
> All warnings (new ones prefixed by >>):
>
> vmlinux.o: warning: objtool: ibt_selftest+0x11: sibling call from callable instruction with modified stack frame
> vmlinux.o: warning: objtool: __asan_memset+0x3b: call to __memset() with UACCESS enabled
> vmlinux.o: warning: objtool: __asan_memmove+0x4d: call to __memmove() with UACCESS enabled
> vmlinux.o: warning: objtool: __asan_memcpy+0x4d: call to __memcpy() with UACCESS enabled
> >> vmlinux.o: warning: objtool: xen_sched_clock+0x4a: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: __rdgsbase_inactive+0x26: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: __wrgsbase_inactive+0x2a: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: fixup_bad_iret+0x7f: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: noist_exc_debug+0x45: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: exc_nmi+0x3a: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: poke_int3_handler+0x36: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: native_sched_clock+0x8c: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: mce_check_crashing_cpu+0x30: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: mce_start+0x6d: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: do_machine_check+0x57: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: exc_machine_check+0x58: call to ftrace_likely_update() leaves .noinstr.text section
> >> vmlinux.o: warning: objtool: kvm_clock_read+0x3b: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: pvclock_clocksource_read_nowd+0x82: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: irqentry_nmi_enter+0x53: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: irqentry_nmi_exit+0x4b: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: enter_from_user_mode+0x38: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: syscall_enter_from_user_mode+0x3d: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare+0x38: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: irqentry_enter_from_user_mode+0x38: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: irqentry_exit+0x32: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: ct_kernel_exit_state+0x27: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: ct_kernel_enter_state+0x27: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: ct_kernel_enter.constprop.0+0x2b: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: ct_kernel_exit.constprop.0+0x49: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: ct_idle_enter+0x18: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: ct_nmi_enter+0x40: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: ct_irq_enter+0x2a: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: ct_irq_exit+0x2a: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: mwait_idle+0x33: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: acpi_processor_ffh_cstate_enter+0xfb: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: acpi_idle_enter_s2idle+0x85: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: acpi_idle_enter+0x65: call to ftrace_likely_update() leaves .noinstr.text section
> vmlinux.o: warning: objtool: ibt_selftest+0x1e: return with modified stack frame

Robot folks; could you please discard all:

ftrace_likey_update.*noinstr

warnings, they're -EWONTFIX.

2023-05-24 21:13:38

by Josh Poimboeuf

[permalink] [raw]
Subject: Re: vmlinux.o: warning: objtool: xen_sched_clock+0x4a: call to ftrace_likely_update() leaves .noinstr.text section

On Wed, May 24, 2023 at 04:29:54PM +0200, Peter Zijlstra wrote:
> > vmlinux.o: warning: objtool: acpi_idle_enter+0x65: call to ftrace_likely_update() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: ibt_selftest+0x1e: return with modified stack frame
>
> Robot folks; could you please discard all:
>
> ftrace_likey_update.*noinstr
>
> warnings, they're -EWONTFIX.

Could we just make CONFIG_TRACE_BRANCH_PROFILING incompatible with
CONFIG_NOINSTR_VALIDATION?

--
Josh