[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060913100500.4e41ef8e@cad-250-152.norway.atmel.com>
Date: Wed, 13 Sep 2006 10:05:00 +0200
From: Haavard Skinnemoen <hskinnemoen@...el.com>
To: Andrew Morton <akpm@...l.org>
Cc: linux-kernel@...r.kernel.org, Jason Baron <jbaron@...hat.com>
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@...el.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists