Merge tag 'v4.9.122' into khadas-vim3-4.9.y
authorNick <nick@khadas.com>
Tue, 21 May 2019 08:37:02 +0000 (16:37 +0800)
committerNick <nick@khadas.com>
Tue, 21 May 2019 08:37:02 +0000 (16:37 +0800)
This is the 4.9.122 stable release

Makefile
arch/x86/include/asm/pgtable-invert.h

index f8e0676..e72f5e9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 9
-SUBLEVEL = 121
+SUBLEVEL = 122
 EXTRAVERSION =
 NAME = Roaring Lionus
 
index 44b1203..a0c1525 100644 (file)
@@ -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. */