From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH][next] MIPS: dec: prom: Address -Warray-bounds warning
Date: Fri, 23 Jun 2023 08:14:34 -0600 [thread overview]
Message-ID: <54fe1ebc-6b3a-178c-d7d2-fb5486f54e8d@embeddedor.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2306231432120.14084@angie.orcam.me.uk>
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@orcam.me.uk>
Thanks!
--
Gustavo
prev parent reply other threads:[~2023-06-23 14:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-22 23:43 Gustavo A. R. Silva
2023-06-23 13:10 ` Thomas Bogendoerfer
2023-06-23 13:41 ` Maciej W. Rozycki
2023-06-23 14:14 ` Gustavo A. R. Silva [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54fe1ebc-6b3a-178c-d7d2-fb5486f54e8d@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=gustavoars@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®