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  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]
Date:   Mon, 20 Sep 2021 10:26:21 -0700
From:   Linus Torvalds <>
To:     Arnd Bergmann <>
Cc:     Anders Larsen <>, Arnd Bergmann <>,
        Linux Kernel Mailing List <>
Subject: Re: [PATCH] [RFC v2] qnx: avoid -Wstringop-overread warning, again

On Mon, Sep 20, 2021 at 5:12 AM Arnd Bergmann <> wrote:
> +               /*
> +                * work around gcc-11.x using the first field it observes
> +                * to determing the actual length
> +                *
> +                */
> +               char __empty[0];
> +               char de_name[];

Ugh. That looks _really_ hacky.

It sounds like we can avoid the gcc bug if we just always use
"de->de_name[]". Then we don't need to depend on magical behavior
about one particular gcc version and a strange empty array in front of

IOW, something like the attached simpler thing that just does that
"always use de_name[]" and has a comment about why we don't do the
natural thing

Also, just what version of gcc is the broken one? You say "gcc-11",
but I certainly don't see it with _my_ version of gcc-11, so can we
(just for that comment) document more precisely what version you have
(or possibly what config you use to trigger it).


View attachment "patch.diff" of type "text/x-patch" (2210 bytes)

Powered by blists - more mailing lists