KUNIT_EXPECT_TRUE(test, report_matches(&expect));
}
+static void test_uninit_page(struct kunit *test)
+{
+ EXPECTATION_UNINIT_VALUE(expect);
+ struct page *page;
+ int *ptr;
+
+ kunit_info(test, "uninitialized page allocation (UMR report)\n");
+ page = alloc_pages(GFP_KERNEL, 0);
+ ptr = page_address(page);
+ USE(*ptr);
+ __free_pages(page, 0);
+ KUNIT_EXPECT_TRUE(test, report_matches(&expect));
+}
+
static volatile char *test_uaf_pages_helper(int order, int offset)
{
struct page *page;
KUNIT_CASE(test_uninit_kmsan_check_memory),
KUNIT_CASE(test_init_kmsan_vmap_vunmap),
KUNIT_CASE(test_init_vmalloc),
+ KUNIT_CASE(test_uninit_page),
KUNIT_CASE(test_uaf),
KUNIT_CASE(test_uaf_pages),
KUNIT_CASE(test_uaf_high_order_pages),