public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PNP: Expand length of fixup id string
@ 2025-03-10 22:24 Kees Cook
  2025-03-12 19:42 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2025-03-10 22:24 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Kees Cook, linux-acpi, linux-kernel, linux-hardening

GCC 15's -Wunterminated-string-initialization saw that "id" was not
including the required trailing NUL character. Instead of marking "id"
with __nonstring[1], expand the length of the string as it is used in
(debugging) format strings that expect a properly formed C string.

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1]
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: linux-acpi@vger.kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
---
 include/linux/pnp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index b7a7158aaf65..23fe3eaf242d 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -290,7 +290,7 @@ static inline void pnp_set_drvdata(struct pnp_dev *pdev, void *data)
 }
 
 struct pnp_fixup {
-	char id[7];
+	char id[8];
 	void (*quirk_function) (struct pnp_dev *dev);	/* fixup function */
 };
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PNP: Expand length of fixup id string
  2025-03-10 22:24 [PATCH] PNP: Expand length of fixup id string Kees Cook
@ 2025-03-12 19:42 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2025-03-12 19:42 UTC (permalink / raw)
  To: Kees Cook; +Cc: Rafael J. Wysocki, linux-acpi, linux-kernel, linux-hardening

On Mon, Mar 10, 2025 at 11:24 PM Kees Cook <kees@kernel.org> wrote:
>
> GCC 15's -Wunterminated-string-initialization saw that "id" was not
> including the required trailing NUL character. Instead of marking "id"
> with __nonstring[1], expand the length of the string as it is used in
> (debugging) format strings that expect a properly formed C string.
>
> Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1]
> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> Cc: linux-acpi@vger.kernel.org
> Signed-off-by: Kees Cook <kees@kernel.org>
> ---
>  include/linux/pnp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/pnp.h b/include/linux/pnp.h
> index b7a7158aaf65..23fe3eaf242d 100644
> --- a/include/linux/pnp.h
> +++ b/include/linux/pnp.h
> @@ -290,7 +290,7 @@ static inline void pnp_set_drvdata(struct pnp_dev *pdev, void *data)
>  }
>
>  struct pnp_fixup {
> -       char id[7];
> +       char id[8];
>         void (*quirk_function) (struct pnp_dev *dev);   /* fixup function */
>  };
>
> --

Applied as 6.15 material, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-12 19:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 22:24 [PATCH] PNP: Expand length of fixup id string Kees Cook
2025-03-12 19:42 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox