Greeting,
FYI, we noticed the following commit (built with clang-14):
commit: 342f2d0f88f3c2d7ab2ae206be5846579319e3bf ("rcu: Kill rnp->ofl_seq and use only rcu_state.ofl_lock for exclusion")
https://git.kernel.org/cgit/linux/kernel/git/paulmck/linux-rcu.git dev.2021.12.07a
in testcase: boot
on test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 4G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+-------------------------------------------------------------------+------------+------------+
| | f147dfab2e | 342f2d0f88 |
+-------------------------------------------------------------------+------------+------------+
| boot_successes | 35 | 0 |
| boot_failures | 0 | 34 |
| WARNING:at_kernel/locking/lockdep.c:#lockdep_hardirqs_on_prepare | 0 | 34 |
| EIP:lockdep_hardirqs_on_prepare | 0 | 34 |
| WARNING:at_kernel/locking/irqflag-debug.c:#warn_bogus_irq_restore | 0 | 34 |
| EIP:warn_bogus_irq_restore | 0 | 34 |
| WARNING:at_init/main.c:#start_kernel | 0 | 34 |
| EIP:start_kernel | 0 | 34 |
+-------------------------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>
[ 0.810735][ T0] WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:4279 lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4279)
[ 0.814109][ T0] Modules linked in:
[ 0.814891][ T0] CPU: 0 PID: 0 Comm: swapper Not tainted 5.16.0-rc1-00173-g342f2d0f88f3 #1
[ 0.816574][ T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[ 0.818394][ T0] EIP: lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4279)
[ 0.819666][ T0] Code: c4 08 0f 0b eb b8 e8 7a a7 6e 00 85 c0 74 af 83 3d 68 fe cd ce 00 75 a6 68 c8 8f 04 ce 68 7b 90 02 ce e8 9e df fb ff 83 c4 08 <0f> 0b eb 90 e8 52 a7 6e 00 85 c0 74 87 83 3d 68 fe cd ce 00 0f 85
All code
========
0: c4 (bad)
1: 08 0f or %cl,(%rdi)
3: 0b eb or %ebx,%ebp
5: b8 e8 7a a7 6e mov $0x6ea77ae8,%eax
a: 00 85 c0 74 af 83 add %al,-0x7c508b40(%rbp)
10: 3d 68 fe cd ce cmp $0xcecdfe68,%eax
15: 00 75 a6 add %dh,-0x5a(%rbp)
18: 68 c8 8f 04 ce pushq $0xffffffffce048fc8
1d: 68 7b 90 02 ce pushq $0xffffffffce02907b
22: e8 9e df fb ff callq 0xfffffffffffbdfc5
27: 83 c4 08 add $0x8,%esp
2a:* 0f 0b ud2 <-- trapping instruction
2c: eb 90 jmp 0xffffffffffffffbe
2e: e8 52 a7 6e 00 callq 0x6ea785
33: 85 c0 test %eax,%eax
35: 74 87 je 0xffffffffffffffbe
37: 83 3d 68 fe cd ce 00 cmpl $0x0,-0x31320198(%rip) # 0xffffffffcecdfea6
3e: 0f .byte 0xf
3f: 85 .byte 0x85
Code starting with the faulting instruction
===========================================
0: 0f 0b ud2
2: eb 90 jmp 0xffffffffffffff94
4: e8 52 a7 6e 00 callq 0x6ea75b
9: 85 c0 test %eax,%eax
b: 74 87 je 0xffffffffffffff94
d: 83 3d 68 fe cd ce 00 cmpl $0x0,-0x31320198(%rip) # 0xffffffffcecdfe7c
14: 0f .byte 0xf
15: 85 .byte 0x85
[ 0.823688][ T0] EAX: 0000002d EBX: 00200046 ECX: 80000003 EDX: 00000003
[ 0.825068][ T0] ESI: cd889569 EDI: cc6df177 EBP: ce635f34 ESP: ce635f24
[ 0.826487][ T0] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00210096
[ 0.828040][ T0] CR0: 80050033 CR2: ffdda000 CR3: 0edf5000 CR4: 00040690
[ 0.829411][ T0] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 0.830797][ T0] DR6: fffe0ff0 DR7: 00000400
[ 0.831699][ T0] Call Trace:
[ 0.832314][ T0] ? _raw_spin_unlock_irqrestore (arch/x86/include/asm/irqflags.h:22 arch/x86/include/asm/irqflags.h:70 arch/x86/include/asm/irqflags.h:132 include/linux/spinlock_api_smp.h:151 kernel/locking/spinlock.c:194)
[ 0.833480][ T0] ? rcu_cpu_starting (kernel/rcu/tree.c:4293)
[ 0.834469][ T0] trace_hardirqs_on (kernel/trace/trace_preemptirq.c:50)
[ 0.835478][ T0] _raw_spin_unlock_irqrestore (arch/x86/include/asm/irqflags.h:22 arch/x86/include/asm/irqflags.h:70 arch/x86/include/asm/irqflags.h:132 include/linux/spinlock_api_smp.h:151 kernel/locking/spinlock.c:194)
[ 0.836594][ T0] rcu_cpu_starting (kernel/rcu/tree.c:4293)
[ 0.837541][ T0] rcu_init (kernel/rcu/tree.c:4761)
[ 0.838345][ T0] start_kernel (kernel/trace/trace.c:10118 init/main.c:1017)
[ 0.839343][ T0] i386_start_kernel (arch/x86/kernel/head32.c:57)
[ 0.840305][ T0] startup_32_smp (??:?)
[ 0.841250][ T0] irq event stamp: 0
[ 0.842039][ T0] hardirqs last enabled at (0): 0x0
[ 0.843316][ T0] hardirqs last disabled at (0): 0x0
[ 0.844598][ T0] softirqs last enabled at (0): 0x0
[ 0.845890][ T0] softirqs last disabled at (0): 0x0
[ 0.847255][ T0] ---[ end trace 3ca4b3d4b875bb63 ]---
[ 0.848380][ T0] ------------[ cut here ]------------
[ 0.849397][ T0] raw_local_irq_restore() called with IRQs enabled
To reproduce:
# build kernel
cd linux
cp config-5.16.0-rc1-00173-g342f2d0f88f3 .config
make HOSTCC=clang-14 CC=clang-14 ARCH=i386 olddefconfig prepare modules_prepare bzImage modules
make HOSTCC=clang-14 CC=clang-14 ARCH=i386 INSTALL_MOD_PATH=<mod-install-dir> modules_install
cd <mod-install-dir>
find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in this email
# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.
---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation
Thanks,
Oliver Sang