All of lore.kernel.org
 help / color / mirror / Atom feed
* [jpoimboe:static-key-noinstr] [objtool]  51fd13276d: kernel_BUG_at_arch/x86/kernel/jump_label.c
@ 2024-12-03  7:59 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-03  7:59 UTC (permalink / raw)
  To: Josh Poimboeuf; +Cc: oe-lkp, lkp, oliver.sang



Hello,

kernel test robot noticed "kernel_BUG_at_arch/x86/kernel/jump_label.c" on:

commit: 51fd13276df848dcb320bf7ff423f73364b06266 ("objtool: Add noinstr validation for static branches/calls")
https://git.kernel.org/cgit/linux/kernel/git/jpoimboe/linux.git static-key-noinstr

in testcase: hwsim
version: hwsim-x86_64-4ea2c336d-1_20241103
with following parameters:

	test: group-38



config: x86_64-rhel-9.4-func
compiler: gcc-12
test machine: 8 threads 1 sockets Intel(R) Core(TM) i7-4790 v3 @ 3.60GHz (Haswell) with 6G memory

(please refer to attached dmesg/kmsg for entire log/backtrace)



If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202412031508.3dffad46-lkp@intel.com


[  405.239209][ T5455] ------------[ cut here ]------------
[  405.244523][ T5455] kernel BUG at arch/x86/kernel/jump_label.c:73!
[  405.250709][ T5455] Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
[  405.257496][ T5455] CPU: 4 UID: 0 PID: 5455 Comm: modprobe Tainted: G S                 6.12.0-rc3-00007-g51fd13276df8 #1
[  405.268449][ T5455] Tainted: [S]=CPU_OUT_OF_SPEC
[  405.273060][ T5455] Hardware name: Dell Inc. OptiPlex 9020/03CPWF, BIOS A11 04/01/2015
[ 405.280972][ T5455] RIP: 0010:__jump_label_patch (arch/x86/kernel/jump_label.c:73 (discriminator 1))
[ 405.286629][ T5455] Code: c8 e9 01 fe ff ff 48 c7 c3 00 da f1 86 41 56 45 89 f9 49 89 d8 4c 89 e9 4c 89 ea 4c 89 ee 48 c7 c7 80 72 02 84 e8 a2 b2 32 00 <0f> 0b 0f 0b 0f 0b 48 c7 c7 90 e0 02 84 e8 e0 cb a9 00 e9 6a ff ff
All code
========
   0:	c8 e9 01 fe          	enter  $0x1e9,$0xfe
   4:	ff                   	(bad)
   5:	ff 48 c7             	decl   -0x39(%rax)
   8:	c3                   	ret
   9:	00 da                	add    %bl,%dl
   b:	f1                   	int1
   c:	86 41 56             	xchg   %al,0x56(%rcx)
   f:	45 89 f9             	mov    %r15d,%r9d
  12:	49 89 d8             	mov    %rbx,%r8
  15:	4c 89 e9             	mov    %r13,%rcx
  18:	4c 89 ea             	mov    %r13,%rdx
  1b:	4c 89 ee             	mov    %r13,%rsi
  1e:	48 c7 c7 80 72 02 84 	mov    $0xffffffff84027280,%rdi
  25:	e8 a2 b2 32 00       	call   0x32b2cc
  2a:*	0f 0b                	ud2		<-- trapping instruction
  2c:	0f 0b                	ud2
  2e:	0f 0b                	ud2
  30:	48 c7 c7 90 e0 02 84 	mov    $0xffffffff8402e090,%rdi
  37:	e8 e0 cb a9 00       	call   0xa9cc1c
  3c:	e9                   	.byte 0xe9
  3d:	6a ff                	push   $0xffffffffffffffff
  3f:	ff                   	.byte 0xff

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2
   2:	0f 0b                	ud2
   4:	0f 0b                	ud2
   6:	48 c7 c7 90 e0 02 84 	mov    $0xffffffff8402e090,%rdi
   d:	e8 e0 cb a9 00       	call   0xa9cbf2
  12:	e9                   	.byte 0xe9
  13:	6a ff                	push   $0xffffffffffffffff
  15:	ff                   	.byte 0xff
[  405.306084][ T5455] RSP: 0018:ffffc90008aff428 EFLAGS: 00010246
[  405.312002][ T5455] RAX: 00000000000000a1 RBX: ffffffff8402e101 RCX: ffffffff8234a00a
[  405.319828][ T5455] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff888135835800
[  405.327651][ T5455] RBP: ffffc90008aff468 R08: 0000000000000001 R09: fffff5200115fe3d
[  405.335474][ T5455] R10: ffffc90008aff1ef R11: 00000000000a2128 R12: ffffffff86f1da00
[  405.343298][ T5455] R13: ffffffffc1b89290 R14: 0000000000000001 R15: 0000000000000002
[  405.351122][ T5455] FS:  00007fd3fd158040(0000) GS:ffff888135800000(0000) knlGS:0000000000000000
[  405.359901][ T5455] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  405.366336][ T5455] CR2: 00005609d6a6c6f2 CR3: 000000018cc54003 CR4: 00000000001726f0
[  405.374160][ T5455] Call Trace:
[  405.377297][ T5455]  <TASK>
[ 405.380088][ T5455] ? die (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:434 arch/x86/kernel/dumpstack.c:447)
[ 405.383660][ T5455] ? do_trap (arch/x86/kernel/traps.c:156 arch/x86/kernel/traps.c:197)
[ 405.387753][ T5455] ? __jump_label_patch (arch/x86/kernel/jump_label.c:73 (discriminator 1))
[ 405.392802][ T5455] ? do_error_trap (arch/x86/include/asm/traps.h:58 arch/x86/kernel/traps.c:218)
[ 405.397242][ T5455] ? __jump_label_patch (arch/x86/kernel/jump_label.c:73 (discriminator 1))
[ 405.402290][ T5455] ? handle_invalid_op (arch/x86/kernel/traps.c:256)
[ 405.407075][ T5455] ? __jump_label_patch (arch/x86/kernel/jump_label.c:73 (discriminator 1))
[ 405.412124][ T5455] ? exc_invalid_op (arch/x86/kernel/traps.c:316)
[ 405.416650][ T5455] ? asm_exc_invalid_op (arch/x86/include/asm/idtentry.h:621)
[ 405.421527][ T5455] ? __pfx_exit_mac80211_hwsim (drivers/net/wireless/virtual/mac80211_hwsim.c:71) mac80211_hwsim
[ 405.428492][ T5455] ? llist_add_batch (lib/llist.c:33 (discriminator 14))
[ 405.433194][ T5455] ? __jump_label_patch (arch/x86/kernel/jump_label.c:73 (discriminator 1))
[ 405.438242][ T5455] ? __jump_label_patch (arch/x86/kernel/jump_label.c:73 (discriminator 1))
[ 405.443287][ T5455] ? __pfx_exit_mac80211_hwsim (drivers/net/wireless/virtual/mac80211_hwsim.c:71) mac80211_hwsim
[ 405.450251][ T5455] arch_jump_label_transform_queue (include/linux/jump_label.h:126 arch/x86/kernel/jump_label.c:138)
[ 405.456167][ T5455] ? kernel_text_address (kernel/extable.c:119 kernel/extable.c:94)
[ 405.461218][ T5455] __jump_label_update (kernel/jump_label.c:513)
[ 405.466092][ T5455] ? jump_label_update (kernel/jump_label.c:910)
[ 405.470967][ T5455] static_key_enable_cpuslocked (include/linux/instrumented.h:82 include/linux/atomic/atomic-instrumented.h:86 kernel/jump_label.c:214)
[ 405.476709][ T5455] static_key_enable (kernel/jump_label.c:225)
[ 405.481325][ T5455] ddebug_change (lib/dynamic_debug.c:257)
[ 405.485766][ T5455] ? vprintk_emit (kernel/printk/printk.c:748)
[ 405.490903][ T5455] ? __pfx_ddebug_change (lib/dynamic_debug.c:176)
[ 405.495864][ T5455] ? ddebug_parse_query (lib/dynamic_debug.c:480)
[ 405.500913][ T5455] ddebug_exec_query (lib/dynamic_debug.c:561)
[ 405.505702][ T5455] ? __pfx_ddebug_exec_query (lib/dynamic_debug.c:538)
[ 405.511010][ T5455] ? kstrtoll (lib/kstrtox.c:170)
[ 405.515105][ T5455] ddebug_exec_queries (lib/dynamic_debug.c:587 (discriminator 8))
[ 405.519982][ T5455] ddebug_dyndbg_module_param_cb (lib/dynamic_debug.c:1310)
[ 405.525638][ T5455] unknown_module_param_cb (kernel/module/main.c:2812)
[ 405.530773][ T5455] ? __pfx_unknown_module_param_cb (kernel/module/main.c:2800)
[ 405.536603][ T5455] parse_args (kernel/params.c:186)
[ 405.540784][ T5455] ? __pfx_unknown_module_param_cb (kernel/module/main.c:2800)
[ 405.546613][ T5455] ? __pfx_parse_args (kernel/params.c:168)
[ 405.551317][ T5455] ? klp_module_coming (kernel/livepatch/core.c:1292)
[ 405.556279][ T5455] ? load_module (kernel/module/main.c:2785 kernel/module/main.c:2972)
[ 405.560896][ T5455] load_module (kernel/module/main.c:2982)
[ 405.565334][ T5455] ? __pfx_unknown_module_param_cb (kernel/module/main.c:2800)
[ 405.571161][ T5455] ? ima_post_read_file (security/integrity/ima/ima_main.c:835 security/integrity/ima/ima_main.c:817)
[ 405.576210][ T5455] ? __pfx_load_module (kernel/module/main.c:2856)
[ 405.580997][ T5455] ? security_kernel_post_read_file (security/security.c:3356)
[ 405.586912][ T5455] ? kernel_read_file (arch/x86/include/asm/atomic.h:53 include/linux/atomic/atomic-arch-fallback.h:992 include/linux/atomic/atomic-instrumented.h:436 include/linux/fs.h:3027 fs/kernel_read_file.c:122)
[ 405.591789][ T5455] ? __pfx_kernel_read_file (fs/kernel_read_file.c:38)
[ 405.597012][ T5455] ? init_module_from_file (kernel/module/main.c:3198)
[ 405.602234][ T5455] init_module_from_file (kernel/module/main.c:3198)
[ 405.607284][ T5455] ? __pfx_init_module_from_file (kernel/module/main.c:3174)
[ 405.612942][ T5455] ? __pfx__raw_spin_lock (kernel/locking/spinlock.c:153)
[ 405.617993][ T5455] ? do_mmap (mm/mmap.c:496)
[ 405.622096][ T5455] idempotent_init_module (kernel/module/main.c:3210)
[ 405.627327][ T5455] ? __pfx_idempotent_init_module (kernel/module/main.c:3202)
[ 405.633068][ T5455] ? fdget (include/linux/atomic/atomic-arch-fallback.h:479 include/linux/atomic/atomic-instrumented.h:50 fs/file.c:1114 fs/file.c:1128)
[ 405.636910][ T5455] __x64_sys_finit_module (include/linux/file.h:68 kernel/module/main.c:3238 kernel/module/main.c:3220 kernel/module/main.c:3220)
[ 405.642045][ T5455] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83)
[ 405.646400][ T5455] ? fget (fs/file.c:1019)
[ 405.650234][ T5455] ? fput (arch/x86/include/asm/atomic64_64.h:61 include/linux/atomic/atomic-arch-fallback.h:4404 include/linux/atomic/atomic-long.h:1571 include/linux/atomic/atomic-instrumented.h:4540 fs/file_table.c:482)
[ 405.653982][ T5455] ? ksys_mmap_pgoff (mm/mmap.c:547)
[ 405.658772][ T5455] ? fdget_pos (arch/x86/include/asm/atomic64_64.h:15 include/linux/atomic/atomic-arch-fallback.h:2583 include/linux/atomic/atomic-long.h:38 include/linux/atomic/atomic-instrumented.h:3189 fs/file.c:1150 fs/file.c:1158)
[ 405.663038][ T5455] ? syscall_exit_to_user_mode (arch/x86/include/asm/irqflags.h:37 arch/x86/include/asm/irqflags.h:92 include/linux/entry-common.h:231 kernel/entry/common.c:206 kernel/entry/common.c:218)
[ 405.668521][ T5455] ? do_syscall_64 (arch/x86/entry/common.c:102)
[ 405.673050][ T5455] ? ksys_lseek (fs/read_write.c:382 fs/read_write.c:395)
[ 405.677317][ T5455] ? syscall_exit_to_user_mode (arch/x86/include/asm/irqflags.h:37 arch/x86/include/asm/irqflags.h:92 include/linux/entry-common.h:231 kernel/entry/common.c:206 kernel/entry/common.c:218)
[ 405.682800][ T5455] ? do_syscall_64 (arch/x86/entry/common.c:102)
[ 405.687329][ T5455] ? syscall_exit_to_user_mode (arch/x86/include/asm/irqflags.h:37 arch/x86/include/asm/irqflags.h:92 include/linux/entry-common.h:231 kernel/entry/common.c:206 kernel/entry/common.c:218)
[ 405.692809][ T5455] ? syscall_exit_to_user_mode (arch/x86/include/asm/irqflags.h:37 arch/x86/include/asm/irqflags.h:92 include/linux/entry-common.h:231 kernel/entry/common.c:206 kernel/entry/common.c:218)
[ 405.698292][ T5455] ? do_syscall_64 (arch/x86/entry/common.c:102)
[ 405.702816][ T5455] ? do_syscall_64 (arch/x86/entry/common.c:102)
[ 405.707343][ T5455] ? exc_page_fault (arch/x86/include/asm/irqflags.h:37 arch/x86/include/asm/irqflags.h:92 arch/x86/mm/fault.c:1489 arch/x86/mm/fault.c:1539)
[ 405.711871][ T5455] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)
[  405.717616][ T5455] RIP: 0033:0x7fd3fd25a719
[ 405.721884][ T5455] Code: 08 89 e8 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d b7 06 0d 00 f7 d8 64 89 01 48
All code
========
   0:	08 89 e8 5b 5d c3    	or     %cl,-0x3ca2a418(%rcx)
   6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
   d:	00 00 00 
  10:	90                   	nop
  11:	48 89 f8             	mov    %rdi,%rax
  14:	48 89 f7             	mov    %rsi,%rdi
  17:	48 89 d6             	mov    %rdx,%rsi
  1a:	48 89 ca             	mov    %rcx,%rdx
  1d:	4d 89 c2             	mov    %r8,%r10
  20:	4d 89 c8             	mov    %r9,%r8
  23:	4c 8b 4c 24 08       	mov    0x8(%rsp),%r9
  28:	0f 05                	syscall
  2a:*	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax		<-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	ret
  33:	48 8b 0d b7 06 0d 00 	mov    0xd06b7(%rip),%rcx        # 0xd06f1
  3a:	f7 d8                	neg    %eax
  3c:	64 89 01             	mov    %eax,%fs:(%rcx)
  3f:	48                   	rex.W

Code starting with the faulting instruction
===========================================
   0:	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax
   6:	73 01                	jae    0x9
   8:	c3                   	ret
   9:	48 8b 0d b7 06 0d 00 	mov    0xd06b7(%rip),%rcx        # 0xd06c7
  10:	f7 d8                	neg    %eax
  12:	64 89 01             	mov    %eax,%fs:(%rcx)
  15:	48                   	rex.W


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20241203/202412031508.3dffad46-lkp@intel.com



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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-03  7:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03  7:59 [jpoimboe:static-key-noinstr] [objtool] 51fd13276d: kernel_BUG_at_arch/x86/kernel/jump_label.c kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.