Skip to content

Commit 591b1d8

Browse files
hansendcIngo Molnar
authored andcommitted
x86/mm/pkeys: Add missing Documentation
Stefan Richter noticed that the X86_INTEL_MEMORY_PROTECTION_KEYS option in arch/x86/Kconfig references Documentation/x86/protection-keys.txt, but the file does not exist. This is a patch merging mishap: the final (v8) version of the pkeys series did not include the documentation patch 32 and v7 included. Add it now. Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Hansen <dave@sr71.net> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20151214190634.426BEE41@viggo.jf.intel.com [ Added changelog. ] Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 34a4cce commit 591b1d8

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Documentation/x86/protection-keys.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Memory Protection Keys for Userspace (PKU aka PKEYs) is a CPU feature
2+
which will be found on future Intel CPUs.
3+
4+
Memory Protection Keys provides a mechanism for enforcing page-based
5+
protections, but without requiring modification of the page tables
6+
when an application changes protection domains. It works by
7+
dedicating 4 previously ignored bits in each page table entry to a
8+
"protection key", giving 16 possible keys.
9+
10+
There is also a new user-accessible register (PKRU) with two separate
11+
bits (Access Disable and Write Disable) for each key. Being a CPU
12+
register, PKRU is inherently thread-local, potentially giving each
13+
thread a different set of protections from every other thread.
14+
15+
There are two new instructions (RDPKRU/WRPKRU) for reading and writing
16+
to the new register. The feature is only available in 64-bit mode,
17+
even though there is theoretically space in the PAE PTEs. These
18+
permissions are enforced on data access only and have no effect on
19+
instruction fetches.
20+
21+
=========================== Config Option ===========================
22+
23+
This config option adds approximately 1.5kb of text. and 50 bytes of
24+
data to the executable. A workload which does large O_DIRECT reads
25+
of holes in XFS files was run to exercise get_user_pages_fast(). No
26+
performance delta was observed with the config option
27+
enabled or disabled.

0 commit comments

Comments
 (0)