Re: [PATCH v2 1/2] VMCI: Remove handle_arr_calc_size()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 09, 2023 at 01:36:14PM +0100, Christophe JAILLET wrote:
> Use struct_size() instead of handle_arr_calc_size().
> This is much more conventional.
> 
> While at it, use size_add() when computing the needed size in
> vmci_handle_arr_append_entry(). This prevents from (unlikely) overflow
> when computing the new size to reallocate.
> 
> Suggested-by: Kees Cook <keescook@xxxxxxxxxxxx>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

-- 
Kees Cook




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux