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-=wh6Ra8=dBUTo1vKT5Wao1hFq3+2x1mDwmBcVx2Ahp_rag@mail.gmail.com>
Date: Wed, 5 Mar 2025 06:50:26 -1000
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Rasmus Villemoes <ravi@...vas.dk>
Cc: Oleg Nesterov <oleg@...hat.com>, Mateusz Guzik <mjguzik@...il.com>, 
	K Prateek Nayak <kprateek.nayak@....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, 
	Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH] pipe_read: don't wake up the writer if the pipe is still full

On Wed, 5 Mar 2025 at 05:31, Rasmus Villemoes <ravi@...vas.dk> wrote:
>
> On Mon, Mar 03 2025, Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>
> > +/*
> > + * We have to declare this outside 'struct pipe_inode_info',
> > + * but then we can't use 'union pipe_index' for an anonymous
> > + * union, so we end up having to duplicate this declaration
> > + * below. Annoying.
> > + */
> > +union pipe_index {
> > +     unsigned long head_tail;
> > +     struct {
> > +             pipe_index_t head;
> > +             pipe_index_t tail;
> > +     };
> > +};
> > +
>
> -fms-extensions ? Willy wanted to add that for use in mm/ some years ago
> [*], and it has come up a few other times as well.
>
> [*] https://lore.kernel.org/lkml/20180419152817.GD25406@bombadil.infradead.org/

Oh, I was unaware of that extension, and yes, it would have been
lovely here, avoiding that duplicate union declaration.

But it does require clang support - I see that clang has a
'-fms-extensions' as well, so it's presumably there.

I don't know if it's worth it for the (small handful) of cases we'd
have in the kernel, but it does seem useful.

                 Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ