Skip to content

Commit

Permalink
[PATCH] uml: pte_mkread fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Mar 1, 2007
1 parent 1425180 commit 1463fdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-um/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 1463fdb

Please sign in to comment.