linux/arch/blackfin
Mike Frysinger 04e4f2b18c FDPIC: Respect PT_GNU_STACK exec protection markings when creating NOMMU stack
The current code will load the stack size and protection markings, but
then only use the markings in the MMU code path.  The NOMMU code path
always passes PROT_EXEC to the mmap() call.  While this doesn't matter
to most people whilst the code is running, it will cause a pointless
icache flush when starting every FDPIC application.  Typically this
icache flush will be of a region on the order of 128KB in size, or may
be the entire icache, depending on the facilities available on the CPU.

In the case where the arch default behaviour seems to be desired
(EXSTACK_DEFAULT), we probe VM_STACK_FLAGS for VM_EXEC to determine
whether we should be setting PROT_EXEC or not.

For arches that support an MPU (Memory Protection Unit - an MMU without
the virtual mapping capability), setting PROT_EXEC or not will make an
important difference.

It should be noted that this change also affects the executability of
the brk region, since ELF-FDPIC has that share with the stack.  However,
this is probably irrelevant as NOMMU programs aren't likely to use the
brk region, preferring instead allocation via mmap().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-06 18:16:02 -08:00
..
boot Blackfin: add an uncompressed vmImage target 2009-12-15 00:15:08 -05:00
configs Blackfin: add support for the Acvilon BF561 board 2009-12-15 00:15:10 -05:00
include/asm FDPIC: Respect PT_GNU_STACK exec protection markings when creating NOMMU stack 2010-01-06 18:16:02 -08:00
kernel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin 2009-12-16 10:52:35 -08:00
lib Blackfin: convert to generic checksum code 2009-12-15 00:13:32 -05:00
mach-bf518 Blackfin: BF51x: unify def/cdef headers 2009-12-15 00:16:16 -05:00
mach-bf527 Blackfin: BF52x: unify def/cdef headers 2009-12-15 00:16:13 -05:00
mach-bf533 Blackfin: ip0x: pull in asm/portmux.h for P_xxx defines 2009-12-15 00:16:44 -05:00
mach-bf537 Blackfin: drop unused ax88180 resources 2009-12-15 00:16:43 -05:00
mach-bf538 Blackfin: bf537-stamp: add CAN resources 2009-12-15 00:16:38 -05:00
mach-bf548 Blackfin: bf537-stamp: add CAN resources 2009-12-15 00:16:38 -05:00
mach-bf561 Blackfin: drop unused ax88180 resources 2009-12-15 00:16:43 -05:00
mach-common Blackfin: add support for TIF_NOTIFY_RESUME 2009-12-15 00:16:52 -05:00
mm Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
oprofile Blackfin arch: remove hardware PM code, oprofile not use it 2009-01-07 23:14:39 +08:00
ADI_BSD.txt Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin 2009-12-16 10:52:35 -08:00
Kconfig.debug Blackfin: add some isram-driver self tests 2009-09-16 22:10:36 -04:00
Makefile Blackfin: force BFD target when linking modules 2009-12-15 00:15:25 -05:00