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

From: Haavard Skinnemoen
Date: Wed Sep 13 2006 - 04:04:31 EST


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 <hskinnemoen@xxxxxxxxx>
---
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/