projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[S390] protect _PAGE_SPECIAL bit against mprotect
[firefly-linux-kernel-4.4.55.git]
/
include
/
asm-s390
/
pgtable.h
diff --git
a/include/asm-s390/pgtable.h
b/include/asm-s390/pgtable.h
index c7f4f8e3e297188310955e325c20717510acc590..bd0ea191dfa9d17030f89e5f2115407e56140dc8 100644
(file)
--- a/
include/asm-s390/pgtable.h
+++ b/
include/asm-s390/pgtable.h
@@
-223,6
+223,9
@@
extern char empty_zero_page[PAGE_SIZE];
#define _PAGE_SPECIAL 0x004 /* SW associated with special page */
#define __HAVE_ARCH_PTE_SPECIAL
#define _PAGE_SPECIAL 0x004 /* SW associated with special page */
#define __HAVE_ARCH_PTE_SPECIAL
+/* Set of bits not changed in pte_modify */
+#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_SPECIAL)
+
/* Six different types of pages. */
#define _PAGE_TYPE_EMPTY 0x400
#define _PAGE_TYPE_NONE 0x401
/* Six different types of pages. */
#define _PAGE_TYPE_EMPTY 0x400
#define _PAGE_TYPE_NONE 0x401
@@
-681,7
+684,7
@@
static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt
*/
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
{
*/
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
{
- pte_val(pte) &=
PAGE
_MASK;
+ pte_val(pte) &=
_PAGE_CHG
_MASK;
pte_val(pte) |= pgprot_val(newprot);
return pte;
}
pte_val(pte) |= pgprot_val(newprot);
return pte;
}