lkml.org 
[lkml]   [2005]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch 32/39] remap_file_pages protection support: fix i386 handler
From
Date

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

Actually, with the current model, we should get a failure with VMA's mapped
with only PROT_WRITE (even if I wasn't able to verify that in UML, which has
similar code).

To test!

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

linux-2.6.git-paolo/arch/i386/mm/fault.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN arch/i386/mm/fault.c~rfp-fault-sigsegv-3-i386 arch/i386/mm/fault.c
--- linux-2.6.git/arch/i386/mm/fault.c~rfp-fault-sigsegv-3-i386 2005-08-12 17:12:51.000000000 +0200
+++ linux-2.6.git-paolo/arch/i386/mm/fault.c 2005-08-12 17:12:51.000000000 +0200
@@ -381,7 +381,8 @@ bad_area_prot:
* requirements... we should always test just
* pte_read/write/exec, on vma->vm_page_prot! This way is
* cumbersome. However, for now things should work for i386. */
- access_mask |= vma->vm_flags & VM_EXEC ? VM_EXEC : VM_READ;
+ access_mask |= vma->vm_flags & VM_EXEC ? VM_EXEC :
+ (vma->vm_flags & VM_READ ? VM_READ : VM_WRITE );
goto handle_fault;
}
/*
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-08-12 20:56    [W:0.047 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site