forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork1
Commit445b69e
x86/pti: Make unpoison of pgd for trusted boot work for real
The inital fix for trusted boot and PTI potentially misses the pgd clearingif pud_alloc() sets a PGD. It probably works in *practice* because for twoadjacent calls to map_tboot_page() that share a PGD entry, the first willclear NX, *then* allocate and set the PGD (without NX clear). The secondcall will *not* allocate but will clear the NX bit.Defer the NX clearing to a point after it is known that all top-levelallocations have occurred. Add a comment to clarify why.[ tglx: Massaged changelog ]Fixes:262b6b3 ("x86/tboot: Unbreak tboot with PTI enabled")Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>Signed-off-by: Thomas Gleixner <tglx@linutronix.de>Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>Cc: Jon Masters <jcm@redhat.com>Cc: "Tim Chen" <tim.c.chen@linux.intel.com>Cc: gnomes@lxorguk.ukuu.org.ukCc: peterz@infradead.orgCc: ning.sun@intel.comCc: tboot-devel@lists.sourceforge.netCc: andi@firstfloor.orgCc: luto@kernel.orgCc: law@redhat.comCc: pbonzini@redhat.comCc: torvalds@linux-foundation.orgCc: gregkh@linux-foundation.orgCc: dwmw@amazon.co.ukCc: nickc@redhat.comCc: stable@vger.kernel.orgLink:https://lkml.kernel.org/r/20180110224939.2695CD47@viggo.jf.intel.com1 parent612e8e9 commit445b69e
1 file changed
+11
-1
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
130 |
| - | |
131 | 130 |
| |
132 | 131 |
| |
133 | 132 |
| |
| |||
139 | 138 |
| |
140 | 139 |
| |
141 | 140 |
| |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
142 | 152 |
| |
143 | 153 |
| |
144 | 154 |
| |
|
0 commit comments
Comments
(0)