]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/kasan/kunit: extend vmalloc OOB tests to cover vrealloc()
authorAndrey Ryabinin <ryabinin.a.a@gmail.com>
Tue, 13 Jan 2026 19:15:16 +0000 (20:15 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 27 Jan 2026 04:02:29 +0000 (20:02 -0800)
commitb19cb086043d30d3e74617f9971f68e7fd233c64
tree3cce0d1b87fa8fa82b1991b0200abdb2b4c33e5e
parentd60769075013ec7933a715b5b1ac37eb77c33420
mm/kasan/kunit: extend vmalloc OOB tests to cover vrealloc()

Extend the vmalloc_oob() test to validate OOB detection after resizing
vmalloc allocations with vrealloc().

The test now verifies that KASAN correctly poisons and unpoisons vmalloc
memory when allocations are shrunk and expanded, ensuring OOB accesses are
reliably detected after each resize.

[ryabinin.a.a@gmail.com: adjust vrealloc() size]
Link: https://lkml.kernel.org/r/20260116132822.22227-1-ryabinin.a.a@gmail.com
Link: https://lkml.kernel.org/r/20260113191516.31015-2-ryabinin.a.a@gmail.com
Signed-off-by: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Uladzislau Rezki <urezki@gmail.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/kasan/kasan_test_c.c