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] [day] [month] [year] [list]
Message-ID: <CAN+4W8hzti6dtuNAEKGqkSXj5NiNhb54w+Kbq0kCHnW3yiXmLw@mail.gmail.com>
Date: Mon, 15 Dec 2025 11:25:47 +0000
From: Lorenz Bauer <lmb@...valent.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Amit Shah <amit@...nel.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
	virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org, 
	stable@...r.kernel.org
Subject: Re: [PATCH] virtio: console: fix lost wakeup when device is written
 and polled

On Mon, Dec 15, 2025 at 10:49 AM Arnd Bergmann <arnd@...db.de> wrote:
>
> Is it always enough to wake up only one waiter? From your
> description it sounds like it might need wake_up_interruptible_all()
> instead, but I may be misunderstanding the issue.

Ah, I'm just not familiar with waitqueues, so that is very possible. I
based it on
out_intr(), which also only does a wake_up_interruptible(). So either this is
enough, or we need a wholesale replacement of wake ups? :(

Nothing in the virtio console prevents a third thread from entering the fray and
also getting stuck as far as I can tell.

- Thread A: write(): fill up vq, enter waitqueue
- Thread B: write(): vq is full, enter waitqueue
- Thread C: poll(): consume used buffers
- vring_interrupt() dropped, both A and B stuck

Is there other locking going on in the virtio layer or somewhere else that would
prevent concurrent write?

Best
Lorenz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ