linux/arch/blackfin/include/asm
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
..
Kbuild Blackfin arch: cleanup bfin_sport.h header and export it to userspace 2009-03-05 19:42:43 +08:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
atomic.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
auxvec.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
bfin-global.h Blackfin: support smaller uncached DMA chunks for memory constrained systems 2009-12-15 00:15:48 -05:00
bfin-lq035q1.h fbdev: bfin-lq035q1-fb: new Blackfin Landscape LCD EZ-Extender driver 2009-12-16 07:20:01 -08:00
bfin5xx_spi.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
bfin_rotary.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
bfin_sdh.h Blackfin arch: add SDIO host driver platform data 2009-01-07 23:14:38 +08:00
bfin_simple_timer.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
bfin_sport.h Blackfin arch: clean up sports header file 2009-03-28 20:38:17 +08:00
bfrom.h Blackfin arch: Update some inline assembly, tweak some register constraints 2009-01-07 23:14:39 +08:00
bitops.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
blackfin.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
bug.h Blackfin: Convert BUG() to use unreachable() 2009-12-15 08:38:35 -05:00
bugs.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
byteorder.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
cache.h Blackfin: fix missed cache config renames 2009-10-07 04:48:08 -04:00
cacheflush.h Blackfin: push down asm/ includes and out of bfin-global.h 2009-12-15 00:14:14 -05:00
cdef_LPBlackfin.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
checksum.h Blackfin: convert to generic checksum code 2009-12-15 00:13:32 -05:00
clocks.h Blackfin: pull in asm/dpmc.h for power defines 2009-12-15 00:14:50 -05:00
context.S Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
cplb.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
cplbinit.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
cpu.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
cputime.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
current.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
def_LPBlackfin.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
delay.h Blackfin arch: Remove outdated code 2009-02-04 16:49:45 +08:00
device.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
div64.h
dma-mapping.h Blackfin: dma-mapping.h: flesh out missing DMA mapping functions 2009-12-15 00:16:01 -05:00
dma.h Blackfin: dma-mapping.h: flesh out missing DMA mapping functions 2009-12-15 00:16:01 -05:00
dpmc.h Blackfin: unify duplicated power masks 2009-12-15 00:14:53 -05:00
early_printk.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
elf.h elf: kill USE_ELF_CORE_DUMP 2009-12-16 07:20:12 -08:00
emergency-restart.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
entry.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
errno.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
fb.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
fcntl.h vfs: Implement proper O_SYNC semantics 2009-12-10 15:02:50 +01:00
fixed_code.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
flat.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
ftrace.h Blackfin: update ftrace for latest toolchain 2009-09-16 22:10:52 -04:00
futex.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
gpio.h Blackfin: bf538: add support for extended GPIO banks 2009-12-15 00:14:05 -05:00
gptimers.h Blackfin: gptimers: use unsigned timer/group ids 2009-12-15 00:15:30 -05:00
hardirq.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
hw_irq.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
io.h Blackfin: io.h: fix random busted whitespace 2009-12-15 00:16:04 -05:00
ioctl.h
ioctls.h Blackfin: convert asm/ioctls.h to asm-generic/ioctls.h 2009-06-18 21:40:53 -04:00
ipcbuf.h Blackfin: convert shm/sysv/ipc to asm-generic 2009-06-18 21:40:58 -04:00
ipipe.h Blackfin/ipipe: update version stamp 2009-12-15 00:15:21 -05:00
ipipe_base.h Blackfin/ipipe: prepare status bitops for SMP support 2009-12-15 00:15:12 -05:00
irq.h Blackfin: asm/irq.h: pull in mach/anomaly.h for anomaly defines 2009-10-07 04:48:01 -04:00
irq_handler.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
irq_regs.h
irqflags.h Blackfin/ipipe: fix forward ref to barrier() 2009-12-15 00:15:15 -05:00
kdebug.h
kgdb.h Blackfin: kgdb: punt dead code 2009-12-15 00:15:40 -05:00
kmap_types.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
l1layout.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
linkage.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
local.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
mem_init.h Blackfin: punt dead/unused flash mem_init settings 2009-12-15 00:15:33 -05:00
mem_map.h Blackfin: unify memory map headers 2009-06-22 21:16:07 -04:00
mman.h Blackfin: convert signal/mmap to asm-generic 2009-06-18 21:41:26 -04:00
mmu.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
mmu_context.h Blackfin/ipipe: introduce support for CONFIG_MPU 2009-12-15 00:15:18 -05:00
module.h module: make MODULE_SYMBOL_PREFIX into a CONFIG option 2009-12-15 16:28:26 +10:30
msgbuf.h Blackfin: convert shm/sysv/ipc to asm-generic 2009-06-18 21:40:58 -04:00
mutex.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
nand.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
page.h FDPIC: Respect PT_GNU_STACK exec protection markings when creating NOMMU stack 2010-01-06 18:16:02 -08:00
page_offset.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
param.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
pci.h Blackfin: convert to asm-generic pci headers 2009-12-15 00:16:07 -05:00
pda.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
percpu.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
pgalloc.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
pgtable.h Blackfin: fix framebuffer mmap bug for nommu 2009-10-08 00:58:15 -04:00
poll.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
portmux.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
posix_types.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
processor.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
ptrace.h Blackfin: comment the FDPIC PTRACE defines 2009-12-15 00:15:23 -05:00
reboot.h Blackfin arch: Fix bug - Run "reboot" hangs bf518-ezbrd 2009-02-04 16:49:45 +08:00
resource.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
rwlock.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
scatterlist.h
sections.h Blackfin: calculate on-chip lengths at link time rather than run time 2009-12-15 00:13:55 -05:00
segment.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
sembuf.h Blackfin: convert shm/sysv/ipc to asm-generic 2009-06-18 21:40:58 -04:00
serial.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
setup.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
shmbuf.h Blackfin: convert shm/sysv/ipc to asm-generic 2009-06-18 21:40:58 -04:00
shmparam.h Blackfin: convert shm/sysv/ipc to asm-generic 2009-06-18 21:40:58 -04:00
sigcontext.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
siginfo.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
signal.h Blackfin: convert signal/mmap to asm-generic 2009-06-18 21:41:26 -04:00
smp.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
socket.h Blackfin: convert socket/poll to asm-generic 2009-06-18 21:41:08 -04:00
sockios.h Blackfin: convert socket/poll to asm-generic 2009-06-18 21:41:08 -04:00
spinlock.h locking: Convert raw_rwlock functions to arch_rwlock 2009-12-14 23:55:32 +01:00
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
stat.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
statfs.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
string.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
swab.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
system.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
termbits.h Blackfin: convert termios to asm-generic 2009-06-18 21:41:17 -04:00
termios.h Blackfin: convert termios to asm-generic 2009-06-18 21:41:17 -04:00
thread_info.h Blackfin: add support for TIF_NOTIFY_RESUME 2009-12-15 00:16:52 -05:00
time.h Blackfin: add support for gptimer0 as a tick source 2009-06-12 06:11:37 -04:00
timex.h Blackfin arch: make sure cycles is marked as volatile so gcc doesnt reorder on us 2008-10-16 23:55:41 +08:00
tlb.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
tlbflush.h Blackfin: convert page/tlb to asm-generic 2009-06-18 21:42:30 -04:00
topology.h Blackfin: convert simple headers to asm-generic 2009-06-18 21:41:13 -04:00
trace.h Blackfin: add C define of trace_buffer_init() 2009-12-15 00:14:03 -05:00
traps.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
types.h Blackfin: convert types to asm-generic 2009-06-18 21:42:24 -04:00
uaccess.h Blackfin: push down asm/ includes and out of bfin-global.h 2009-12-15 00:14:14 -05:00
ucontext.h Blackfin: convert page/tlb to asm-generic 2009-06-18 21:42:30 -04:00
unaligned.h Blackfin: convert locking primitives to asm-generic 2009-06-18 21:41:22 -04:00
unistd.h Blackfin: define __NR_recvmmsg 2009-12-15 04:07:32 -05:00
user.h Blackfin: convert user/elf to asm-generic 2009-06-18 21:41:03 -04:00
xor.h Blackfin arch: use generic xor.h 2008-11-18 17:48:22 +08:00