From: "Paolo 'Blaisorblade' Giarrusso" <blaisorblade@yahoo.it>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Jeff Dike <jdike@addtoit.com>,
Paolo Blaisorblade Giarrusso <blaisorblade@yahoo.it>,
LKML <linux-kernel@vger.kernel.org>,
user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [patch 5/7] uml: fix fault handler on write
Date: Sat, 10 Sep 2005 19:44:57 +0200 [thread overview]
Message-ID: <20050910174629.286344000@zion.home.lan> (raw)
In-Reply-To: 20050910174452.907256000@zion.home.lan
[-- Attachment #1: uml-fix-fault-handler-on-write --]
[-- Type: text/plain, Size: 1575 bytes --]
The UML fault handler was recently changed to enforce PROT_NONE protections,
by requiring VM_READ or VM_EXEC on VMA's.
However, by mistake, things were changed such that VM_READ is always checked,
also on write faults; so a VMA mapped with only PROT_WRITE is not readable
(unless it's prefaulted with MAP_POPULATE or with a write), which is different
from i386.
Discovered while testing remap_file_pages protection support.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---
arch/um/kernel/trap_kern.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c
--- a/arch/um/kernel/trap_kern.c
+++ b/arch/um/kernel/trap_kern.c
@@ -57,7 +57,8 @@ good_area:
if(is_write && !(vma->vm_flags & VM_WRITE))
goto out;
- if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
+ /* Don't require VM_READ|VM_EXEC for write faults! */
+ if(!is_write && !(vma->vm_flags & (VM_READ | VM_EXEC)))
goto out;
do {
--
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2005-09-10 18:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-10 17:44 [uml-devel] [patch 0/7] Uml merge for 2.6.14 Paolo 'Blaisorblade' Giarrusso
2005-09-10 17:44 ` [uml-devel] [patch 1/7] Uml: more cleaning Paolo 'Blaisorblade' Giarrusso
2005-09-10 17:44 ` [uml-devel] [patch 2/7] i386 / uml: add dwarf sections to static link script Paolo 'Blaisorblade' Giarrusso
2005-09-10 18:38 ` [uml-devel] " Sam Ravnborg
2005-09-10 17:44 ` [uml-devel] [patch 3/7] x86_64 linker script cleanups for debug sections Paolo 'Blaisorblade' Giarrusso
2005-09-10 17:44 ` [uml-devel] [patch 4/7] uml: inline mk_pte and various friends Paolo 'Blaisorblade' Giarrusso
2005-09-10 17:44 ` Paolo 'Blaisorblade' Giarrusso [this message]
2005-09-10 17:44 ` [uml-devel] [patch 6/7] uml: avoid already done dirtying Paolo 'Blaisorblade' Giarrusso
2005-09-10 17:44 ` [uml-devel] [patch 7/7] uml: retry host close() on EINTR Paolo 'Blaisorblade' Giarrusso
2005-09-10 19:00 ` [uml-devel] " Linus Torvalds
2005-09-11 7:28 ` Paolo Ornati
2005-09-11 11:49 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050910174629.286344000@zion.home.lan \
--to=blaisorblade@yahoo.it \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox