* Re: [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around
@ 2025-04-21 0:35 Guenter Roeck
2025-04-21 1:52 ` Kees Cook
0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2025-04-21 0:35 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, linux-acpi
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.
>
> So this is not pretty, but this gets rid of the bulk of the annoying
> warnings during an allmodconfig build for me.
>
With gcc 13.3:
Building i386:defconfig ... failed
--------------
Error log:
drivers/acpi/tables.c:399:1: error: 'nonstring' attribute ignored on objects of type 'const char[][4]' [-Werror=attributes]
399 | static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst __nonstring = {
Guenter
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around 2025-04-21 0:35 [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around Guenter Roeck @ 2025-04-21 1:52 ` Kees Cook 2025-04-21 4:33 ` Linus Torvalds 0 siblings, 1 reply; 6+ messages in thread From: Kees Cook @ 2025-04-21 1:52 UTC (permalink / raw) To: Linus Torvalds; +Cc: Guenter Roeck, linux-kernel, linux-acpi, linux-hardening 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around 2025-04-21 1:52 ` Kees Cook @ 2025-04-21 4:33 ` Linus Torvalds 2025-04-21 16:39 ` Kees Cook 2025-04-27 11:24 ` David Laight 0 siblings, 2 replies; 6+ messages in thread From: Linus Torvalds @ 2025-04-21 4:33 UTC (permalink / raw) To: Kees Cook; +Cc: Guenter Roeck, linux-kernel, linux-acpi, linux-hardening On Sun, 20 Apr 2025 at 18:52, Kees Cook <kees@kernel.org> wrote: > > 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. :( Ehh. Kees, that's the compiler in F42. Really. It's not some "unreleased compiler version". It's the main compiler in one of the biggest Linux distributions, out now. Why do you think I made the change? Because the kernel DID NOT BUILD without those changes. So no. This was not some kind of "solved problem". Quite the reverse. Linus ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around 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 1 sibling, 1 reply; 6+ messages in thread From: Kees Cook @ 2025-04-21 16:39 UTC (permalink / raw) To: Linus Torvalds Cc: Guenter Roeck, linux-kernel, linux-acpi, linux-hardening, Arnd Bergmann On Sun, Apr 20, 2025 at 09:33:19PM -0700, Linus Torvalds wrote: > On Sun, 20 Apr 2025 at 18:52, Kees Cook <kees@kernel.org> wrote: > > > > 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. :( > > Ehh. Kees, that's the compiler in F42. > Really. It's not some "unreleased compiler version". > It's the main compiler in one of the biggest Linux distributions, out now. Fine, perhaps I'm nitpicking the fact. F42 made an unreleased compiler their default, so it is technically "released". > Why do you think I made the change? Because the kernel DID NOT BUILD > without those changes. Yes, I understand that, but you didn't coordinate with anyone. You didn't search lore for the warning strings, you didn't even check -next where you've now created merge conflicts. You put insufficiently tested patches into the tree at the last minute and cut an rc release that broke for everyone using GCC <15. You mercilessly flame maintainers for much much less. Why make compiler version upgrades a surprise? I'm hardly the only person who was working to make the GCC 15 transition smooth. This made more work for people, wasted your time to recreate existing patches, and broke the build. I am hardly being unreasonable in asking you to do better. -- Kees Cook ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around 2025-04-21 16:39 ` Kees Cook @ 2025-04-21 16:50 ` Linus Torvalds 0 siblings, 0 replies; 6+ messages in thread From: Linus Torvalds @ 2025-04-21 16:50 UTC (permalink / raw) To: Kees Cook Cc: Guenter Roeck, linux-kernel, linux-acpi, linux-hardening, Arnd Bergmann On Mon, 21 Apr 2025 at 09:39, Kees Cook <kees@kernel.org> wrote: > > Yes, I understand that, but you didn't coordinate with anyone. I upgraded my machine overnight and released rc3 on Sunday. And honestly, at that point I did not *CARE* about coordinating. I had expected things to work, since I knew people had been working on it, and since F42 had already been released. The fact that you then complain about a "unreleased compiler version" is ludicrous. If you had fixes for it, and they hadn't made it to me, that is 100% on *you*. My problem was that my kernel didn't build, and that is what I needed to fix. It was way too late to worry about "coordinating" things at that point. Linus ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around 2025-04-21 4:33 ` Linus Torvalds 2025-04-21 16:39 ` Kees Cook @ 2025-04-27 11:24 ` David Laight 1 sibling, 0 replies; 6+ messages in thread From: David Laight @ 2025-04-27 11:24 UTC (permalink / raw) To: Linus Torvalds Cc: Kees Cook, Guenter Roeck, linux-kernel, linux-acpi, linux-hardening On Sun, 20 Apr 2025 21:33:19 -0700 Linus Torvalds <torvalds@linux-foundation.org> wrote: > On Sun, 20 Apr 2025 at 18:52, Kees Cook <kees@kernel.org> wrote: > > > > 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. :( > > Ehh. Kees, that's the compiler in F42. > > Really. It's not some "unreleased compiler version". Would it make sens to disable the warning on versions of gcc 15 that don't contain all the 'fixes'? After all they are compile time checks so only need to be detected by one person doing a build - not everyone. David > > It's the main compiler in one of the biggest Linux distributions, out now. > > Why do you think I made the change? Because the kernel DID NOT BUILD > without those changes. > > So no. This was not some kind of "solved problem". Quite the reverse. > > Linus > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-04-27 11:24 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-04-21 0:35 [PATCH] gcc-15: acpi: sprinkle random '__nonstring' crumbles around Guenter Roeck 2025-04-21 1:52 ` Kees Cook 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox