diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-08 09:29:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-08 09:29:34 -0700 |
commit | 9c0fc4e28b57c5a6da7b58d60f71476c64d457a6 (patch) | |
tree | ba43e074d23f59bed6a6dc121ddc56d8f3b27401 | |
parent | 86df86424939d316b1f6cfac1b6204f0c7dee317 (diff) | |
parent | 138c9021ca68d6f8a6fac3418995fee102a3cc22 (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] protect _PAGE_SPECIAL bit against mprotect
-rw-r--r-- | include/asm-s390/pgtable.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index c7f4f8e3e297..bd0ea191dfa9 100644 --- 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 +/* 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 @@ -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) { - pte_val(pte) &= PAGE_MASK; + pte_val(pte) &= _PAGE_CHG_MASK; pte_val(pte) |= pgprot_val(newprot); return pte; } |