[-mm patch] AVR32: Make PROT_WRITE | PROT_EXEC imply PROT_READ

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

 



The AVR32 MMU has three protection bits for allowing unprivileged
access, write access and execute access respectively. There is no
way to deny read access while allowing write or execute access.

make-prot_write-imply-prot_read.patch in mm does basically the same
thing for several other architectures. One important difference is
that this patch makes PROT_EXEC imply PROT_READ as well, but it looks
like this is the case for most other architectures already.

Signed-off-by: Haavard Skinnemoen <[email protected]>
---
 arch/avr32/mm/fault.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.18-rc5-mm1/arch/avr32/mm/fault.c
===================================================================
--- linux-2.6.18-rc5-mm1.orig/arch/avr32/mm/fault.c	2006-09-06 16:57:46.000000000 +0200
+++ linux-2.6.18-rc5-mm1/arch/avr32/mm/fault.c	2006-09-06 17:02:46.000000000 +0200
@@ -134,7 +134,7 @@ good_area:
 		break;
 	case ECR_PROTECTION_R:
 	case ECR_TLB_MISS_R:
-		if (!(vma->vm_flags & VM_READ))
+		if (!(vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)))
 			goto bad_area;
 		break;
 	case ECR_PROTECTION_W:
-
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]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux