* [RFC PATCH 0/2] ACPI: replace deprecated strncpy()
@ 2025-03-30 5:53 Ahmed Salem
2025-03-30 5:54 ` [RFC PATCH 1/2] ACPI: mark ACPI_COPY_NAMESEG destinations with __nonstring attribute Ahmed Salem
2025-03-30 5:55 ` [RFC PATCH 2/2] ACPI: replace deprecated strncpy() with strtomem() Ahmed Salem
0 siblings, 2 replies; 5+ messages in thread
From: Ahmed Salem @ 2025-03-30 5:53 UTC (permalink / raw)
To: robert.moore, rafael.j.wysocki, lenb
Cc: skhan, linux-kernel-mentees, linux-acpi, acpica-devel,
linux-kernel
strncpy() is deprecated. This patch series is split over two patches,
the first of which annotates destinations with __nonstring, and the
second replaces strncpy() with strtomem() in the ACPI_COPY_NAMESEG
macro. Additionally, two replacements in drivers/acpi/acpica/tbfind.c:60
with memcpy().
This is an effort to avoid using deprecated interfaces, and potential
compiler warnings in the future.
Link: https://github.com/KSPP/linux/issues/90
Ahmed Salem (2):
ACPI: mark ACPI_COPY_NAMESEG destinations with __nonstring attribute
ACPI: replace deprecated strncpy() with strtomem()
drivers/acpi/acpica/acdebug.h | 2 +-
drivers/acpi/acpica/tbfind.c | 4 ++--
drivers/acpi/prmt.c | 2 +-
drivers/acpi/sysfs.c | 4 ++--
include/acpi/actbl.h | 6 +++---
include/acpi/actypes.h | 2 +-
tools/power/acpi/os_specific/service_layers/oslinuxtbl.c | 2 +-
tools/power/acpi/tools/acpidump/apfiles.c | 2 +-
8 files changed, 12 insertions(+), 12 deletions(-)
base-commit: b3c623b9a94f7f798715c87e7a75ceeecf15292f
--
2.47.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RFC PATCH 1/2] ACPI: mark ACPI_COPY_NAMESEG destinations with __nonstring attribute
2025-03-30 5:53 [RFC PATCH 0/2] ACPI: replace deprecated strncpy() Ahmed Salem
@ 2025-03-30 5:54 ` Ahmed Salem
2025-03-31 11:49 ` Rafael J. Wysocki
2025-03-30 5:55 ` [RFC PATCH 2/2] ACPI: replace deprecated strncpy() with strtomem() Ahmed Salem
1 sibling, 1 reply; 5+ messages in thread
From: Ahmed Salem @ 2025-03-30 5:54 UTC (permalink / raw)
To: robert.moore, rafael.j.wysocki, lenb
Cc: skhan, linux-kernel-mentees, linux-acpi, acpica-devel,
linux-kernel
strncpy(), which ACPI_COPY_NAMESEG currently uses, is deprecated[1].
This patch is the first of two, ultimately replacing strncpy() with
strtomem(), avoiding future compiler warnings about truncation.
[1] https://github.com/KSPP/linux/issues/90
Signed-off-by: Ahmed Salem <x0rw3ll@gmail.com>
---
drivers/acpi/acpica/acdebug.h | 2 +-
drivers/acpi/prmt.c | 2 +-
drivers/acpi/sysfs.c | 4 ++--
include/acpi/actbl.h | 6 +++---
tools/power/acpi/os_specific/service_layers/oslinuxtbl.c | 2 +-
tools/power/acpi/tools/acpidump/apfiles.c | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h
index 911875c5a5f1..2b56a8178f43 100644
--- 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] __nonstring;
};
#define PARAM_LIST(pl) pl
diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
index e549914a636c..ca70f01c940c 100644
--- a/drivers/acpi/prmt.c
+++ b/drivers/acpi/prmt.c
@@ -40,7 +40,7 @@ struct prm_buffer {
};
struct prm_context_buffer {
- char signature[ACPI_NAMESEG_SIZE];
+ char signature[ACPI_NAMESEG_SIZE] __nonstring;
u16 revision;
u16 reserved;
guid_t identifier;
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
index a48ebbf768f9..a05d4032d4f1 100644
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
@@ -307,9 +307,9 @@ static struct kobject *hotplug_kobj;
struct acpi_table_attr {
struct bin_attribute attr;
- char name[ACPI_NAMESEG_SIZE];
+ char name[ACPI_NAMESEG_SIZE] __nonstring;
int instance;
- char filename[ACPI_NAMESEG_SIZE+ACPI_INST_SIZE];
+ char filename[ACPI_NAMESEG_SIZE+ACPI_INST_SIZE] __nonstring;
struct list_head node;
};
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 451f6276da49..8aa60281e7db 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -66,12 +66,12 @@
******************************************************************************/
struct acpi_table_header {
- char signature[ACPI_NAMESEG_SIZE]; /* ASCII table signature */
+ char signature[ACPI_NAMESEG_SIZE] __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] __nonstring; /* ASCII OEM identification */
+ char oem_table_id[ACPI_OEM_TABLE_ID_SIZE] __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 */
diff --git a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
index 9d70d8c945af..52026b9e389e 100644
--- 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] __nonstring;
} osl_table_info;
diff --git a/tools/power/acpi/tools/acpidump/apfiles.c b/tools/power/acpi/tools/acpidump/apfiles.c
index 13817f9112c0..5a39b7d9351d 100644
--- 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] __nonstring;
char instance_str[16];
ACPI_FILE file;
acpi_size actual;
--
2.47.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [RFC PATCH 2/2] ACPI: replace deprecated strncpy() with strtomem()
2025-03-30 5:53 [RFC PATCH 0/2] ACPI: replace deprecated strncpy() Ahmed Salem
2025-03-30 5:54 ` [RFC PATCH 1/2] ACPI: mark ACPI_COPY_NAMESEG destinations with __nonstring attribute Ahmed Salem
@ 2025-03-30 5:55 ` Ahmed Salem
1 sibling, 0 replies; 5+ messages in thread
From: Ahmed Salem @ 2025-03-30 5:55 UTC (permalink / raw)
To: robert.moore, rafael.j.wysocki, lenb
Cc: skhan, linux-kernel-mentees, linux-acpi, acpica-devel,
linux-kernel
strncpy() is deprecated for NUL-terminated destination buffers[1].
Use strtomem() for ACPI_COPY_NAMESEG() as destinations are length-bounded,
and not all of them require NUL termination.
Also replace strncpy() with memcpy() for copying header.oem_id
and header.oem_table_id
[1] https://github.com/KSPP/linux/issues/90
Signed-off-by: Ahmed Salem <x0rw3ll@gmail.com>
---
drivers/acpi/acpica/tbfind.c | 4 ++--
include/acpi/actypes.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/acpica/tbfind.c b/drivers/acpi/acpica/tbfind.c
index 1c1b2e284bd9..35f72dffc250 100644
--- a/drivers/acpi/acpica/tbfind.c
+++ b/drivers/acpi/acpica/tbfind.c
@@ -57,8 +57,8 @@ acpi_tb_find_table(char *signature,
memset(&header, 0, sizeof(struct acpi_table_header));
ACPI_COPY_NAMESEG(header.signature, signature);
- strncpy(header.oem_id, oem_id, ACPI_OEM_ID_SIZE);
- strncpy(header.oem_table_id, oem_table_id, ACPI_OEM_TABLE_ID_SIZE);
+ memcpy(header.oem_id, oem_id, ACPI_OEM_ID_SIZE);
+ memcpy(header.oem_table_id, oem_table_id, ACPI_OEM_TABLE_ID_SIZE);
/* Search for the table */
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 80767e8bf3ad..b85dec57f00d 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -522,7 +522,7 @@ typedef u64 acpi_integer;
#define ACPI_COPY_NAMESEG(dest,src) (*ACPI_CAST_PTR (u32, (dest)) = *ACPI_CAST_PTR (u32, (src)))
#else
#define ACPI_COMPARE_NAMESEG(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAMESEG_SIZE))
-#define ACPI_COPY_NAMESEG(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAMESEG_SIZE))
+#define ACPI_COPY_NAMESEG(dest, src) (strtomem (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src))))
#endif
/* Support for the special RSDP signature (8 characters) */
--
2.47.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 1/2] ACPI: mark ACPI_COPY_NAMESEG destinations with __nonstring attribute
2025-03-30 5:54 ` [RFC PATCH 1/2] ACPI: mark ACPI_COPY_NAMESEG destinations with __nonstring attribute Ahmed Salem
@ 2025-03-31 11:49 ` Rafael J. Wysocki
2025-03-31 17:55 ` Ahmed Salem
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2025-03-31 11:49 UTC (permalink / raw)
To: Ahmed Salem
Cc: robert.moore, rafael.j.wysocki, lenb, skhan, linux-kernel-mentees,
linux-acpi, acpica-devel, linux-kernel
On Sun, Mar 30, 2025 at 7:54 AM Ahmed Salem <x0rw3ll@gmail.com> wrote:
>
> strncpy(), which ACPI_COPY_NAMESEG currently uses, is deprecated[1].
>
> This patch is the first of two, ultimately replacing strncpy() with
> strtomem(), avoiding future compiler warnings about truncation.
>
> [1] https://github.com/KSPP/linux/issues/90
>
> Signed-off-by: Ahmed Salem <x0rw3ll@gmail.com>
ACPICA material is primarily handled by the upstream ACPICA project on
GitHub, so please avoid mixing ACPICA code changes with changes to the
other code in one patch.
Also, ACPICA changes should first be submitted to upstream ACPICA, as
indicated on this list for many times, see for instance:
https://lore.kernel.org/linux-acpi/CAJZ5v0gUDxrAn4W+Rf3ifjrg8Z9ZzTTOZjPFSSN5488mPqzXeA@mail.gmail.com/
> ---
> drivers/acpi/acpica/acdebug.h | 2 +-
> drivers/acpi/prmt.c | 2 +-
> drivers/acpi/sysfs.c | 4 ++--
> include/acpi/actbl.h | 6 +++---
> tools/power/acpi/os_specific/service_layers/oslinuxtbl.c | 2 +-
> tools/power/acpi/tools/acpidump/apfiles.c | 2 +-
> 6 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h
> index 911875c5a5f1..2b56a8178f43 100644
> --- 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] __nonstring;
> };
>
> #define PARAM_LIST(pl) pl
> diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
> index e549914a636c..ca70f01c940c 100644
> --- a/drivers/acpi/prmt.c
> +++ b/drivers/acpi/prmt.c
> @@ -40,7 +40,7 @@ struct prm_buffer {
> };
>
> struct prm_context_buffer {
> - char signature[ACPI_NAMESEG_SIZE];
> + char signature[ACPI_NAMESEG_SIZE] __nonstring;
> u16 revision;
> u16 reserved;
> guid_t identifier;
> diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
> index a48ebbf768f9..a05d4032d4f1 100644
> --- a/drivers/acpi/sysfs.c
> +++ b/drivers/acpi/sysfs.c
> @@ -307,9 +307,9 @@ static struct kobject *hotplug_kobj;
>
> struct acpi_table_attr {
> struct bin_attribute attr;
> - char name[ACPI_NAMESEG_SIZE];
> + char name[ACPI_NAMESEG_SIZE] __nonstring;
> int instance;
> - char filename[ACPI_NAMESEG_SIZE+ACPI_INST_SIZE];
> + char filename[ACPI_NAMESEG_SIZE+ACPI_INST_SIZE] __nonstring;
> struct list_head node;
> };
>
> diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
> index 451f6276da49..8aa60281e7db 100644
> --- a/include/acpi/actbl.h
> +++ b/include/acpi/actbl.h
> @@ -66,12 +66,12 @@
> ******************************************************************************/
>
> struct acpi_table_header {
> - char signature[ACPI_NAMESEG_SIZE]; /* ASCII table signature */
> + char signature[ACPI_NAMESEG_SIZE] __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] __nonstring; /* ASCII OEM identification */
> + char oem_table_id[ACPI_OEM_TABLE_ID_SIZE] __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 */
> diff --git a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
> index 9d70d8c945af..52026b9e389e 100644
> --- 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] __nonstring;
>
> } osl_table_info;
>
> diff --git a/tools/power/acpi/tools/acpidump/apfiles.c b/tools/power/acpi/tools/acpidump/apfiles.c
> index 13817f9112c0..5a39b7d9351d 100644
> --- 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] __nonstring;
> char instance_str[16];
> ACPI_FILE file;
> acpi_size actual;
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 1/2] ACPI: mark ACPI_COPY_NAMESEG destinations with __nonstring attribute
2025-03-31 11:49 ` Rafael J. Wysocki
@ 2025-03-31 17:55 ` Ahmed Salem
0 siblings, 0 replies; 5+ messages in thread
From: Ahmed Salem @ 2025-03-31 17:55 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: robert.moore, rafael.j.wysocki, lenb, skhan, linux-kernel-mentees,
linux-acpi, acpica-devel, linux-kernel
On 25/03/31 01:49PM, Rafael J. Wysocki wrote:
> On Sun, Mar 30, 2025 at 7:54 AM Ahmed Salem <x0rw3ll@gmail.com> wrote:
> >
> > strncpy(), which ACPI_COPY_NAMESEG currently uses, is deprecated[1].
> >
> > This patch is the first of two, ultimately replacing strncpy() with
> > strtomem(), avoiding future compiler warnings about truncation.
> >
> > [1] https://github.com/KSPP/linux/issues/90
> >
> > Signed-off-by: Ahmed Salem <x0rw3ll@gmail.com>
>
> ACPICA material is primarily handled by the upstream ACPICA project on
> GitHub, so please avoid mixing ACPICA code changes with changes to the
> other code in one patch.
>
> Also, ACPICA changes should first be submitted to upstream ACPICA, as
> indicated on this list for many times, see for instance:
>
> https://lore.kernel.org/linux-acpi/CAJZ5v0gUDxrAn4W+Rf3ifjrg8Z9ZzTTOZjPFSSN5488mPqzXeA@mail.gmail.com/
>
Thank you so much for the note! In full transparency, I did see that
comment prior to submitting this patch. However, I wasn't entirely sure
whether I should have done that given the nature of this patch.
This marks my second time contributing patches as part of the LKMP, and
I've just got started learning C fairly recently, so I thought I'd
consolidate the changes into this series so if there's anything wrong
with my approach, it would cut the time discussing it over on upstream
as well as mailing lists. Hindsight being what it is, however, I should
have seen the MR from Kees Cook introducing ACPI_NONSTRING before
proposing changes, so that's definitely lessons learned for current and
future reference.
Point taken nonetheless, and I will be submitting the ACPICA-related PR
upstream, and resend the ACPI-specific one here instead without the RFC
tag. My apologies, and thank you so much once again for your time and
effort!
> > ---
> > drivers/acpi/acpica/acdebug.h | 2 +-
> > drivers/acpi/prmt.c | 2 +-
> > drivers/acpi/sysfs.c | 4 ++--
> > include/acpi/actbl.h | 6 +++---
> > tools/power/acpi/os_specific/service_layers/oslinuxtbl.c | 2 +-
> > tools/power/acpi/tools/acpidump/apfiles.c | 2 +-
> > 6 files changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h
> > index 911875c5a5f1..2b56a8178f43 100644
> > --- 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] __nonstring;
> > };
> >
> > #define PARAM_LIST(pl) pl
> > diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
> > index e549914a636c..ca70f01c940c 100644
> > --- a/drivers/acpi/prmt.c
> > +++ b/drivers/acpi/prmt.c
> > @@ -40,7 +40,7 @@ struct prm_buffer {
> > };
> >
> > struct prm_context_buffer {
> > - char signature[ACPI_NAMESEG_SIZE];
> > + char signature[ACPI_NAMESEG_SIZE] __nonstring;
> > u16 revision;
> > u16 reserved;
> > guid_t identifier;
> > diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
> > index a48ebbf768f9..a05d4032d4f1 100644
> > --- a/drivers/acpi/sysfs.c
> > +++ b/drivers/acpi/sysfs.c
> > @@ -307,9 +307,9 @@ static struct kobject *hotplug_kobj;
> >
> > struct acpi_table_attr {
> > struct bin_attribute attr;
> > - char name[ACPI_NAMESEG_SIZE];
> > + char name[ACPI_NAMESEG_SIZE] __nonstring;
> > int instance;
> > - char filename[ACPI_NAMESEG_SIZE+ACPI_INST_SIZE];
> > + char filename[ACPI_NAMESEG_SIZE+ACPI_INST_SIZE] __nonstring;
> > struct list_head node;
> > };
> >
> > diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
> > index 451f6276da49..8aa60281e7db 100644
> > --- a/include/acpi/actbl.h
> > +++ b/include/acpi/actbl.h
> > @@ -66,12 +66,12 @@
> > ******************************************************************************/
> >
> > struct acpi_table_header {
> > - char signature[ACPI_NAMESEG_SIZE]; /* ASCII table signature */
> > + char signature[ACPI_NAMESEG_SIZE] __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] __nonstring; /* ASCII OEM identification */
> > + char oem_table_id[ACPI_OEM_TABLE_ID_SIZE] __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 */
> > diff --git a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
> > index 9d70d8c945af..52026b9e389e 100644
> > --- 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] __nonstring;
> >
> > } osl_table_info;
> >
> > diff --git a/tools/power/acpi/tools/acpidump/apfiles.c b/tools/power/acpi/tools/acpidump/apfiles.c
> > index 13817f9112c0..5a39b7d9351d 100644
> > --- 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] __nonstring;
> > char instance_str[16];
> > ACPI_FILE file;
> > acpi_size actual;
> > --
> > 2.47.2
> >
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-03-31 17:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-30 5:53 [RFC PATCH 0/2] ACPI: replace deprecated strncpy() Ahmed Salem
2025-03-30 5:54 ` [RFC PATCH 1/2] ACPI: mark ACPI_COPY_NAMESEG destinations with __nonstring attribute Ahmed Salem
2025-03-31 11:49 ` Rafael J. Wysocki
2025-03-31 17:55 ` Ahmed Salem
2025-03-30 5:55 ` [RFC PATCH 2/2] ACPI: replace deprecated strncpy() with strtomem() Ahmed Salem
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox