Re: [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx/

-- 
Kees Cook




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux