diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-02-28 23:13:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-01 17:53:38 -0500 |
commit | 1463fdbcc797dfcb8574ababbd39cf6205f6ed00 (patch) | |
tree | d6039c743e89223ff553a2c8a64f59bc2c6cc5ca /include/asm-um/pgtable.h | |
parent | 14251809b1921b1216568700f1be2f91a1cbb5c7 (diff) |
[PATCH] uml: pte_mkread fix
Fix the fact that pte_mkread set _PAGE_RW instead of _PAGE_USER (the logic is
copied from i386 in most place, so it is really as bad as you're thinking).
Thus currently page tables are more permissive than they should.
Such a change may trigger other latent bugs, so be careful with this.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-um/pgtable.h')
-rw-r--r-- | include/asm-um/pgtable.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index e57ff136ee51..1b1090a91a58 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
@@ -270,7 +270,7 @@ static inline pte_t pte_wrprotect(pte_t pte) | |||
270 | 270 | ||
271 | static inline pte_t pte_mkread(pte_t pte) | 271 | static inline pte_t pte_mkread(pte_t pte) |
272 | { | 272 | { |
273 | pte_set_bits(pte, _PAGE_RW); | 273 | pte_set_bits(pte, _PAGE_USER); |
274 | return(pte_mknewprot(pte)); | 274 | return(pte_mknewprot(pte)); |
275 | } | 275 | } |
276 | 276 | ||