--- b/arch/x86/Kconfig | 1 + b/arch/x86/include/asm/pgprot.h | 17 +++++++++++++++++ b/arch/x86/include/asm/pgtable_types.h | 3 +-- 3 files changed, 19 insertions(+), 2 deletions(-) diff -puN arch/x86/include/asm/pgtable_types.h~pgprot-x86 arch/x86/include/asm/pgtable_types.h --- a/arch/x86/include/asm/pgtable_types.h~pgprot-x86 2022-01-04 12:25:16.081071937 -0800 +++ b/arch/x86/include/asm/pgtable_types.h 2022-01-04 12:27:21.628384053 -0800 @@ -6,6 +6,7 @@ #include #include +#include #define _PAGE_BIT_PRESENT 0 /* is present */ #define _PAGE_BIT_RW 1 /* writeable */ @@ -277,8 +278,6 @@ enum page_cache_mode { */ #define PTE_FLAGS_MASK (~PTE_PFN_MASK) -typedef struct pgprot { pgprotval_t pgprot; } pgprot_t; - typedef struct { pgdval_t pgd; } pgd_t; static inline pgprot_t pgprot_nx(pgprot_t prot) diff -puN /dev/null arch/x86/include/asm/pgprot.h --- /dev/null 2021-12-18 19:45:56.730362955 -0800 +++ b/arch/x86/include/asm/pgprot.h 2022-01-04 12:28:11.148092692 -0800 @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_GENERIC_PGPROT_H +#define _ASM_GENERIC_PGPROT_H + +#ifndef __ASSEMBLY__ + +#ifdef CONFIG_X86_PAE +typedef u64 pgprotval_t; +#else +typedef unsigned long pgprotval_t; +#endif + +typedef struct pgprot { pgprotval_t pgprot; } pgprot_t; + +#endif + +#endif /* _ASM_GENERIC_PGPROT_H */ diff -puN arch/x86/Kconfig~pgprot-x86 arch/x86/Kconfig --- a/arch/x86/Kconfig~pgprot-x86 2022-01-04 12:25:54.272871099 -0800 +++ b/arch/x86/Kconfig 2022-01-04 12:26:29.220680655 -0800 @@ -267,6 +267,7 @@ config X86 select HAVE_ARCH_KCSAN if X86_64 select X86_FEATURE_NAMES if PROC_FS select PROC_PID_ARCH_STATUS if PROC_FS + select ARCH_SPECIFIC_PGPROT imply IMA_SECURE_AND_OR_TRUSTED_BOOT if EFI config INSTRUCTION_DECODER _