android_kernel_xiaomi_sm8350/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
..
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
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
bfin_simple_timer.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
bfin_sport.h
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
bfrom.h
bitops.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
bitsperlong.h
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
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
current.h
def_LPBlackfin.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
delay.h
device.h
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
entry.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
errno.h
fb.h
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
futex.h
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
io.h Blackfin: io.h: fix random busted whitespace 2009-12-15 00:16:04 -05:00
ioctl.h
ioctls.h
ipcbuf.h
ipipe_base.h Blackfin/ipipe: prepare status bitops for SMP support 2009-12-15 00:15:12 -05:00
ipipe.h Blackfin/ipipe: update version stamp 2009-12-15 00:15:21 -05:00
irq_handler.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
irq_regs.h
irq.h Blackfin: asm/irq.h: pull in mach/anomaly.h for anomaly defines 2009-10-07 04:48:01 -04:00
irqflags.h Blackfin/ipipe: fix forward ref to barrier() 2009-12-15 00:15:15 -05:00
Kbuild
kdebug.h
kgdb.h Blackfin: kgdb: punt dead code 2009-12-15 00:15:40 -05:00
kmap_types.h
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
mem_init.h Blackfin: punt dead/unused flash mem_init settings 2009-12-15 00:15:33 -05:00
mem_map.h
mman.h
mmu_context.h Blackfin/ipipe: introduce support for CONFIG_MPU 2009-12-15 00:15:18 -05:00
mmu.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
module.h module: make MODULE_SYMBOL_PREFIX into a CONFIG option 2009-12-15 16:28:26 +10:30
msgbuf.h
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_offset.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
param.h
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
pgalloc.h
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
resource.h
rwlock.h
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
serial.h
setup.h
shmbuf.h
shmparam.h
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
smp.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
socket.h
sockios.h
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
spinlock.h locking: Convert raw_rwlock functions 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
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
termios.h
thread_info.h Blackfin: add support for TIF_NOTIFY_RESUME 2009-12-15 00:16:52 -05:00
time.h
timex.h
tlb.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
tlbflush.h
topology.h
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
uaccess.h Blackfin: push down asm/ includes and out of bfin-global.h 2009-12-15 00:14:14 -05:00
ucontext.h
unaligned.h
unistd.h Blackfin: define __NR_recvmmsg 2009-12-15 04:07:32 -05:00
user.h
xor.h