From: Kees Cook <kees@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around
Date: Sun, 20 Apr 2025 18:52:48 -0700 [thread overview]
Message-ID: <202504201840.3C1F04B09@keescook> (raw)
In-Reply-To: <4f941c51-784a-4f10-8df5-6bd103d1d80e@roeck-us.net>
On Sun, Apr 20, 2025 at 11:02:18AM -0700, Linus Torvalds wrote:
> This is not great: I'd much rather introduce a typedef that is a "ACPI
> name byte buffer", and use that to mark these special 4-byte ACPI names
> that do not use NUL termination.
>
> But as noted in the previous commit ("gcc-15: make 'unterminated string
> initialization' just a warning") gcc doesn't actually seem to support
> that notion, so instead you have to just mark every single array
> declaration individually.
Linus, this is already a solved problem. I've sent patches for all
the warnings already[1]. I worked with GCC to get nonstring working
on multidimensional arrays[2]. I got it fixed in ACPICA upstream[3],
and I sent the non-CA ACPI patch too[4] using the compiler-checked
"nonstring_array" macro from commit b688f369ae0d ("compiler_types:
Introduce __nonstring_array").
Can you please revert this mess and use what has already been planned
for this warning? It is, once again, really frustrating when you update
to unreleased compiler versions. :(
-Kees
[1] https://lore.kernel.org/lkml/?q=f%3A%22Kees+Cook%22+nonstring
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118095
[3] https://github.com/acpica/acpica/pull/1006
[4] https://lore.kernel.org/lkml/20250415232028.work.843-kees@kernel.org/
--
Kees Cook
next prev parent reply other threads:[~2025-04-21 1:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-21 0:35 [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around Guenter Roeck
2025-04-21 1:52 ` Kees Cook [this message]
2025-04-21 4:33 ` Linus Torvalds
2025-04-21 16:39 ` Kees Cook
2025-04-21 16:50 ` Linus Torvalds
2025-04-27 11:24 ` David Laight
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=202504201840.3C1F04B09@keescook \
--to=kees@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=torvalds@linux-foundation.org \
/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