aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2018-08-31 02:18:26 +0200
committerRalf Baechle <ralf@linux-mips.org>2018-08-31 02:18:26 +0200
commit12a7b0a96618f30ce6861805d784ebc5c80b4a92 (patch)
treea2e60bd65330b300b4cd3f1cceaf9438f0a6848a
parent8c40e46d86391639257efb8ddf1b3829ccce4a4a (diff)
parent4cea13b66144903ae7310331b43e08f7b2d6aadb (diff)
downloadlinux-12a7b0a96618f30ce6861805d784ebc5c80b4a92.tar.gz
Merge tag 'v4.14.65' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-4.14-stablelinux-4.14.65
-rw-r--r--Makefile2
-rw-r--r--arch/x86/include/asm/pgtable-invert.h11
2 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 068f53ee772c4..325af5be605f7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 14
-SUBLEVEL = 64
+SUBLEVEL = 65
EXTRAVERSION =
NAME = Petit Gorille
diff --git a/arch/x86/include/asm/pgtable-invert.h b/arch/x86/include/asm/pgtable-invert.h
index 44b1203ece12a..a0c1525f1b6f4 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. */