Lines Matching refs:size2
335 size_t size1, size_t size2) in krealloc_more_oob_helper() argument
340 KUNIT_ASSERT_LT(test, size1, size2); in krealloc_more_oob_helper()
341 middle = size1 + (size2 - size1) / 2; in krealloc_more_oob_helper()
346 ptr2 = krealloc(ptr1, size2, GFP_KERNEL); in krealloc_more_oob_helper()
356 ptr2[size2 - 1] = 'x'; in krealloc_more_oob_helper()
360 KUNIT_EXPECT_KASAN_FAIL(test, ptr2[size2] = 'x'); in krealloc_more_oob_helper()
364 ptr2[round_up(size2, KASAN_GRANULE_SIZE)] = 'x'); in krealloc_more_oob_helper()
370 size_t size1, size_t size2) in krealloc_less_oob_helper() argument
375 KUNIT_ASSERT_LT(test, size2, size1); in krealloc_less_oob_helper()
376 middle = size2 + (size1 - size2) / 2; in krealloc_less_oob_helper()
381 ptr2 = krealloc(ptr1, size2, GFP_KERNEL); in krealloc_less_oob_helper()
388 ptr2[size2 - 1] = 'x'; in krealloc_less_oob_helper()
392 KUNIT_EXPECT_KASAN_FAIL(test, ptr2[size2] = 'x'); in krealloc_less_oob_helper()
396 ptr2[round_up(size2, KASAN_GRANULE_SIZE)] = 'x'); in krealloc_less_oob_helper()
402 KUNIT_EXPECT_LE(test, round_up(size2, KASAN_GRANULE_SIZE), in krealloc_less_oob_helper()
449 int size2 = 235; in krealloc_uaf() local
455 KUNIT_EXPECT_KASAN_FAIL(test, ptr2 = krealloc(ptr1, size2, GFP_KERNEL)); in krealloc_uaf()