diff options
| author | Greg Kroah-Hartman <gregkh@google.com> | 2018-08-18 11:35:52 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@google.com> | 2018-08-18 11:35:52 +0200 |
| commit | 5541782ce2bba0a5ac75f564e8f74e40b831d6b9 (patch) | |
| tree | 366685ddc9865946df6f23806d12fc37591f0272 | |
| parent | f76bdbdd516da14916d9eb723bb5fa16aacf6284 (diff) | |
| parent | 7dc18ebc3101229d5238a2dc740804cd4836b383 (diff) | |
Merge 4.4.150 into android-4.4
Changes in 4.4.150
x86/speculation/l1tf: Exempt zeroed PTEs from inversion
Linux 4.4.150
Change-Id: I2dfd6e160998ae2f55f3b7621df62e96a4511f7c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/pgtable-invert.h | 11 |
2 files changed, 11 insertions, 2 deletions
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 149 +SUBLEVEL = 150 EXTRAVERSION = NAME = Blurry Fish Butt diff --git a/arch/x86/include/asm/pgtable-invert.h b/arch/x86/include/asm/pgtable-invert.h index 44b1203ece12..a0c1525f1b6f 100644 --- a/arch/x86/include/asm/pgtable-invert.h +++ b/arch/x86/include/asm/pgtable-invert.h @@ -4,9 +4,18 @@ #ifndef __ASSEMBLY__ +/* + * A clear pte value is special, and doesn't get inverted. + * + * Note that even users that only pass a pgprot_t (rather + * than a full pte) won't trigger the special zero case, + * because even PAGE_NONE has _PAGE_PROTNONE | _PAGE_ACCESSED + * set. So the all zero case really is limited to just the + * cleared page table entry case. + */ static inline bool __pte_needs_invert(u64 val) { - return !(val & _PAGE_PRESENT); + return val && !(val & _PAGE_PRESENT); } /* Get a mask to xor with the page table entry to get the correct pfn. */ |
