Re: [PATCH] binfmt_elf: Replace offsetof() with struct_size() in fill_note_info()
From: Kees Cook
Date: Mon Aug 25 2025 - 17:30:38 EST
On Wed, 13 Aug 2025 19:50:58 +0800, Xichao Zhao wrote:
> When dealing with structures containing flexible arrays, struct_size()
> provides additional compile-time checks compared to offsetof(). This
> enhances code robustness and reduces the risk of potential errors.
>
>
Applied to for-next/execve, thanks!
[1/1] binfmt_elf: Replace offsetof() with struct_size() in fill_note_info()
https://git.kernel.org/kees/c/a728ce8ffbd2
Take care,
--
Kees Cook