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]
Date:   Fri, 23 Jun 2023 08:14:34 -0600
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     "Maciej W. Rozycki" <macro@...am.me.uk>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc:     "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH][next] MIPS: dec: prom: Address -Warray-bounds warning



On 6/23/23 07:41, Maciej W. Rozycki wrote:
> On Fri, 23 Jun 2023, Thomas Bogendoerfer wrote:
> 
>>> Zero-length arrays are deprecated, and we are replacing them with flexible
>>> array members instead. So, replace zero-length array with flexible-array
>>> member in struct memmap.
> 
>   Technically it is a semantics bug fix actually, as the TURBOchannel
> firmware specification (from Jan 1993) says it's:
> 
> typedef struct{ int pagesize; unsigned char bitmap[];}memmap;
> int getbitmap(memmap *map);
> 
> (formatting preserved as in the document) so it should have always been a
> flexible array member.  Maybe old (2.x) GCC versions had an issue with it
> or something, as otherwise I can't imagine why whoever added our typedef
> did it differently from the spec.

Apparently, flexible-array members were supported in some 2.x versions as an
extension to the language; and it was not until GCC 3.0 that they were fully
supported by the compiler.

> 
>> applied to mips-next.
> 
>   Not sure if you can retrofit it, but:
> 
> Acked-by: Maciej W. Rozycki <macro@...am.me.uk>

Thanks!
--
Gustavo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ