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: <CAHk-=wh804HX8H86VRUSKoJGVG0eBe8sPz8=E3d8LHftOCSqwQ@mail.gmail.com>
Date: Mon, 3 Mar 2025 20:32:49 -1000
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: K Prateek Nayak <kprateek.nayak@....com>
Cc: Oleg Nesterov <oleg@...hat.com>, Mateusz Guzik <mjguzik@...il.com>, 
	"Sapkal, Swapnil" <swapnil.sapkal@....com>, Manfred Spraul <manfred@...orfullife.com>, 
	Christian Brauner <brauner@...nel.org>, David Howells <dhowells@...hat.com>, 
	WangYuli <wangyuli@...ontech.com>, linux-fsdevel@...r.kernel.org, 
	linux-kernel@...r.kernel.org, 
	"Shenoy, Gautham Ranjal" <gautham.shenoy@....com>, Neeraj.Upadhyay@....com, Ananth.narayan@....com
Subject: Re: [PATCH] pipe_read: don't wake up the writer if the pipe is still full

On Mon, 3 Mar 2025 at 19:31, K Prateek Nayak <kprateek.nayak@....com> wrote:
>
]> > ENTIRELY UNTESTED, but it seems to generate ok code. It might even
> > generate better code than what we have now.
>
> With the patch on top of commit aaec5a95d596 ("pipe_read: don't wake up
> the writer if the pipe is still full"), we've not seen any hangs yet
> with a few thousand iterations of short loops, and a few hundred
> iterations of larger loop sizes with hackbench.
>
> If you can provide you S-o-b, we can send out an official patch with a
> commit log. We'll wait for Oleg's response in case he has any concerns.

Ack. With that testing background, please write a message and add my

  Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>

and we'll get this all fixed up.

I assume this all goes back to commit 8cefc107ca54 ("pipe: Use head
and tail pointers for the ring, not cursor and length") back in 2019.

Or possibly 85190d15f4ea ("pipe: don't use 'pipe_wait() for basic pipe IO")?

But it was all hidden by the fact that we used to just wake things up
very aggressively and you'd never notice the race as a result, so then
it got exposed by the more minimal wakeup changes.

            Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ