Add printing of the NR permission to the page table dump code.

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

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]);
 }
-- 
2.17.1

Reply via email to