acpi: Replace struct acpi_table_slit 1-element array with flex-array
Subsystems (2)
PATCH 1/1 acpi: Replace struct acpi_table_slit 1-element array with flex-array
struct acpi_table_slit is used for copying System Locality Information Table data from ACPI tables. Here entry is a flex array but it was using ancient 1-element fake flexible array, which has been deprecated. Replace it with a C99 flexible array.
--- include/acpi/actbl3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/actbl3.h +1 -1
@@ -86,7 +86,7 @@ struct acpi_table_slic {struct acpi_table_slit {struct acpi_table_header header;/* Common ACPI table header */ u64 locality_count; -u8 entry[1 ];/* Real size = localities^2 */ +u8 entry[];/* Real size = localities^2 */ };/*******************************************************************************
Signature · 1 line
2.34.1
Quoted 6 lines · Wyes Karny
struct
acpi_table_slitis used for copying System Locality Information Table data from ACPI tables. Hereentryis a flex array but it was using ancient 1-element fake flexible array, which has been deprecated. Replace it with a C99 flexible array.Signed-off-by Wyes Karny <[email protected]>
Eek, thanks. I missed one! :)
Signature · 1 line
Kees Cook
Kees Cook
AppliedQuoted 6 lines · Wyes Karny
struct
acpi_table_slitis used for copying System Locality Information Table data from ACPI tables. Hereentryis a flex array but it was using ancient 1-element fake flexible array, which has been deprecated. Replace it with a C99 flexible array.
Since this is a fix for -fstrict-flex-arrays=3, I can carry this in the hardening tree until it shows up in upstream ACPICA.
Applied to for-next/hardening, thanks!
[1/1] acpi: Replace struct acpi_table_slit 1-element array with flex-array
https://git.kernel.org/kees/c/0233ca593eba
Signature · 1 line
Kees Cook
Rafael J. Wysocki
maintainerQuoted 9 lines · Kees Cook
Quoted 6 lines · Wyes Karny
struct
acpi_table_slitis used for copying System Locality Information Table data from ACPI tables. Hereentryis a flex array but it was using ancient 1-element fake flexible array, which has been deprecated. Replace it with a C99 flexible array.
Quoted 7 lines
Since this is a fix for -fstrict-flex-arrays=3, I can carry this in the hardening tree until it shows up in upstream ACPICA.
Applied to for-next/hardening, thanks!
[1/1] acpi: Replace struct
acpi_table_slit1-element array with flex-arrayhttps://git.kernel.org/kees/c/0233ca593eba
Works for me, thanks!