* [PATCH 3/3] UML - pte_mkread fix
@ 2007-02-20 16:56 Jeff Dike
0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2007-02-20 16:56 UTC (permalink / raw)
To: akpm; +Cc: Paolo 'Blaisorblade' Giarrusso, linux-kernel,
user-mode-linux
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>
--
include/asm-um/pgtable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.18-mm/include/asm-um/pgtable.h
===================================================================
--- linux-2.6.18-mm.orig/include/asm-um/pgtable.h 2006-10-03 12:53:16.000000000 -0400
+++ linux-2.6.18-mm/include/asm-um/pgtable.h 2006-10-09 12:25:44.000000000 -0400
@@ -270,7 +270,7 @@ static inline pte_t pte_wrprotect(pte_t
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));
}
--
Work email - jdike at linux dot intel dot com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-20 17:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-20 16:56 [PATCH 3/3] UML - pte_mkread fix Jeff Dike
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.