Skip to contentSkip to conversation

mm-kmsan-add-test_uninit_page.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 27

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: kmsan: add test_uninit_page
has been removed from the -mm tree. Its filename was
mm-kmsan-add-test_uninit_page.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Alexander Potapenko <[email protected]>
Subject: mm: kmsan: add test_uninit_page
Date: Tue, 13 Jan 2026 10:11:51 +0100

Test that pages allocated with alloc_page() are uninitialized by default.

---

 mm/kmsan/kmsan_test.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
mm/kmsan/kmsan_test.c renamed from mm/kmsan/kmsan_test.c~mm-kmsan-add-test_uninit_page +15 -0
@@ -378,6 +378,20 @@ static void test_uaf(struct kunit *test)
 	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;
@@ -727,6 +741,7 @@ static struct kunit_case kmsan_test_case
 	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),

_

Patches currently in -mm which might be from [email protected] are