[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202504201840.3C1F04B09@keescook>
Date: Sun, 20 Apr 2025 18:52:48 -0700
From: Kees Cook <kees@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Guenter Roeck <linux@...ck-us.net>, linux-kernel@...r.kernel.org,
linux-acpi@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles
around
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
Powered by blists - more mailing lists