提交 1463fdbc 编写于 作者: J Jeff Dike 提交者: Linus Torvalds

[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: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: NJeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 14251809
...@@ -270,7 +270,7 @@ static inline pte_t pte_wrprotect(pte_t pte) ...@@ -270,7 +270,7 @@ static inline pte_t pte_wrprotect(pte_t pte)
static inline pte_t pte_mkread(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)); return(pte_mknewprot(pte));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册