Re: [tip:locking/urgent] [jump_label] de752774f3: kernel_BUG_at_arch/x86/kernel/jump_label.c

From: Peter Zijlstra
Date: Mon Sep 09 2024 - 05:15:58 EST


On Sun, Sep 08, 2024 at 09:06:55PM +0800, kernel test robot wrote:
>
>
> Hello,
>
> kernel test robot noticed "kernel_BUG_at_arch/x86/kernel/jump_label.c" on:
>
> commit: de752774f38bb766941ed1bf910ba5a9f6cc6bf7 ("jump_label: Fix static_key_slow_dec() yet again")
> https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git locking/urgent
>
> in testcase: boot
>
> compiler: clang-18
> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>

> The kernel config and materials to reproduce are available at:
> https://download.01.org/0day-ci/archive/20240908/202409082005.393050e2-oliver.sang@xxxxxxxxx

So the whole thing actually boots and works on my real machine, so I had
to resort to using this qemu nonsense, as such I did as instructed in
the reproduce file.

I build the thing using clang-17 (for some reason debian is shitting
itself trying to install clang-18 on this machine and I don't want to
spend the day fighting that).

Except, once I do:

bin/lkp qemu -k /usr/src/linux-2.6/tmp-build/arch/x86/boot/bzImage -m /usr/src/linux-2.6/tmp-build/mod/modules.cgz job-script

The whole thing grinds to a halt like so:

[ 4.671842][ T1] /dev/root: Can't open blockdev
[ 4.673451][ T1] VFS: Cannot open root device "/dev/ram0" or unknown-block(0,0): error -6
[ 4.676062][ T1] Please append a correct "root=" boot option; here are the available partitions:
[ 4.678814][ T1] List of all bdev filesystems:
[ 4.680333][ T1] ext3
[ 4.680337][ T1] ext4
[ 4.681328][ T1]
[ 4.683185][ T1] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 4.685856][ T1] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.11.0-rc3-00004-gde752774f38b #17
[ 4.688668][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 4.691573][ T1] Call Trace:
[ 4.692614][ T1] <TASK>
[ 4.693562][ T1] dump_stack_lvl+0x3b/0xb0
[ 4.694800][ T1] panic+0x108/0x2e0
[ 4.695890][ T1] mount_root_generic+0x27f/0x300
[ 4.697283][ T1] prepare_namespace+0x72/0xa0
[ 4.698547][ T1] kernel_init_freeable+0x14d/0x190
[ 4.699828][ T1] ? __pfx_kernel_init+0x10/0x10
[ 4.701036][ T1] kernel_init+0x16/0x1a0
[ 4.702122][ T1] ret_from_fork+0x36/0x40
[ 4.703275][ T1] ? __pfx_kernel_init+0x10/0x10
[ 4.704424][ T1] ret_from_fork_asm+0x1a/0x30
[ 4.705546][ T1] </TASK>
[ 4.706476][ T1] Kernel Offset: 0x11600000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)

So clearly the day is off to a good start... :/