* [PATCH] x86/pkeys: Update documentation
@ 2016-10-04 16:38 Dave Hansen
2016-10-05 8:39 ` [tip:mm/pkeys] " tip-bot for Dave Hansen
0 siblings, 1 reply; 2+ messages in thread
From: Dave Hansen @ 2016-10-04 16:38 UTC (permalink / raw)
To: linux-kernel; +Cc: Dave Hansen, dave.hansen, x86, corbet, linux-doc
From: Dave Hansen <dave.hansen@intel.com>
There are a few items that have gotten stale in the protection
keys documentation. The config option description only applied
to the execute-only support and is not accurate for the current
code. There was also a typo with the number of system calls. I
also wanted to call out that pkey_set() is not a kernel-provided
facility, and where to find an implementation.
Signed-off-by: Dave Hansen <dave.hansen@intel.com>
Cc: x86@kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
---
b/Documentation/x86/protection-keys.txt | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff -puN Documentation/x86/protection-keys.txt~pkeys-docfix Documentation/x86/protection-keys.txt
--- a/Documentation/x86/protection-keys.txt~pkeys-docfix 2016-10-04 09:31:01.361928429 -0700
+++ b/Documentation/x86/protection-keys.txt 2016-10-04 09:32:39.142383585 -0700
@@ -20,7 +20,7 @@ instruction fetches.
=========================== Syscalls ===========================
-There are 2 system calls which directly interact with pkeys:
+There are 3 system calls which directly interact with pkeys:
int pkey_alloc(unsigned long flags, unsigned long init_access_rights)
int pkey_free(int pkey);
@@ -52,6 +52,10 @@ is no longer in use:
munmap(ptr, PAGE_SIZE);
pkey_free(pkey);
+(Note: pkey_set() is a wrapper for the RDPKRU and WRPKRU instructions.
+ An example implementation can be found in
+ tools/testing/selftests/x86/protection_keys.c)
+
=========================== Behavior ===========================
The kernel attempts to make protection keys consistent with the
@@ -79,11 +83,3 @@ with a read():
The kernel will send a SIGSEGV in both cases, but si_code will be set
to SEGV_PKERR when violating protection keys versus SEGV_ACCERR when
the plain mprotect() permissions are violated.
-
-=========================== Config Option ===========================
-
-This config option adds approximately 1.5kb of text. and 50 bytes of
-data to the executable. A workload which does large O_DIRECT reads
-of holes in XFS files was run to exercise get_user_pages_fast(). No
-performance delta was observed with the config option
-enabled or disabled.
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:mm/pkeys] x86/pkeys: Update documentation
2016-10-04 16:38 [PATCH] x86/pkeys: Update documentation Dave Hansen
@ 2016-10-05 8:39 ` tip-bot for Dave Hansen
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Dave Hansen @ 2016-10-05 8:39 UTC (permalink / raw)
To: linux-tip-commits; +Cc: dave.hansen, dave, mingo, hpa, tglx, linux-kernel
Commit-ID: 6679dac513fd612f34d3a3d99d7b84ed6d5eb5cc
Gitweb: http://git.kernel.org/tip/6679dac513fd612f34d3a3d99d7b84ed6d5eb5cc
Author: Dave Hansen <dave.hansen@intel.com>
AuthorDate: Tue, 4 Oct 2016 09:38:57 -0700
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 5 Oct 2016 10:34:55 +0200
x86/pkeys: Update documentation
There are a few items that have gotten stale in the protection
keys documentation. The config option description only applied
to the execute-only support and is not accurate for the current
code. There was also a typo with the number of system calls. I
also wanted to call out that pkey_set() is not a kernel-provided
facility, and where to find an implementation.
Signed-off-by: Dave Hansen <dave.hansen@intel.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: linux-doc@vger.kernel.org
Cc: corbet@lwn.net
Link: http://lkml.kernel.org/r/20161004163857.71E0D6F6@viggo.jf.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
Documentation/x86/protection-keys.txt | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/Documentation/x86/protection-keys.txt b/Documentation/x86/protection-keys.txt
index 6da7689..b643045 100644
--- a/Documentation/x86/protection-keys.txt
+++ b/Documentation/x86/protection-keys.txt
@@ -20,7 +20,7 @@ instruction fetches.
=========================== Syscalls ===========================
-There are 2 system calls which directly interact with pkeys:
+There are 3 system calls which directly interact with pkeys:
int pkey_alloc(unsigned long flags, unsigned long init_access_rights)
int pkey_free(int pkey);
@@ -52,6 +52,10 @@ is no longer in use:
munmap(ptr, PAGE_SIZE);
pkey_free(pkey);
+(Note: pkey_set() is a wrapper for the RDPKRU and WRPKRU instructions.
+ An example implementation can be found in
+ tools/testing/selftests/x86/protection_keys.c)
+
=========================== Behavior ===========================
The kernel attempts to make protection keys consistent with the
@@ -79,11 +83,3 @@ with a read():
The kernel will send a SIGSEGV in both cases, but si_code will be set
to SEGV_PKERR when violating protection keys versus SEGV_ACCERR when
the plain mprotect() permissions are violated.
-
-=========================== Config Option ===========================
-
-This config option adds approximately 1.5kb of text. and 50 bytes of
-data to the executable. A workload which does large O_DIRECT reads
-of holes in XFS files was run to exercise get_user_pages_fast(). No
-performance delta was observed with the config option
-enabled or disabled.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-05 8:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-04 16:38 [PATCH] x86/pkeys: Update documentation Dave Hansen
2016-10-05 8:39 ` [tip:mm/pkeys] " tip-bot for Dave Hansen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.