--- /dev/null
+From 70662db73d5455ebc8a1da29973fa70237b18cd2 Mon Sep 17 00:00:00 2001
+From: Ahmed Salem <x0rw3ll@gmail.com>
+Date: Fri, 25 Apr 2025 21:31:05 +0200
+Subject: ACPICA: Apply ACPI_NONSTRING in more places
+
+From: Ahmed Salem <x0rw3ll@gmail.com>
+
+commit 70662db73d5455ebc8a1da29973fa70237b18cd2 upstream.
+
+ACPICA commit 1035a3d453f7dd49a235a59ee84ebda9d2d2f41b
+
+Add ACPI_NONSTRING for destination char arrays without a terminating NUL
+character. This is a follow-up to commit 35ad99236f3a ("ACPICA: Apply
+ACPI_NONSTRING") where not all instances received the same treatment, in
+preparation for replacing strncpy() calls with memcpy()
+
+Link: https://github.com/acpica/acpica/commit/1035a3d4
+Signed-off-by: Ahmed Salem <x0rw3ll@gmail.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Link: https://patch.msgid.link/3833065.MHq7AAxBmi@rjwysocki.net
+Cc: Jiri Slaby <jirislaby@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/acpi/acpica/acdebug.h | 2 +-
+ include/acpi/actbl.h | 6 +++---
+ tools/power/acpi/os_specific/service_layers/oslinuxtbl.c | 2 +-
+ tools/power/acpi/tools/acpidump/apfiles.c | 2 +-
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+--- a/drivers/acpi/acpica/acdebug.h
++++ b/drivers/acpi/acpica/acdebug.h
+@@ -37,7 +37,7 @@ struct acpi_db_argument_info {
+ struct acpi_db_execute_walk {
+ u32 count;
+ u32 max_count;
+- char name_seg[ACPI_NAMESEG_SIZE + 1];
++ char name_seg[ACPI_NAMESEG_SIZE + 1] ACPI_NONSTRING;
+ };
+
+ #define PARAM_LIST(pl) pl
+--- a/include/acpi/actbl.h
++++ b/include/acpi/actbl.h
+@@ -66,12 +66,12 @@
+ ******************************************************************************/
+
+ struct acpi_table_header {
+- char signature[ACPI_NAMESEG_SIZE] __nonstring; /* ASCII table signature */
++ char signature[ACPI_NAMESEG_SIZE] ACPI_NONSTRING; /* ASCII table signature */
+ u32 length; /* Length of table in bytes, including this header */
+ u8 revision; /* ACPI Specification minor version number */
+ u8 checksum; /* To make sum of entire table == 0 */
+- char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */
+- char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
++ char oem_id[ACPI_OEM_ID_SIZE] ACPI_NONSTRING; /* ASCII OEM identification */
++ char oem_table_id[ACPI_OEM_TABLE_ID_SIZE] ACPI_NONSTRING; /* ASCII OEM table identification */
+ u32 oem_revision; /* OEM revision number */
+ char asl_compiler_id[ACPI_NAMESEG_SIZE]; /* ASCII ASL compiler vendor ID */
+ u32 asl_compiler_revision; /* ASL compiler version */
+--- a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
++++ b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
+@@ -19,7 +19,7 @@ ACPI_MODULE_NAME("oslinuxtbl")
+ typedef struct osl_table_info {
+ struct osl_table_info *next;
+ u32 instance;
+- char signature[ACPI_NAMESEG_SIZE];
++ char signature[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
+
+ } osl_table_info;
+
+--- a/tools/power/acpi/tools/acpidump/apfiles.c
++++ b/tools/power/acpi/tools/acpidump/apfiles.c
+@@ -103,7 +103,7 @@ int ap_open_output_file(char *pathname)
+
+ int ap_write_to_binary_file(struct acpi_table_header *table, u32 instance)
+ {
+- char filename[ACPI_NAMESEG_SIZE + 16];
++ char filename[ACPI_NAMESEG_SIZE + 16] ACPI_NONSTRING;
+ char instance_str[16];
+ ACPI_FILE file;
+ acpi_size actual;
--- /dev/null
+From 2b82118845e04c7adf4ece797150c19809bab29b Mon Sep 17 00:00:00 2001
+From: Kees Cook <kees@kernel.org>
+Date: Fri, 25 Apr 2025 21:28:34 +0200
+Subject: ACPICA: Apply ACPI_NONSTRING
+
+From: Kees Cook <kees@kernel.org>
+
+commit 2b82118845e04c7adf4ece797150c19809bab29b upstream.
+
+ACPICA commit ed68cb8e082e3bfbba02814af4fd5a61247f491b
+
+Add ACPI_NONSTRING annotations for places found that are using char
+arrays without a terminating NUL character. These were found during
+Linux kernel builds and after looking for instances of arrays of size
+ACPI_NAMESEG_SIZE.
+
+Link: https://github.com/acpica/acpica/commit/ed68cb8e
+Signed-off-by: Kees Cook <kees@kernel.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Link: https://patch.msgid.link/2039736.usQuhbGJ8B@rjwysocki.net
+Cc: Jiri Slaby <jirislaby@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/acpi/acpica/aclocal.h | 4 ++--
+ drivers/acpi/acpica/nsnames.c | 2 +-
+ drivers/acpi/acpica/nsrepair2.c | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/acpi/acpica/aclocal.h
++++ b/drivers/acpi/acpica/aclocal.h
+@@ -293,7 +293,7 @@ acpi_status (*acpi_internal_method) (str
+ * expected_return_btypes - Allowed type(s) for the return value
+ */
+ struct acpi_name_info {
+- char name[ACPI_NAMESEG_SIZE] __nonstring;
++ char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
+ u16 argument_list;
+ u8 expected_btypes;
+ };
+@@ -370,7 +370,7 @@ typedef acpi_status (*acpi_object_conver
+ converted_object);
+
+ struct acpi_simple_repair_info {
+- char name[ACPI_NAMESEG_SIZE] __nonstring;
++ char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
+ u32 unexpected_btypes;
+ u32 package_index;
+ acpi_object_converter object_converter;
+--- a/drivers/acpi/acpica/nsnames.c
++++ b/drivers/acpi/acpica/nsnames.c
+@@ -194,7 +194,7 @@ acpi_ns_build_normalized_path(struct acp
+ char *full_path, u32 path_size, u8 no_trailing)
+ {
+ u32 length = 0, i;
+- char name[ACPI_NAMESEG_SIZE];
++ char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
+ u8 do_no_trailing;
+ char c, *left, *right;
+ struct acpi_namespace_node *next_node;
+--- a/drivers/acpi/acpica/nsrepair2.c
++++ b/drivers/acpi/acpica/nsrepair2.c
+@@ -25,7 +25,7 @@ acpi_status (*acpi_repair_function) (str
+ return_object_ptr);
+
+ typedef struct acpi_repair_info {
+- char name[ACPI_NAMESEG_SIZE] __nonstring;
++ char name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
+ acpi_repair_function repair_function;
+
+ } acpi_repair_info;
--- /dev/null
+From 6da5e6f3028d46e4fee7849e85eda681939c630b Mon Sep 17 00:00:00 2001
+From: Kees Cook <kees@kernel.org>
+Date: Fri, 25 Apr 2025 21:27:58 +0200
+Subject: ACPICA: Introduce ACPI_NONSTRING
+
+From: Kees Cook <kees@kernel.org>
+
+commit 6da5e6f3028d46e4fee7849e85eda681939c630b upstream.
+
+ACPICA commit 878823ca20f1987cba0c9d4c1056be0d117ea4fe
+
+In order to distinguish character arrays from C Strings (i.e. strings with
+a terminating NUL character), add support for the "nonstring" attribute
+provided by GCC. (A better name might be "ACPI_NONCSTRING", but that's
+the attribute name, so stick to the existing naming convention.)
+
+GCC 15's -Wunterminated-string-initialization will warn about truncation
+of the NUL byte for string initializers unless the destination is marked
+with "nonstring". Prepare for applying this attribute to the project.
+
+Link: https://github.com/acpica/acpica/commit/878823ca
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Link: https://patch.msgid.link/1841930.VLH7GnMWUR@rjwysocki.net
+Signed-off-by: Kees Cook <kees@kernel.org>
+[ rjw: Pick up the tag from Kees ]
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Cc: Jiri Slaby <jirislaby@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/acpi/actypes.h | 4 ++++
+ include/acpi/platform/acgcc.h | 8 ++++++++
+ 2 files changed, 12 insertions(+)
+
+--- a/include/acpi/actypes.h
++++ b/include/acpi/actypes.h
+@@ -1327,4 +1327,8 @@ typedef enum {
+ #define ACPI_FLEX_ARRAY(TYPE, NAME) TYPE NAME[0]
+ #endif
+
++#ifndef ACPI_NONSTRING
++#define ACPI_NONSTRING /* No terminating NUL character */
++#endif
++
+ #endif /* __ACTYPES_H__ */
+--- a/include/acpi/platform/acgcc.h
++++ b/include/acpi/platform/acgcc.h
+@@ -72,4 +72,12 @@
+ TYPE NAME[]; \
+ }
+
++/*
++ * Explicitly mark strings that lack a terminating NUL character so
++ * that ACPICA can be built with -Wunterminated-string-initialization.
++ */
++#if __has_attribute(__nonstring__)
++#define ACPI_NONSTRING __attribute__((__nonstring__))
++#endif
++
+ #endif /* __ACGCC_H__ */
tracing-fix-compilation-warning-on-arm32.patch
revert-x86-smp-eliminate-mwait_play_dead_cpuid_hint.patch
+acpica-introduce-acpi_nonstring.patch
+acpica-apply-acpi_nonstring.patch
+acpica-apply-acpi_nonstring-in-more-places.patch