[RFC][PATCH 16/24] x86/mm: Kill shadow stack page permission warning

From: Dave Hansen

Date: Wed Oct 21 2026 - 15:53:22 EST



Shadow stack permissions are now normal and valid for kernel mappings.
Kill the warning.

---

b/arch/x86/include/asm/pgtable.h | 3 ---
1 file changed, 3 deletions(-)

diff -puN arch/x86/include/asm/pgtable.h~axe-shstk-pte-warning arch/x86/include/asm/pgtable.h
--- a/arch/x86/include/asm/pgtable.h~axe-shstk-pte-warning 2026-10-21 12:36:40.424885841 -0700
+++ b/arch/x86/include/asm/pgtable.h 2026-10-21 12:36:40.427885846 -0700
@@ -730,9 +730,6 @@ static inline pgprotval_t check_pgprot(p
static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
{
phys_addr_t pfn = (phys_addr_t)page_nr << PAGE_SHIFT;
- /* This bit combination is used to mark shadow stacks */
- WARN_ON_ONCE((pgprot_val(pgprot) & (_PAGE_DIRTY | _PAGE_RW)) ==
- _PAGE_DIRTY);
pfn ^= protnone_mask(pgprot_val(pgprot));
pfn &= PTE_PFN_MASK;
return __pte(pfn | check_pgprot(pgprot));
_