android_kernel_oneplus_msm8998/arch/arc/include/asm
Vineet Gupta cfebfe7a80 ARC: mm: allow mprotect to make stack mappings executable
commit 93312b6da4df31e4102ce5420e6217135a16c7ea upstream.

mprotect(EXEC) was failing for stack mappings as default vm flags was
missing MAYEXEC.

This was triggered by glibc test suite nptl/tst-execstack testcase

What is surprising is that despite running LTP for years on, we didn't
catch this issue as it lacks a directed test case.

gcc dejagnu tests with nested functions also requiring exec stack work
fine though because they rely on the GNU_STACK segment spit out by
compiler and handled in kernel elf loader.

This glibc case is different as the stack is non exec to begin with and
a dlopen of shared lib with GNU_STACK segment triggers the exec stack
proceedings using a mprotect(PROT_EXEC) which was broken.

CC: stable@vger.kernel.org
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25 10:18:16 +02:00
..
arcregs.h ARC: build: Better way to detect ISA compatible toolchain 2016-09-07 08:32:42 +02:00
asm-offsets.h ARC: Generic Headers 2013-01-28 12:34:21 +05:30
atomic.h atomic, arch: Audit atomic_{read,set}() 2015-09-23 09:54:28 +02:00
barrier.h ARCv2: barriers 2015-06-25 06:00:17 +05:30
bitops.h ARC: bitops: Remove non relevant comments 2016-04-12 09:08:56 -07:00
bug.h ARC: BUG() dumps stack after @msg (@msg now same as in generic BUG)) 2014-10-13 14:46:18 +05:30
cache.h ARCv2: PAE40: Explicitly set MSB counterpart of SLC region ops addresses 2017-08-30 10:19:22 +02:00
cacheflush.h ARC: mm: arc700: Don't assume 2 colours for aliasing VIPT dcache 2017-01-09 08:07:48 +01:00
checksum.h ARC: Checksum/byteorder/swab routines 2013-02-11 20:00:34 +05:30
clk.h ARC: [DeviceTree] Convert some Kconfig items to runtime values 2013-02-15 23:15:56 +05:30
cmpxchg.h ARC: add/fix some comments in code - no functional change 2015-08-20 19:05:49 +05:30
current.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
delay.h ARC: udelay: fix inline assembler by adding LP_COUNT to clobber list 2017-02-01 08:30:53 +01:00
disasm.h ARC: disassembly (needed by kprobes/kgdb/unaligned-access-emul) 2013-02-15 23:16:04 +05:30
dma-mapping.h Merge branch 'akpm' (patches from Andrew) 2015-07-01 17:47:51 -07:00
dma.h ARC: I/O and DMA Mappings 2013-02-15 23:15:54 +05:30
elf.h ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
entry-arcv2.h ARCv2: save r30 on kernel entry as gcc uses it for code-gen 2017-05-02 21:19:56 -07:00
entry-compact.h ARC: [arcompact] entry.S: Improve early return from exception 2015-10-17 17:48:22 +05:30
entry.h ARC: use correct offset in pt_regs for saving/restoring user mode r25 2016-09-07 08:32:42 +02:00
exec.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
futex.h futex: Remove duplicated code and fix undefined behaviour 2018-05-26 08:48:50 +02:00
highmem.h ARC: mm: HIGHMEM: kmap API implementation 2015-10-28 19:49:04 +05:30
hugepage.h ARCv2: mm: THP: Implement flush_pmd_tlb_range() optimization 2015-10-17 17:48:21 +05:30
io.h ARC: Add missing io barriers to io{read,write}{16,32}be() 2016-05-11 11:21:20 +02:00
irq.h ARC: smp: irqchip: handle IPI as percpu irq like timer 2015-10-28 16:13:39 +05:30
irqflags-arcv2.h ARCv2: SMP: Emulate IPI to self using software triggered interrupt 2016-03-03 15:07:28 -08:00
irqflags-compact.h ARC: Call trace_hardirqs_on() before enabling irqs 2016-09-07 08:32:42 +02:00
irqflags.h ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
Kbuild Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
kdebug.h ARC: Fundamental ARCH data-types/defines 2013-02-11 20:00:34 +05:30
kgdb.h ARC: Update order of registers in KGDB to match GDB 7.5 2014-10-13 14:46:20 +05:30
kmap_types.h ARC: mm: HIGHMEM: kmap API implementation 2015-10-28 19:49:04 +05:30
kprobes.h ARC: Remove explicit passing around of ECR 2013-06-26 15:30:50 +05:30
linkage.h ARC: switch to generic ENTRY/END assembler annotations 2014-03-26 14:31:28 +05:30
mach_desc.h ARC: smp: Rename platform hook @init_cpu_smp -> @init_per_cpu 2015-12-17 12:56:56 +05:30
mcip.h ARCv2: smp: [plat-*]: No need to explicitly call mcip_init_smp() 2015-10-28 16:13:41 +05:30
mmu.h ARC: mm: PAE40 support 2015-10-29 18:41:30 +05:30
mmu_context.h ARC: [SMP] TLB flush 2013-11-06 10:41:45 +05:30
module.h ARC: DWARF2 .debug_frame based stack unwinder 2013-02-15 23:16:03 +05:30
mutex.h ARC: SMP support 2013-02-15 23:16:02 +05:30
page.h ARC: mm: allow mprotect to make stack mappings executable 2018-07-25 10:18:16 +02:00
perf_event.h ARCv2: perf: Finally introduce HS perf unit 2015-08-27 14:59:07 +05:30
pgalloc.h ARC: mm: PAE40 support 2015-10-29 18:41:30 +05:30
pgtable.h ARC: Fix CONFIG_SWAP 2018-07-25 10:18:15 +02:00
processor.h ARC: cpu_relax() to be compiler barrier even for UP 2015-11-14 13:12:30 +05:30
ptrace.h ARCv2: save r30 on kernel entry as gcc uses it for code-gen 2017-05-02 21:19:56 -07:00
sections.h of/fdt: consolidate built-in dtb section variables 2014-04-30 00:59:13 -05:00
segment.h ARC: uaccess friends 2013-02-11 20:00:31 +05:30
serial.h ARC: Dynamically determine BASE_BAUD from DeviceTree 2015-02-02 17:08:37 +05:30
setup.h ARC: boot log: move helper macros to header for reuse 2015-10-17 17:48:25 +05:30
shmparam.h ARC: [mm] Aliasing VIPT dcache support 4/4 2013-05-09 22:00:57 +05:30
smp.h ARC: rename smp operation init_irq_cpu() to init_per_cpu() 2015-12-17 12:56:43 +05:30
spinlock.h ARCv2: spinlock/rwlock/atomics: reduce 1 instruction in exponential backoff 2015-08-07 13:56:16 +05:30
spinlock_types.h ARC: LLOCK/SCOND based rwlock 2015-08-04 09:26:33 +05:30
stacktrace.h ARC: Make arc_unwind_core accessible externally 2015-02-27 10:15:00 +05:30
string.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
switch_to.h ARC: Process-creation/scheduling/idle-loop 2013-02-11 20:00:38 +05:30
syscall.h ARC: stop using pt_regs->orig_r8 2013-06-22 19:23:26 +05:30
syscalls.h ARC: remove extraneous __KERNEL__ guards 2014-10-13 14:46:20 +05:30
thread_info.h ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
timex.h ARC: Timers/counters/delay management 2013-02-11 20:00:39 +05:30
tlb-mmu1.h ARC: Disintegrate arcregs.h 2013-06-22 13:46:42 +05:30
tlb.h ARC: Disintegrate arcregs.h 2013-06-22 13:46:42 +05:30
tlbflush.h ARCv2: mm: THP: flush_pmd_tlb_range make SMP safe 2015-10-17 17:48:21 +05:30
uaccess.h ARC: uaccess: dont use "l" gcc inline asm constraint modifier 2018-01-10 09:27:11 +01:00
unaligned.h ARC: rename kconfig option for unaligned emulation 2014-10-13 14:46:15 +05:30
unwind.h ARC: dw2 unwind: Reinstante unwinding out of modules 2015-12-17 11:10:23 +05:30