From: Jeff Dike Date: Thu, 1 Mar 2007 04:13:33 +0000 (-0800) Subject: [PATCH] uml: pte_mkread fix X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=1463fdbcc797dfcb8574ababbd39cf6205f6ed00;p=deliverable%2Flinux.git [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 Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) static inline pte_t pte_mkread(pte_t pte) { - pte_set_bits(pte, _PAGE_RW); + pte_set_bits(pte, _PAGE_USER); return(pte_mknewprot(pte)); }