lkml.org 
[lkml]   [2006]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[-mm patch] AVR32: Make PROT_WRITE | PROT_EXEC imply PROT_READ
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@atmel.com>
---
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@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: 2006-09-13 10:07    [W:1.387 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site