diff options
Diffstat (limited to 'arch/x86/mm/dump_pagetables.c')
| -rw-r--r-- | arch/x86/mm/dump_pagetables.c | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index ee8f8ab46941..6a7302d1161f 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch/x86/mm/dump_pagetables.c @@ -259,7 +259,8 @@ static void note_wx(struct pg_state *st)  #endif  	/* Account the WX pages */  	st->wx_pages += npages; -	WARN_ONCE(1, "x86/mm: Found insecure W+X mapping at address %pS\n", +	WARN_ONCE(__supported_pte_mask & _PAGE_NX, +		  "x86/mm: Found insecure W+X mapping at address %pS\n",  		  (void *)st->start_address);  } @@ -577,7 +578,7 @@ void ptdump_walk_pgd_level(struct seq_file *m, pgd_t *pgd)  void ptdump_walk_pgd_level_debugfs(struct seq_file *m, pgd_t *pgd, bool user)  {  #ifdef CONFIG_PAGE_TABLE_ISOLATION -	if (user && static_cpu_has(X86_FEATURE_PTI)) +	if (user && boot_cpu_has(X86_FEATURE_PTI))  		pgd = kernel_to_user_pgdp(pgd);  #endif  	ptdump_walk_pgd_level_core(m, pgd, false, false); @@ -590,7 +591,7 @@ void ptdump_walk_user_pgd_level_checkwx(void)  	pgd_t *pgd = INIT_PGD;  	if (!(__supported_pte_mask & _PAGE_NX) || -	    !static_cpu_has(X86_FEATURE_PTI)) +	    !boot_cpu_has(X86_FEATURE_PTI))  		return;  	pr_info("x86/mm: Checking user space page tables\n");  | 
