[patch 32/39] remap_file_pages protection support: fix i386 handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux