mm-actually-mark-kernel-page-table-pages.patch removed from -mm tree
The quilt patch titled
Subject: mm: actually mark kernel page table pages
has been removed from the -mm tree. Its filename was
mm-actually-mark-kernel-page-table-pages.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: Dave Hansen <[email protected]>
Subject: mm: actually mark kernel page table pages
Date: Wed, 22 Oct 2025 16:26:29 +0800
Now that the API is in place, mark kernel page table pages just after they are allocated. Unmark them just before they are freed.
Note: Unconditionally clearing the 'kernel' marking (via ptdesc_clear_kernel()) would be functionally identical to what is here. But having the if() makes it logically clear that this function can be used for kernel and non-kernel page tables.
---
include/asm-generic/pgalloc.h | 18 ++++++++++++++++++ include/linux/mm.h | 3 +++ 2 files changed, 21 insertions(+)
include/asm-generic/pgalloc.h renamed from include/asm-generic/pgalloc.h~mm-actually-mark-kernel-page-table-pages +18 -0
@@ -28,6 +28,8 @@ static inline pte_t *__pte_alloc_one_kerreturn NULL ; } +ptdesc_set_kernel (ptdesc); +return ptdesc_address (ptdesc); }#define __pte_alloc_one_kernel (...) alloc_hooks(__pte_alloc_one_kernel_noprof(__VA_ARGS__))
@@ -146,6 +148,10 @@ static inline pmd_t *pmd_alloc_one_nopropagetable_free (ptdesc);return NULL ; } + +if (mm == &init_mm) +ptdesc_set_kernel (ptdesc); +return ptdesc_address (ptdesc); }#define pmd_alloc_one (...) alloc_hooks(pmd_alloc_one_noprof(__VA_ARGS__))
@@ -179,6 +185,10 @@ static inline pud_t *__pud_alloc_one_nopreturn NULL ;pagetable_pud_ctor (ptdesc); + +if (mm == &init_mm) +ptdesc_set_kernel (ptdesc); +return ptdesc_address (ptdesc); }#define __pud_alloc_one (...) alloc_hooks(__pud_alloc_one_noprof(__VA_ARGS__))
@@ -233,6 +243,10 @@ static inline p4d_t *__p4d_alloc_one_nopreturn NULL ;pagetable_p4d_ctor (ptdesc); + +if (mm == &init_mm) +ptdesc_set_kernel (ptdesc); +return ptdesc_address (ptdesc); }#define __p4d_alloc_one (...) alloc_hooks(__p4d_alloc_one_noprof(__VA_ARGS__))
@@ -277,6 +291,10 @@ static inline pgd_t *__pgd_alloc_noprof(return NULL ;pagetable_pgd_ctor (ptdesc); + +if (mm == &init_mm) +ptdesc_set_kernel (ptdesc); +return ptdesc_address (ptdesc); }#define __pgd_alloc (...) alloc_hooks(__pgd_alloc_noprof(__VA_ARGS__))
include/linux/mm.h renamed from include/linux/mm.h~mm-actually-mark-kernel-page-table-pages +3 -0
@@ -3057,6 +3057,9 @@ static inline void pagetable_free(struct {struct page *page =ptdesc_page (pt); +if (ptdesc_test_kernel (pt)) +ptdesc_clear_kernel (pt); +__free_pages (page,compound_order (page)); }
_
Patches currently in -mm which might be from [email protected] are