From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> --- 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 [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/