FYI, we noticed the following commit (built with gcc-7):
commit: fa84b6f5ae4279cb8ba47a00ad52514ae428e051 ("tracepoints: Use
static_call")
https://git.kernel.org/cgit/linux/kernel/git/peterz/queue.git x86/static_call
in testcase: rcutorture
with following parameters:
runtime: 300s
test: cpuhotplug
torture_type: tasks
test-description: rcutorture is rcutorture kernel module load/unload test.
test-url:
https://www.kernel.org/doc/Documentation/RCU/torture.txt
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 3G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+-------------------------------------------------------------------------------------------+------------+------------+
|
| 109e4788a5 | fa84b6f5ae |
+-------------------------------------------------------------------------------------------+------------+------------+
| boot_successes
| 5 | 0 |
| boot_failures
| 11 | 348 |
| BUG:kernel_reboot-without-warning_in_test_stage
| 3 | |
| BUG:kernel_NULL_pointer_dereference,address
| 6 | 107 |
| Oops:#[##]
| 8 | 131 |
| RIP:smp_call_function_single
| 2 | 75 |
| Kernel_panic-not_syncing:Fatal_exception_in_interrupt
| 5 | 123 |
| RIP:native_safe_halt
| 4 | 101 |
| Kernel_panic-not_syncing:Fatal_exception
| 3 | 8 |
| RIP:idle_cpu
| 1 | |
| RIP:__text_poke
| 2 | 8 |
| BUG:unable_to_handle_page_fault_for_address
| 2 | 24 |
| WARNING:at_arch/x86/kernel/static_call.c:#arch_static_call_transform
| 0 | 348 |
| RIP:arch_static_call_transform
| 0 | 348 |
| RIP:vprintk_emit
| 0 | 3 |
| RIP:native_write_msr
| 0 | 17 |
|
Kernel_panic-not_syncing:stack-protector:Kernel_stack_is_corrupted_in:syscall_trace_enter
| 0 | 4 |
| RIP:text_poke_bp_batch
| 0 | 1 |
| RIP:native_send_call_func_single_ipi
| 0 | 1 |
| RIP:console_unlock
| 0 | 2 |
| RIP:llist_add_batch
| 0 | 1 |
+-------------------------------------------------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <rong.a.chen(a)intel.com>
[ 0.644628] WARNING: CPU: 0 PID: 1 at arch/x86/kernel/static_call.c:30
arch_static_call_transform+0x9c/0xb0
[ 0.645608] Modules linked in:
[ 0.645608] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc4-00086-gfa84b6f #11
[ 0.645608] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
[ 0.645608] RIP: 0010:arch_static_call_transform+0x9c/0xb0
[ 0.645608] Code: c9 ba 05 00 00 00 48 89 df 89 6c 24 04 e8 5c e0 ff ff eb b9 48 89 da
48 c7 c7 78 30 2d 8b c6 05 b6 b8 70 01 01 e8 b4 aa 0a 00 <0f> 0b eb 9f e8 4b ad 0a
00 90 90 90 90 90 90 90 90 90 90 90 48 89
[ 0.645608] RSP: 0000:ffffaf5a40637e10 EFLAGS: 00010286
[ 0.645608] RAX: 0000000000000000 RBX: ffffffff8bc2a655 RCX: 0000000000000000
[ 0.645608] RDX: 0000000000000001 RSI: ffffffff8be10161 RDI: 0000000000000246
[ 0.645608] RBP: ffffffff8a002090 R08: ffffffff8be10120 R09: 0000000000000041
[ 0.645608] R10: ffffaf5a40687d98 R11: 0000000000000001 R12: ffffffff8b614540
[ 0.645608] R13: ffffffff8bc2a655 R14: ffffffff8b614550 R15: ffffffff8b614550
[ 0.645608] FS: 0000000000000000(0000) GS:ffff8d6970200000(0000)
knlGS:0000000000000000
[ 0.645608] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 0.645608] CR2: 00000000ffffffff CR3: 000000003f60a000 CR4: 00000000000406f0
[ 0.645608] Call Trace:
[ 0.645608] static_call_init+0x133/0x17a
[ 0.645608] ? stack_map_init+0x4e/0x4e
[ 0.645608] do_one_initcall+0x44/0x1e4
[ 0.645608] ? proc_register+0xcd/0x130
[ 0.645608] kernel_init_freeable+0xf3/0x278
[ 0.645608] ? rest_init+0xd0/0xd0
[ 0.645608] kernel_init+0xa/0x110
[ 0.645608] ret_from_fork+0x35/0x40
[ 0.645608] ---[ end trace b52a5acc2a60c983 ]---
To reproduce:
# build kernel
cd linux
cp config-5.2.0-rc4-00086-gfa84b6f .config
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 modules_prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 SHELL=/bin/bash
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 bzImage
git clone
https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email
Thanks,
Rong Chen