Revert "ACPICA: Replace strncpy() with strscpy_pad() in acpi_ut_safe_strncpy()"
Subsystems (2)
PATCH 1/1 Revert "ACPICA: Replace strncpy() with strscpy_pad() in acpi_ut_safe_strncpy()"
This reverts commit 97f7d3f9c9acb70d4eef7bcdef3218823d142733.
acpica has it's own safe strncpy function: acpi_ut_safe_strncpy and must not use kernel's strscpy_pad.
--- drivers/acpi/acpica/utnonansi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/acpica/utnonansi.c +2 -1
@@ -168,7 +168,8 @@ void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size) {/* Always terminate destination string */ -strscpy_pad (dest, source, dest_size); +strncpy (dest, source, dest_size); + dest[dest_size -1 ] =0 ; }#endif
Signature · 1 line
2.54.0
Quoted 6 lines · Thomas Renninger
This reverts commit
97f7d3f9c9acb70d4eef7bcdef3218823d142733.acpica has it's own safe strncpy function:
acpi_ut_safe_strncpyand must not use kernel'sstrscpy_pad.Signed-off-by Thomas Renninger <[email protected]>
Quoted 9 lines
--- drivers/acpi/acpica/utnonansi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/acpi/acpica/utnonansi.c +0
-0
drivers/acpi/acpica/utnonansi.c void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size) · line 175
Quoted 9 lines
drivers/acpi/acpica/utnonansi.c +2
-1@@ -168,7 +168,8 @@ void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size) {/* Always terminate destination string */ -strscpy_pad (dest, source, dest_size); +strncpy (dest, source, dest_size); + dest[dest_size -1 ] =0 ; }#endif
thanks,
Signature · 2 lines
js suse labs
PATCH 1/1 Revert "ACPICA: Replace strncpy() with strscpy_pad() in acpi_ut_safe_strncpy()"
In reply to Thomas RenningerThis reverts commit 97f7d3f9c9acb70d4eef7bcdef3218823d142733.
acpica has it's own safe strncpy function: acpi_ut_safe_strncpy and must not use kernel's strscpy_pad.
--- drivers/acpi/acpica/utnonansi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/acpica/utnonansi.c +2 -1
@@ -168,7 +168,8 @@ void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size) {/* Always terminate destination string */ -strscpy_pad (dest, source, dest_size); +strncpy (dest, source, dest_size); + dest[dest_size -1 ] =0 ; }#endif
Signature · 1 line
2.54.0
Quoted 9 lines · Thomas Renninger
This reverts commit
97f7d3f9c9acb70d4eef7bcdef3218823d142733.acpica has it's own safe strncpy function:
acpi_ut_safe_strncpyand must not use kernel'sstrscpy_pad.Reported-and-tested-by Jiri Slaby <[email protected]>Signed-off-by Thomas Renninger <[email protected]>
Applied as 7.2-rc material, but I wrote a new changelog for it.
Thanks!
Quoted 19 lines
--- drivers/acpi/acpica/utnonansi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/acpi/acpica/utnonansi.c +2
-2@@ -168,7 +168,8 @@ void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size) {/* Always terminate destination string */ -strscpy_pad (dest, source, dest_size); +strncpy (dest, source, dest_size); + dest[dest_size -1 ] =0 ; }#endif --
Rafael J. Wysocki
maintainerQuoted 5 lines · Rafael J. Wysocki
Quoted 3 lines · Thomas Renninger
This reverts commit
97f7d3f9c9acb70d4eef7bcdef3218823d142733.
Quoted 8 lines
Quoted 6 lines
acpica has it's own safe strncpy function:
acpi_ut_safe_strncpyand must not use kernel'sstrscpy_pad.Reported-and-tested-by Jiri Slaby <[email protected]>Signed-off-by Thomas Renninger <[email protected]>Applied as 7.2-rc material, but I wrote a new changelog for it.
And dropped because of
The acpidump build breakage will need to be addressed in a different way.
I'll take care of this next week unless someone beats me to it.
Quoted 19 lines
Quoted 19 lines
--- drivers/acpi/acpica/utnonansi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/acpi/acpica/utnonansi.c +2
-2@@ -168,7 +168,8 @@ void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size) {/* Always terminate destination string */ -strscpy_pad (dest, source, dest_size); +strncpy (dest, source, dest_size); + dest[dest_size -1 ] =0 ; }#endif --
Quoted 14 lines · On Sonntag, 21. Juni 2026 19:38:06 Mitteleuropäische Sommerzeit Rafael J.…
Quoted 6 lines · Rafael J. Wysocki
Quoted 5 lines · Thomas Renninger
This reverts commit
97f7d3f9c9acb70d4eef7bcdef3218823d142733.acpica has it's own safe strncpy function:
acpi_ut_safe_strncpyand must not use kernel'sstrscpy_pad.Quoted 6 lines
Quoted 4 lines
Closes:
https://lore.kernel.org/all/79e9e913-0fb1-4110-804b-c3b5d0edafe4@kernel
.org Reported-and-tested-by: Jiri Slaby <[email protected]>Signed-off-by Thomas Renninger <[email protected]>Applied as 7.2-rc material, but I wrote a new changelog for it.
Quoted 8 lines
And dropped because of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i
d=1a3746ccbb0a97bed3c06ccde6b880013b1dddc1The acpidump build breakage will need to be addressed in a different way.
I'll take care of this next week unless someone beats me to it.
In case you agree with, you might want to take this one:
https://github.com/acpica/acpica/pull/1203/changes
Robert seem to have retired (his mail came back)? Please advise if one (I) still have to add/push someone so that this all gets synced from acpica down to the kernel.
Thanks,
Thomas
Rafael J. Wysocki
maintainerQuoted 22 lines · Thomas Renninger
Quoted 19 lines · On Sonntag, 21. Juni 2026 19:38:06 Mitteleuropäische Sommerzeit Rafael J.…
Quoted 6 lines · Rafael J. Wysocki
Quoted 5 lines · Thomas Renninger
This reverts commit
97f7d3f9c9acb70d4eef7bcdef3218823d142733.acpica has it's own safe strncpy function:
acpi_ut_safe_strncpyand must not use kernel'sstrscpy_pad.Quoted 6 lines
Quoted 4 lines
Closes:
https://lore.kernel.org/all/79e9e913-0fb1-4110-804b-c3b5d0edafe4@kernel
.org Reported-and-tested-by: Jiri Slaby <[email protected]>Signed-off-by Thomas Renninger <[email protected]>Applied as 7.2-rc material, but I wrote a new changelog for it.
And dropped because of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i
d=1a3746ccbb0a97bed3c06ccde6b880013b1dddc1
Quoted 6 lines
Quoted 3 lines
The acpidump build breakage will need to be addressed in a different way.
I'll take care of this next week unless someone beats me to it.
In case you agree with, you might want to take this one:
https://github.com/acpica/acpica/pull/1203/changes
This hasn't been merged yet though AFAICS.
Quoted 1 line
Robert seem to have retired (his mail came back)?
Yes, he has.
Quoted 3 lines
Please advise if one (I)
still have to add/push someone so that this all gets synced from acpica down to the kernel.
Saket is the new upstream ACPICA maintainer, but the overall process has not changed. That is, as a rule, changes are made to the upstream ACPICA first and from there, they are propagated to the kernel more-or-less automatically.
Commit 97f7d3f9c9acb70 was an exception because ACPICA users other than the Linux kernel still use strncpy() and have no plans to switch over away from it (AFAIK).