OSDN Git Service

mm: smaps: Report arm64 guarded pages in smaps
authorDaniel Kiss <daniel.kiss@arm.com>
Mon, 16 Mar 2020 16:50:54 +0000 (16:50 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 16 Mar 2020 17:19:50 +0000 (17:19 +0000)
The arm64 Branch Target Identification support is activated by marking
executable pages as guarded pages.  Report pages mapped this way in
smaps to aid diagnostics.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Daniel Kiss <daniel.kiss@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Documentation/filesystems/proc.txt
fs/proc/task_mmu.c

index 99ca040..ed5465d 100644 (file)
@@ -519,6 +519,7 @@ manner. The codes are the following:
     hg  - huge page advise flag
     nh  - no-huge page advise flag
     mg  - mergable advise flag
+    bt  - arm64 BTI guarded page
 
 Note that there is no guarantee that every flag and associated mnemonic will
 be present in all further kernel releases. Things get changed, the flags may
index 3ba9ae8..1e3409c 100644 (file)
@@ -668,6 +668,9 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
                [ilog2(VM_ARCH_1)]      = "ar",
                [ilog2(VM_WIPEONFORK)]  = "wf",
                [ilog2(VM_DONTDUMP)]    = "dd",
+#ifdef CONFIG_ARM64_BTI
+               [ilog2(VM_ARM64_BTI)]   = "bt",
+#endif
 #ifdef CONFIG_MEM_SOFT_DIRTY
                [ilog2(VM_SOFTDIRTY)]   = "sd",
 #endif