Re: [PATCH 2/2][next] clk: socfpga: agilex: Add bounds-checking coverage for struct stratix10_clock_data

From: Gustavo A. R. Silva
Date: Wed Oct 11 2023 - 21:22:25 EST





Hence, we need to move the assignments to `clk_data->clk_data.num` after
allocations for `struct stratix10_clock_data` and before accessing the
flexible array `clk_data->clk_data.hws`. And, as assignments for both
`clk_data->clk_data.num` and `clk_data->base` are originally adjacent to
each other, relocate both assignments together.

Signed-off-by: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>

Yeah, ew. That's super tricky. Nice find.

Indeed. D:


Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>


Thanks!
--
Gustavo