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: <87r03a43wa.fsf@prevas.dk>
Date: Thu, 06 Mar 2025 15:42:13 +0100
From: Rasmus Villemoes <ravi@...vas.dk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-fsdevel@...r.kernel.org,  linux-kernel@...r.kernel.org, Nick
 Desaulniers <nick.desaulniers+lkml@...il.com>
Subject: Re: [PATCH] pipe_read: don't wake up the writer if the pipe is
 still full

On Thu, Mar 06 2025, Rasmus Villemoes <ravi@...vas.dk> wrote:

> On Wed, Mar 05 2025, Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>
>> 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.
>
> Yes, it seems they do have it, but for mysterious reasons saying
> -fms-extensions is not quite enough to convince clang that one does
> intend to use that MS extension, one also has to say
> -Wno-microsoft-anon-tag, or it complains
>
> warning: anonymous unions are a Microsoft extension [-Wmicrosoft-anon-tag]
>
> Also, the warning text is somewhat misleading; anon unions itself have
> certainly been a gcc extension since forever, and nowadays a C11 thing,
> and clang has a separate -Wpedantic warning for that when using
> -std=c99:
>
> warning: anonymous unions are a C11 extension [-Wc11-extensions]
>
> The -W flag name actually suggests an improvement to the warning
> "_tagged_ anonymous unions are a Microsoft extension", but I really
> wonder why -fms-extensions isn't sufficient to silence that in the first
> place. Also, the warning seems to be on by default; it's not some
> -Wextra or -Wpedantic thing.
>
> cc += Nick

Gah, sorry, I wasn't aware that address didn't work anymore.

So Cc -= everything but the lists and Cc += Nick for real this time,
hopefully.

Rasmus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ