diff mbox series

[RFC,11/13] x86, ptdump: Add NR bit to page table dump

Message ID 20191003212400.31130-12-rick.p.edgecombe@intel.com (mailing list archive)
State New, archived
Headers show
Series XOM for KVM guest userspace | expand

Commit Message

Edgecombe, Rick P Oct. 3, 2019, 9:23 p.m. UTC
Add printing of the NR permission to the page table dump code.

Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
---
 arch/x86/mm/dump_pagetables.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index ab67822fd2f4..8932aa9e3a9e 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -182,7 +182,7 @@  static void printk_prot(struct seq_file *m, pgprot_t prot, int level, bool dmsg)
 
 	if (!(pr & _PAGE_PRESENT)) {
 		/* Not present */
-		pt_dump_cont_printf(m, dmsg, "                              ");
+		pt_dump_cont_printf(m, dmsg, "                                 ");
 	} else {
 		if (pr & _PAGE_USER)
 			pt_dump_cont_printf(m, dmsg, "USR ");
@@ -219,6 +219,10 @@  static void printk_prot(struct seq_file *m, pgprot_t prot, int level, bool dmsg)
 			pt_dump_cont_printf(m, dmsg, "NX ");
 		else
 			pt_dump_cont_printf(m, dmsg, "x  ");
+		if (pr & _PAGE_NR)
+			pt_dump_cont_printf(m, dmsg, "NR ");
+		else
+			pt_dump_cont_printf(m, dmsg, "r  ");
 	}
 	pt_dump_cont_printf(m, dmsg, "%s\n", level_name[level]);
 }