Re: [PATCH v2 2/3] spi: axi-spi-engine: use __counted_by() attribute
From: Kees Cook
Date: Mon Mar 04 2024 - 12:36:35 EST
On Mon, Mar 04, 2024 at 10:04:24AM -0600, David Lechner wrote:
> This adds the __counted_by() attribute to the flex array at the end of
> struct spi_engine_program in the AXI SPI Engine controller driver.
>
> The assignment of the length field has to be reordered to be before
> the access to the flex array in order to avoid potential compiler
> warnings/errors due to adding the __counted_by() attribute.
>
> Suggested-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
> Signed-off-by: David Lechner <dlechner@xxxxxxxxxxxx>
Looks good! Thanks for the respin.
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
--
Kees Cook