Re: [PATCH v2 1/2] VMCI: Use struct_size() in kmalloc()

From: Kees Cook
Date: Mon Jan 08 2024 - 17:28:43 EST


On Fri, Jan 05, 2024 at 08:39:59AM -0800, Harshit Mogalapalli wrote:
> Use struct_size() instead of open coding.
>
> Suggested-by: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx>

Yeah, clear replacement.

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

--
Kees Cook