* [PATCH] docs: proc: document ProtectionKey in smaps
@ 2026-04-07 12:51 Kevin Brodsky
2026-04-07 13:00 ` Vlastimil Babka (SUSE)
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Kevin Brodsky @ 2026-04-07 12:51 UTC (permalink / raw)
To: linux-doc
Cc: linux-kernel, Kevin Brodsky, Yury Khrustalev, Jonathan Corbet,
Shuah Khan, Dave Hansen, Andrew Morton, Lorenzo Stoakes,
Vlastimil Babka, David Hildenbrand, Mark Rutland, linux-fsdevel,
linux-mm
The ProtectionKey entry was added in v4.9; back then it was
x86-specific, but it now lives in generic code and applies to all
architectures supporting pkeys (currently x86, power, arm64).
Time to document it: add a paragraph to proc.rst about the
ProtectionKey entry.
Reported-by: Yury Khrustalev <yury.khrustalev@arm.com>
Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
---
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-mm@kvack.org
---
Documentation/filesystems/proc.rst | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
index b0c0d1b45b99..d673cad7dbe4 100644
--- a/Documentation/filesystems/proc.rst
+++ b/Documentation/filesystems/proc.rst
@@ -549,6 +549,10 @@ does not take into account swapped out page of underlying shmem objects.
naturally aligned THP pages of any currently enabled size. 1 if true, 0
otherwise.
+If both the kernel and the system support protection keys (pkeys),
+"ProtectionKey" indicates the memory protection key associated with the
+virtual memory area.
+
"VmFlags" field deserves a separate description. This member represents the
kernel flags associated with the particular virtual memory area in two letter
encoded manner. The codes are the following:
--
2.51.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: proc: document ProtectionKey in smaps
2026-04-07 12:51 [PATCH] docs: proc: document ProtectionKey in smaps Kevin Brodsky
@ 2026-04-07 13:00 ` Vlastimil Babka (SUSE)
2026-04-07 14:00 ` David Hildenbrand (Arm)
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-04-07 13:00 UTC (permalink / raw)
To: Kevin Brodsky, linux-doc
Cc: linux-kernel, Yury Khrustalev, Jonathan Corbet, Shuah Khan,
Dave Hansen, Andrew Morton, Lorenzo Stoakes, David Hildenbrand,
Mark Rutland, linux-fsdevel, linux-mm
On 4/7/26 14:51, Kevin Brodsky wrote:
> The ProtectionKey entry was added in v4.9; back then it was
> x86-specific, but it now lives in generic code and applies to all
> architectures supporting pkeys (currently x86, power, arm64).
>
> Time to document it: add a paragraph to proc.rst about the
> ProtectionKey entry.
>
> Reported-by: Yury Khrustalev <yury.khrustalev@arm.com>
> Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
> ---
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Shuah Khan <skhan@linuxfoundation.org>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Lorenzo Stoakes <ljs@kernel.org>
> Cc: Vlastimil Babka <vbabka@kernel.org>
> Cc: David Hildenbrand <david@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-fsdevel@vger.kernel.org
> Cc: linux-mm@kvack.org
> ---
> Documentation/filesystems/proc.rst | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
> index b0c0d1b45b99..d673cad7dbe4 100644
> --- a/Documentation/filesystems/proc.rst
> +++ b/Documentation/filesystems/proc.rst
> @@ -549,6 +549,10 @@ does not take into account swapped out page of underlying shmem objects.
> naturally aligned THP pages of any currently enabled size. 1 if true, 0
> otherwise.
>
> +If both the kernel and the system support protection keys (pkeys),
> +"ProtectionKey" indicates the memory protection key associated with the
> +virtual memory area.
> +
> "VmFlags" field deserves a separate description. This member represents the
> kernel flags associated with the particular virtual memory area in two letter
> encoded manner. The codes are the following:
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: proc: document ProtectionKey in smaps
2026-04-07 12:51 [PATCH] docs: proc: document ProtectionKey in smaps Kevin Brodsky
2026-04-07 13:00 ` Vlastimil Babka (SUSE)
@ 2026-04-07 14:00 ` David Hildenbrand (Arm)
2026-04-07 14:33 ` Lorenzo Stoakes
2026-04-07 14:42 ` Dave Hansen
3 siblings, 0 replies; 5+ messages in thread
From: David Hildenbrand (Arm) @ 2026-04-07 14:00 UTC (permalink / raw)
To: Kevin Brodsky, linux-doc
Cc: linux-kernel, Yury Khrustalev, Jonathan Corbet, Shuah Khan,
Dave Hansen, Andrew Morton, Lorenzo Stoakes, Vlastimil Babka,
Mark Rutland, linux-fsdevel, linux-mm
On 4/7/26 14:51, Kevin Brodsky wrote:
> The ProtectionKey entry was added in v4.9; back then it was
> x86-specific, but it now lives in generic code and applies to all
> architectures supporting pkeys (currently x86, power, arm64).
>
> Time to document it: add a paragraph to proc.rst about the
> ProtectionKey entry.
>
> Reported-by: Yury Khrustalev <yury.khrustalev@arm.com>
> Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
> ---
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Shuah Khan <skhan@linuxfoundation.org>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Lorenzo Stoakes <ljs@kernel.org>
> Cc: Vlastimil Babka <vbabka@kernel.org>
> Cc: David Hildenbrand <david@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-fsdevel@vger.kernel.org
> Cc: linux-mm@kvack.org
> ---
> Documentation/filesystems/proc.rst | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
> index b0c0d1b45b99..d673cad7dbe4 100644
> --- a/Documentation/filesystems/proc.rst
> +++ b/Documentation/filesystems/proc.rst
> @@ -549,6 +549,10 @@ does not take into account swapped out page of underlying shmem objects.
> naturally aligned THP pages of any currently enabled size. 1 if true, 0
> otherwise.
>
> +If both the kernel and the system support protection keys (pkeys),
> +"ProtectionKey" indicates the memory protection key associated with the
> +virtual memory area.
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: proc: document ProtectionKey in smaps
2026-04-07 12:51 [PATCH] docs: proc: document ProtectionKey in smaps Kevin Brodsky
2026-04-07 13:00 ` Vlastimil Babka (SUSE)
2026-04-07 14:00 ` David Hildenbrand (Arm)
@ 2026-04-07 14:33 ` Lorenzo Stoakes
2026-04-07 14:42 ` Dave Hansen
3 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Stoakes @ 2026-04-07 14:33 UTC (permalink / raw)
To: Kevin Brodsky
Cc: linux-doc, linux-kernel, Yury Khrustalev, Jonathan Corbet,
Shuah Khan, Dave Hansen, Andrew Morton, Vlastimil Babka,
David Hildenbrand, Mark Rutland, linux-fsdevel, linux-mm
On Tue, Apr 07, 2026 at 01:51:33PM +0100, Kevin Brodsky wrote:
> The ProtectionKey entry was added in v4.9; back then it was
> x86-specific, but it now lives in generic code and applies to all
> architectures supporting pkeys (currently x86, power, arm64).
>
> Time to document it: add a paragraph to proc.rst about the
> ProtectionKey entry.
>
> Reported-by: Yury Khrustalev <yury.khrustalev@arm.com>
> Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
LGTM, So:
Reviewed-by: Lorenzo Stoakes <ljs@kernel.org>
> ---
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Shuah Khan <skhan@linuxfoundation.org>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Lorenzo Stoakes <ljs@kernel.org>
> Cc: Vlastimil Babka <vbabka@kernel.org>
> Cc: David Hildenbrand <david@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-fsdevel@vger.kernel.org
> Cc: linux-mm@kvack.org
> ---
> Documentation/filesystems/proc.rst | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
> index b0c0d1b45b99..d673cad7dbe4 100644
> --- a/Documentation/filesystems/proc.rst
> +++ b/Documentation/filesystems/proc.rst
> @@ -549,6 +549,10 @@ does not take into account swapped out page of underlying shmem objects.
> naturally aligned THP pages of any currently enabled size. 1 if true, 0
> otherwise.
>
> +If both the kernel and the system support protection keys (pkeys),
> +"ProtectionKey" indicates the memory protection key associated with the
> +virtual memory area.
> +
> "VmFlags" field deserves a separate description. This member represents the
> kernel flags associated with the particular virtual memory area in two letter
> encoded manner. The codes are the following:
> --
> 2.51.2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: proc: document ProtectionKey in smaps
2026-04-07 12:51 [PATCH] docs: proc: document ProtectionKey in smaps Kevin Brodsky
` (2 preceding siblings ...)
2026-04-07 14:33 ` Lorenzo Stoakes
@ 2026-04-07 14:42 ` Dave Hansen
3 siblings, 0 replies; 5+ messages in thread
From: Dave Hansen @ 2026-04-07 14:42 UTC (permalink / raw)
To: Kevin Brodsky, linux-doc
Cc: linux-kernel, Yury Khrustalev, Jonathan Corbet, Shuah Khan,
Dave Hansen, Andrew Morton, Lorenzo Stoakes, Vlastimil Babka,
David Hildenbrand, Mark Rutland, linux-fsdevel, linux-mm
On 4/7/26 05:51, Kevin Brodsky wrote:
> +If both the kernel and the system support protection keys (pkeys),
> +"ProtectionKey" indicates the memory protection key associated with the
> +virtual memory area.
I think you're trying to get across the point here that the kernel needs
to know about protection keys, have it enabled, and be running on a CPU
with pkey support.
To me "system" is a bit ambiguous here but _can_ refer to the whole
hardware/software system as a whole. To avoid redundancy, I'd say either:
If both the kernel and the processor support protection keys...
or
If the system supports protection keys...
But I'm ok with what you have in any case. Folks will understand what
you're saying:
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-04-07 14:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07 12:51 [PATCH] docs: proc: document ProtectionKey in smaps Kevin Brodsky
2026-04-07 13:00 ` Vlastimil Babka (SUSE)
2026-04-07 14:00 ` David Hildenbrand (Arm)
2026-04-07 14:33 ` Lorenzo Stoakes
2026-04-07 14:42 ` Dave Hansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox