lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dd06cd643ee7fa0be08ac3082cff443b8bfbfb58.camel@infradead.org>
Date: Thu, 12 Dec 2024 19:19:36 +0000
From: David Woodhouse <dwmw2@...radead.org>
To: Thomas Gleixner <tglx@...utronix.de>, Stefan Hajnoczi
 <stefanha@...hat.com>,  Jason Wang <jasowang@...hat.com>
Cc: "x86@...nel.org" <x86@...nel.org>, hpa <hpa@...or.com>, dyoung
 <dyoung@...hat.com>, kexec <kexec@...ts.infradead.org>, linux-ext4
 <linux-ext4@...r.kernel.org>, "Michael S. Tsirkin" <mst@...hat.com>,
 Stefano Garzarella <sgarzare@...hat.com>, eperezma <eperezma@...hat.com>,
 Paolo Bonzini <bonzini@...hat.com>,  ming.lei@...hat.com, Petr Mladek
 <pmladek@...e.com>, John Ogness <jogness@...utronix.de>, Peter Zijlstra
 <peterz@...radead.org>
Subject: Re: Lockdep warnings on kexec (virtio_blk, hrtimers)

On Thu, 2024-12-12 at 19:04 +0100, Thomas Gleixner wrote:
> 
> I tried to reproduce, but failed. Do you have a simple reproducer
> recipe?

Build current master (231825b2e1ff here). The config I'm using is at
http://david.woodhou.se/config-x86-kjump-irqs although I don't think
there's anything special other than CONFIG_KEXEC_JUMP and enough
lockdep to trigger the complaints.

Build the test case from
https://git.kernel.org/torvalds/c/07fa619f2a40c (which at some point
I'll clean up and add to the kernel selftests).

Then just run it repeatedly. Ten or twenty invocations should trigger
it at least once.

I've been running in qemu with the test case shoved into an initrd for
faster testing, but it works just as well done manually. If it matters,
the QEMU command line on my Haswell box is

 qemu-system-x86_64 -accel kvm,kernel-irqchip=split -display none \
   -serial mon:stdio -kernel arch/x86/boot/bzImage -smp 2 -m 2g \
   -append "console=ttyS0 root=/dev/vda1 no_console_suspend earlyprintk=serial" \
   -drive file=/var/lib/libvirt/images/fedora.qcow2,if=virtio \
   -cpu host --no-reboot -nic user,model=virtio 

Probably the only important part of that is the no_console_suspend.

A normal invocation looks like this:

[root@...alhost ~]# ./loadret
[   83.908243] Freezing user space processes
[   83.910587] Freezing user space processes completed (elapsed 0.001 seconds)
[   83.911614] OOM killer disabled.
[   83.923550] ata2: found unknown device (class 0)
[   83.938623] Disabling non-boot CPUs ...
[   83.962083] smpboot: CPU 1 is now offline
[   83.963022] crash hp: kexec_trylock() failed, kdump image may be inaccurate
B[   83.983498] Enabling non-boot CPUs ...
[   83.984410] crash hp: kexec_trylock() failed, kdump image may be inaccurate
[   83.985792] smpboot: Booting Node 0 Processor 1 APIC 0x1
[   83.989823] CPU1 is up
[   83.999270] virtio_blk virtio1: 2/0/0 default/read/poll queues
[   84.004705] OOM killer enabled.
[   84.005299] Restarting tasks ... done.
Success


But sometimes it looks like this...

[root@...alhost ~]# ./loadret
[   84.618610] Freezing user space processes
[   84.621427] Freezing user space processes completed (elapsed 0.001 seconds)
[   84.622510] OOM killer disabled.
[   84.628613] ata2: found unknown device (class 0)
[   84.652758] Disabling non-boot CPUs ...
[   84.672223] smpboot: CPU 1 is now offline
[   84.673091] crash hp: kexec_trylock() failed, kdump image may be inaccurate
B[   84.682946] ------------[ cut here ]------------
[   84.683584] Interrupts enabled after irqrouter_resume+0x0/0x50


Download attachment "smime.p7s" of type "application/pkcs7-signature" (5965 bytes)

Powered by blists - more mailing lists