aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/task_mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r--fs/proc/task_mmu.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index fa95ab2d3674..9df431642042 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -660,11 +660,20 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
660 [ilog2(VM_MERGEABLE)] = "mg", 660 [ilog2(VM_MERGEABLE)] = "mg",
661 [ilog2(VM_UFFD_MISSING)]= "um", 661 [ilog2(VM_UFFD_MISSING)]= "um",
662 [ilog2(VM_UFFD_WP)] = "uw", 662 [ilog2(VM_UFFD_WP)] = "uw",
663#ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
664 /* These come out via ProtectionKey: */
665 [ilog2(VM_PKEY_BIT0)] = "",
666 [ilog2(VM_PKEY_BIT1)] = "",
667 [ilog2(VM_PKEY_BIT2)] = "",
668 [ilog2(VM_PKEY_BIT3)] = "",
669#endif
663 }; 670 };
664 size_t i; 671 size_t i;
665 672
666 seq_puts(m, "VmFlags: "); 673 seq_puts(m, "VmFlags: ");
667 for (i = 0; i < BITS_PER_LONG; i++) { 674 for (i = 0; i < BITS_PER_LONG; i++) {
675 if (!mnemonics[i][0])
676 continue;
668 if (vma->vm_flags & (1UL << i)) { 677 if (vma->vm_flags & (1UL << i)) {
669 seq_printf(m, "%c%c ", 678 seq_printf(m, "%c%c ",
670 mnemonics[i][0], mnemonics[i][1]); 679 mnemonics[i][0], mnemonics[i][1]);
@@ -702,6 +711,10 @@ static int smaps_hugetlb_range(pte_t *pte, unsigned long hmask,
702} 711}
703#endif /* HUGETLB_PAGE */ 712#endif /* HUGETLB_PAGE */
704 713
714void __weak arch_show_smap(struct seq_file *m, struct vm_area_struct *vma)
715{
716}
717
705static int show_smap(struct seq_file *m, void *v, int is_pid) 718static int show_smap(struct seq_file *m, void *v, int is_pid)
706{ 719{
707 struct vm_area_struct *vma = v; 720 struct vm_area_struct *vma = v;
@@ -783,6 +796,7 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
783 (vma->vm_flags & VM_LOCKED) ? 796 (vma->vm_flags & VM_LOCKED) ?
784 (unsigned long)(mss.pss >> (10 + PSS_SHIFT)) : 0); 797 (unsigned long)(mss.pss >> (10 + PSS_SHIFT)) : 0);
785 798
799 arch_show_smap(m, vma);
786 show_smap_vma_flags(m, vma); 800 show_smap_vma_flags(m, vma);
787 m_cache_vma(m, vma); 801 m_cache_vma(m, vma);
788 return 0; 802 return 0;