[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202003121700.C10E9E5@keescook>
Date: Thu, 12 Mar 2020 17:00:29 -0700
From: Kees Cook <keescook@...omium.org>
To: Mark Brown <broonie@...nel.org>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Paul Elliott <paul.elliott@....com>,
Peter Zijlstra <peterz@...radead.org>,
Yu-cheng Yu <yu-cheng.yu@...el.com>,
Amit Kachhap <amit.kachhap@....com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Marc Zyngier <maz@...nel.org>,
Eugene Syromiatnikov <esyr@...hat.com>,
Szabolcs Nagy <szabolcs.nagy@....com>,
"H . J . Lu " <hjl.tools@...il.com>,
Andrew Jones <drjones@...hat.com>,
Arnd Bergmann <arnd@...db.de>, Jann Horn <jannh@...gle.com>,
Richard Henderson <richard.henderson@...aro.org>,
Kristina Martšenko <kristina.martsenko@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Florian Weimer <fweimer@...hat.com>,
Sudakshina Das <sudi.das@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Daniel Kiss <daniel.kiss@....com>
Subject: Re: [PATCH v9 12/13] mm: smaps: Report arm64 guarded pages in smaps
On Wed, Mar 11, 2020 at 07:26:07PM +0000, Mark Brown wrote:
> From: Daniel Kiss <daniel.kiss@....com>
>
> 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: Daniel Kiss <daniel.kiss@....com>
Reviewed-by: Kees Cook <keescook@...omium.org>
-Kees
> Signed-off-by: Mark Brown <broonie@...nel.org>
> ---
> Documentation/filesystems/proc.txt | 1 +
> fs/proc/task_mmu.c | 3 +++
> 2 files changed, 4 insertions(+)
>
> diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
> index 99ca040e3f90..ed5465d0f435 100644
> --- a/Documentation/filesystems/proc.txt
> +++ b/Documentation/filesystems/proc.txt
> @@ -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
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 3ba9ae83bff5..1e3409c484d1 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -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
> --
> 2.20.1
>
--
Kees Cook
Powered by blists - more mailing lists