diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2018-08-31 02:05:40 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2018-08-31 02:05:40 +0200 |
commit | 410bdebe327fd276b43ad7157eae935639cd3a9b (patch) | |
tree | 78efe73df3f2d17591a09e1cb07f24093048fcf5 | |
parent | 8be156a366e74224497dbc03b8619b9f718e3542 (diff) | |
parent | 8a8c540db3ff1968317759961c0230221882367d (diff) | |
download | linux-410bdebe327fd276b43ad7157eae935639cd3a9b.tar.gz |
Merge tag 'v4.18.3' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-4.18-stablelinux-4.18.3
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/pgtable-invert.h | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile index c5ddd63c9ffff9..c973af6730fe11 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 18 -SUBLEVEL = 2 +SUBLEVEL = 3 EXTRAVERSION = NAME = Merciless Moray diff --git a/arch/x86/include/asm/pgtable-invert.h b/arch/x86/include/asm/pgtable-invert.h index 44b1203ece12ab..a0c1525f1b6f41 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. */ |