Skip to contentSkip to conversation

x86/doc: add PTI description

PATCH In review Dave Hansen 3 participants 3 messages Jan 5, 2018 – Jan 6, 2018 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 x86/doc: add PTI description

Changes from v3:
* Increasingly minor text fixes.

Changes from v2:
* Update some wording
* Minor typo and grammar fixes
* Further clarify what INVPCID is.

Changes from v1:
* update kernel-parameters.txt to clarify that the pti= option is not just for disabling. Also describe what 'pti=auto' does and why
* Add a note about the presence of NX in the user portion of the kernel page tables
* Clarify _additional_ 4k of PGD space
* Add a note about the runtime overhead of PCID without INVPCID

---

From: Dave Hansen <[email protected]>

Add some details about how PTI works, what some of the downsides are, and how to debug it when things go wrong.

Also document the kernel parameter: 'nopti'.

Cc Moritz Lipp <[email protected]>
Cc Daniel Gruss <[email protected]>
Cc Michael Schwarz <[email protected]>
Cc Richard Fellner <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Hugh Dickins <[email protected]>

---

 b/Documentation/admin-guide/kernel-parameters.txt |   21 +-
 b/Documentation/x86/pti.txt                       |  186 ++++++++++++++++++++++
 2 files changed, 200 insertions(+), 7 deletions(-)
Documentation/admin-guide/kernel-parameters.txt renamed from Documentation/admin-guide/kernel-parameters.txt~kpti-doc +14 -7
diff -puN Documentation/admin-guide/kernel-parameters.txt~kpti-doc Documentation/admin-guide/kernel-parameters.txt
@@ -2712,8 +2712,6 @@
 			steal time is computed, but won't influence scheduler
 			behaviour
 
-	nopti		[X86-64] Disable kernel page table isolation
-
 	nolapic		[X86-32,APIC] Do not enable or use the local APIC.
 
 	nolapic_timer	[X86-32,APIC] Do not use the local APIC timer.
@@ -3288,11 +3286,20 @@
 	pt.		[PARIDE]
 			See Documentation/blockdev/paride.txt.
 
-	pti=		[X86_64]
-			Control user/kernel address space isolation:
-			on - enable
-			off - disable
-			auto - default setting
+	pti=		[X86_64] Control Page Table Isolation of user and
+			kernel address spaces.  Disabling this feature
+			removes hardening, but improves performance of
+			system calls and interrupts.
+
+			on   - unconditionally enable
+			off  - unconditionally disable
+			auto - kernel detects whether your CPU model is
+			       vulnerable to issues that PTI mitigates
+
+			Not specifying this option is equivalent to pti=auto.
+
+	nopti		[X86_64]
+			Equivalent to pti=off
 
 	pty.legacy_count=
 			[KNL] Number of legacy pty's. Overwrites compiled-in
Documentation/x86/pti.txt new file +186 -0

186 lines not on this page · raw message

_

reviewer Reviewed-by on v4 1/1
#1 lore raw
Quoted 2 lines · Dave Hansen

Changes from v3:
* Increasingly minor text fixes.

Yeah. Just merge it and use patches for anything else.

Thanks.

Quoted 38 lines

Changes from v2:
* Update some wording
* Minor typo and grammar fixes
* Further clarify what INVPCID is.

Changes from v1:
* update kernel-parameters.txt to clarify that the pti= option is not just for disabling. Also describe what 'pti=auto' does and why
* Add a note about the presence of NX in the user portion of the kernel page tables
* Clarify _additional_ 4k of PGD space
* Add a note about the runtime overhead of PCID without INVPCID

---

From: Dave Hansen <[email protected]>

Add some details about how PTI works, what some of the downsides are, and how to debug it when things go wrong.

Also document the kernel parameter: 'nopti'.

Cc Moritz Lipp <[email protected]>
Cc Daniel Gruss <[email protected]>
Cc Michael Schwarz <[email protected]>
Cc Richard Fellner <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Hugh Dickins <[email protected]>

---

 b/Documentation/admin-guide/kernel-parameters.txt |   21 +-
 b/Documentation/x86/pti.txt                       |  186 ++++++++++++++++++++++
 2 files changed, 200 insertions(+), 7 deletions(-)
Signature · 1 line
~Randy
#2 lore raw

[tip:x86/pti] x86/Documentation: Add PTI description

In reply to Dave Hansen
x86/Documentation: Add PTI description
Commit-ID:  01c9b17bf673b05bb401b76ec763e9730ccf1376
Gitweb:     https://git.kernel.org/tip/01c9b17bf673b05bb401b76ec763e9730ccf1376
Author:     Dave Hansen <[email protected]>
AuthorDate: Fri, 5 Jan 2018 09:44:36 -0800
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Sat, 6 Jan 2018 21:39:10 +0100

x86/Documentation: Add PTI description

Add some details about how PTI works, what some of the downsides are, and how to debug it when things go wrong.

Also document the kernel parameter: 'pti/nopti'.

---
 Documentation/admin-guide/kernel-parameters.txt |  21 ++-
 Documentation/x86/pti.txt                       | 186 ++++++++++++++++++++++++
 2 files changed, 200 insertions(+), 7 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +14 -7
index 520fdec..9059917 100644
@@ -2685,8 +2685,6 @@
 			steal time is computed, but won't influence scheduler
 			behaviour
 
-	nopti		[X86-64] Disable kernel page table isolation
-
 	nolapic		[X86-32,APIC] Do not enable or use the local APIC.
 
 	nolapic_timer	[X86-32,APIC] Do not use the local APIC timer.
@@ -3255,11 +3253,20 @@
 	pt.		[PARIDE]
 			See Documentation/blockdev/paride.txt.
 
-	pti=		[X86_64]
-			Control user/kernel address space isolation:
-			on - enable
-			off - disable
-			auto - default setting
+	pti=		[X86_64] Control Page Table Isolation of user and
+			kernel address spaces.  Disabling this feature
+			removes hardening, but improves performance of
+			system calls and interrupts.
+
+			on   - unconditionally enable
+			off  - unconditionally disable
+			auto - kernel detects whether your CPU model is
+			       vulnerable to issues that PTI mitigates
+
+			Not specifying this option is equivalent to pti=auto.
+
+	nopti		[X86_64]
+			Equivalent to pti=off
 
 	pty.legacy_count=
 			[KNL] Number of legacy pty's. Overwrites compiled-in
Documentation/x86/pti.txt new file +186 -0

186 lines not on this page · raw message