* [PATCH] acpi: Replace struct acpi_table_slit 1-element array with flex-array
@ 2023-05-23 16:18 Wyes Karny
2023-05-23 16:44 ` Kees Cook
2023-06-01 16:56 ` Kees Cook
0 siblings, 2 replies; 4+ messages in thread
From: Wyes Karny @ 2023-05-23 16:18 UTC (permalink / raw)
To: rafael, lenb, robert.moore, keescook
Cc: linux-acpi, acpica-devel, linux-kernel, Wyes Karny
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.
Signed-off-by: Wyes Karny <wyes.karny@amd.com>
---
include/acpi/actbl3.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h
index f51c46f4e3e4..000764ab3985 100644
--- a/include/acpi/actbl3.h
+++ b/include/acpi/actbl3.h
@@ -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 */
};
/*******************************************************************************
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] acpi: Replace struct acpi_table_slit 1-element array with flex-array
2023-05-23 16:18 [PATCH] acpi: Replace struct acpi_table_slit 1-element array with flex-array Wyes Karny
@ 2023-05-23 16:44 ` Kees Cook
2023-06-01 16:56 ` Kees Cook
1 sibling, 0 replies; 4+ messages in thread
From: Kees Cook @ 2023-05-23 16:44 UTC (permalink / raw)
To: Wyes Karny
Cc: rafael, lenb, robert.moore, linux-acpi, acpica-devel,
linux-kernel
On Tue, May 23, 2023 at 04:18:15PM +0000, Wyes Karny wrote:
> 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.
>
> Signed-off-by: Wyes Karny <wyes.karny@amd.com>
Eek, thanks. I missed one! :)
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] acpi: Replace struct acpi_table_slit 1-element array with flex-array
2023-05-23 16:18 [PATCH] acpi: Replace struct acpi_table_slit 1-element array with flex-array Wyes Karny
2023-05-23 16:44 ` Kees Cook
@ 2023-06-01 16:56 ` Kees Cook
2023-06-01 18:21 ` Rafael J. Wysocki
1 sibling, 1 reply; 4+ messages in thread
From: Kees Cook @ 2023-06-01 16:56 UTC (permalink / raw)
To: lenb, rafael, wyes.karny, robert.moore
Cc: Kees Cook, acpica-devel, linux-kernel, linux-acpi
On Tue, 23 May 2023 16:18:15 +0000, Wyes Karny wrote:
> 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.
>
>
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
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] acpi: Replace struct acpi_table_slit 1-element array with flex-array
2023-06-01 16:56 ` Kees Cook
@ 2023-06-01 18:21 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2023-06-01 18:21 UTC (permalink / raw)
To: Kees Cook
Cc: lenb, rafael, wyes.karny, robert.moore, acpica-devel,
linux-kernel, linux-acpi
On Thu, Jun 1, 2023 at 6:57 PM Kees Cook <keescook@chromium.org> wrote:
>
> On Tue, 23 May 2023 16:18:15 +0000, Wyes Karny wrote:
> > 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.
> >
> >
>
> 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
Works for me, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-01 18:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-23 16:18 [PATCH] acpi: Replace struct acpi_table_slit 1-element array with flex-array Wyes Karny
2023-05-23 16:44 ` Kees Cook
2023-06-01 16:56 ` Kees Cook
2023-06-01 18:21 ` 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