Re: [PATCH v2] mm: vmalloc: Support more granular vrealloc() sizing
From: Danilo Krummrich
Date: Sat Apr 26 2025 - 06:17:42 EST
On Fri, Apr 25, 2025 at 05:11:07PM -0700, Kees Cook wrote:
> Introduce struct vm_struct::requested_size so that the requested
> (re)allocation size is retained separately from the allocated area
> size. This means that KASAN will correctly poison the correct spans
> of requested bytes. This also means we can support growing the usable
> portion of an allocation that can already be supported by the existing
> area's existing allocation.
>
> Reported-by: Erhard Furtner <erhard_f@xxxxxxxxxxx>
> Closes: https://lore.kernel.org/all/20250408192503.6149a816@xxxxxxxxxxxxx/
> Fixes: 3ddc2fefe6f3 ("mm: vmalloc: implement vrealloc()")
> Signed-off-by: Kees Cook <kees@xxxxxxxxxx>
Reviewed-by: Danilo Krummrich <dakr@xxxxxxxxxx>