Re: [PATCH RESEND] mux: Convert mux_control_ops to a flex array member in mux_chip
From: Kees Cook
Date: Wed Jun 18 2025 - 17:21:31 EST
On Tue, 10 Jun 2025 12:40:59 +0200, Thorsten Blum wrote:
> Convert mux_control_ops to a flexible array member at the end of the
> mux_chip struct and add the __counted_by() compiler attribute to
> improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
> CONFIG_FORTIFY_SOURCE.
>
> Use struct_size() to calculate the number of bytes to allocate for a new
> mux chip and to remove the following Coccinelle/coccicheck warning:
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] mux: Convert mux_control_ops to a flex array member in mux_chip
https://git.kernel.org/kees/c/4bfbc2691de8
Take care,
--
Kees Cook