Re: [PATCH] mm-kasan-kunit-extend-vmalloc-oob-tests-to-cover-vrealloc-fix
From: Maciej Wieczor-Retman
Date: Fri Jan 16 2026 - 13:53:36 EST
Tested on a Sierra Forest server this time, still no issues both on generic and
sw_tags.
Tested-by: Maciej Wieczor-Retman <maciej.wieczor-retman@xxxxxxxxx>
On 2026-01-16 at 14:28:22 +0100, Andrey Ryabinin wrote:
>Adjust vrealloc() size to verify full-granule poisoning/unpoisoning
>in tag-based modes.
>
>Signed-off-by: Andrey Ryabinin <ryabinin.a.a@xxxxxxxxx>
>Cc: Andrey Konovalov <andreyknvl@xxxxxxxxx>
>---
> mm/kasan/kasan_test_c.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/mm/kasan/kasan_test_c.c b/mm/kasan/kasan_test_c.c
>index cc8fc479e13a..b4d157962121 100644
>--- a/mm/kasan/kasan_test_c.c
>+++ b/mm/kasan/kasan_test_c.c
>@@ -1881,7 +1881,7 @@ static void vmalloc_oob(struct kunit *test)
>
> vmalloc_oob_helper(test, v_ptr, size);
>
>- size--;
>+ size -= KASAN_GRANULE_SIZE + 1;
> v_ptr = vrealloc(v_ptr, size, GFP_KERNEL);
> KUNIT_ASSERT_NOT_ERR_OR_NULL(test, v_ptr);
>
>@@ -1889,7 +1889,7 @@ static void vmalloc_oob(struct kunit *test)
>
> vmalloc_oob_helper(test, v_ptr, size);
>
>- size += 2;
>+ size += 2 * KASAN_GRANULE_SIZE + 2;
> v_ptr = vrealloc(v_ptr, size, GFP_KERNEL);
> KUNIT_ASSERT_NOT_ERR_OR_NULL(test, v_ptr);
>
>--
>2.52.0
>
>
--
Kind regards
Maciej Wieczór-Retman