diff options
author | Kees Cook <kees@kernel.org> | 2025-04-25 17:11:07 -0700 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-05-07 23:39:41 -0700 |
commit | a0309faf1cb0622cac7c820150b7abf2024acff5 (patch) | |
tree | ab295d7b3d3e9ae86292239b8e76c90715d4a5bd /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | a8efadda8649506e80d256cc09656acc0783df2b (diff) |
mm: vmalloc: support more granular vrealloc() sizing
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.
Link: https://lkml.kernel.org/r/20250426001105.it.679-kees@kernel.org
Fixes: 3ddc2fefe6f3 ("mm: vmalloc: implement vrealloc()")
Signed-off-by: Kees Cook <kees@kernel.org>
Reported-by: Erhard Furtner <erhard_f@mailbox.org>
Closes: https://lore.kernel.org/all/20250408192503.6149a816@outsider.home/
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions