2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 09:13:55 +08:00
linux-next/arch/frv/include/asm
Andy Lutomirski f56141e3e2 all arches, signal: move restart_block to struct task_struct
If an attacker can cause a controlled kernel stack overflow, overwriting
the restart block is a very juicy exploit target.  This is because the
restart_block is held in the same memory allocation as the kernel stack.

Moving the restart block to struct task_struct prevents this exploit by
making the restart_block harder to locate.

Note that there are other fields in thread_info that are also easy
targets, at least on some architectures.

It's also a decent simplification, since the restart code is more or less
identical on all architectures.

[james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: David Miller <davem@davemloft.net>
Acked-by: Richard Weinberger <richard@nod.at>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Steven Miao <realmz6@gmail.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Chen Liqin <liqin.linux@gmail.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-12 18:54:12 -08:00
..
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
atomic.h locking,arch: Use ACCESS_ONCE() instead of cast to volatile in atomic_read() 2014-10-03 06:06:23 +02:00
ax88796.h
barrier.h arch: Clean up asm/barrier.h implementations using asm-generic/barrier.h 2014-01-12 10:37:15 +01:00
bitops.h arch,frv: Convert smp_mb__*() 2014-04-18 14:20:34 +02:00
bug.h Disintegrate asm/system.h for FRV 2012-03-28 18:30:02 +01:00
bugs.h
busctl-regs.h
cache.h FRV: ARCH_KMALLOC_MINALIGN was already defined 2010-05-28 10:17:21 -07:00
cacheflush.h block: add helpers to run flush_dcache_page() against a bio and a request's pages 2009-11-26 09:16:19 +01:00
checksum.h
cmpxchg.h Disintegrate asm/system.h for FRV 2012-03-28 18:30:02 +01:00
cpu-irqs.h
current.h
delay.h
device.h
div64.h
dm9000.h
dma-mapping.h frv: Provide dummy dma_mmap_coherent() and dma_get_sgtable() 2013-01-29 08:11:15 +01:00
dma.h
elf.h default SET_PERSONALITY() in linux/elf.h 2013-02-26 02:46:08 -05:00
emergency-restart.h
fb.h
fpu.h
ftrace.h
futex.h futex: Sanitize futex ops argument types 2011-03-11 12:23:31 +01:00
gdb-stub.h frv: extend gdbstub to support more features of gdb 2010-05-25 08:07:02 -07:00
gpio-regs.h
hardirq.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
highmem.h frv: remove the second parameter of kmap_atomic_primary() 2012-07-23 14:11:22 +08:00
hw_irq.h
io.h frv: io: implement dummy relaxed accessor macros for writes 2014-10-20 18:49:17 +01:00
irc-regs.h
irq_regs.h
irq.h
irqflags.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
Kbuild net, lib: kill arch_fast_hash library bits 2014-12-10 15:17:46 -05:00
kdebug.h
kmap_types.h frv: remove km_type definitions 2012-07-24 15:27:29 +08:00
linkage.h
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
local.h
math-emu.h
mb86943a.h
mb93091-fpga-irqs.h
mb93093-fpga-irqs.h
mb93493-irqs.h
mb93493-regs.h
mb-regs.h
mc146818rtc.h
mem-layout.h dma-mapping: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN 2010-08-11 08:59:21 -07:00
mmu_context.h
mmu.h
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
mutex.h
page.h FDPIC: Respect PT_GNU_STACK exec protection markings when creating NOMMU stack 2010-01-06 18:16:02 -08:00
pci.h PCI: Turn pcibios_penalize_isa_irq() into a weak function 2014-05-27 16:23:58 -06:00
percpu.h
perf_event.h perf, arch: Rework perf_event_index() 2011-12-21 11:01:07 +01:00
pgalloc.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
pgtable.h mm: make FIRST_USER_ADDRESS unsigned long on all archs 2015-02-11 17:06:03 -08:00
processor.h frv: remove unused cpuinfo_frv and friends to fix future build error 2014-10-09 22:26:03 -04:00
ptrace.h UAPI Disintegration 2012-10-10 2012-10-13 11:22:31 +09:00
sections.h
segment.h frv: fix kernel/user segment handling in NOMMU mode 2010-04-07 08:38:05 -07:00
serial-regs.h
serial.h
setup.h UAPI: (Scripted) Disintegrate arch/frv/include/asm 2012-10-10 12:09:42 +01:00
shmparam.h
signal.h frv: switch to generic old sigaction() 2013-02-03 18:15:55 -05:00
smp.h
spinlock.h
spr-regs.h Fix common misspellings 2011-03-31 11:26:23 -03:00
string.h
switch_to.h Disintegrate asm/system.h for FRV 2012-03-28 18:30:02 +01:00
syscall.h FRV: Implement new-style ptrace 2009-06-11 09:01:26 -07:00
termios.h UAPI: (Scripted) Disintegrate arch/frv/include/asm 2012-10-10 12:09:42 +01:00
thread_info.h all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
timer-regs.h
timex.h
tlb.h
tlbflush.h
topology.h
types.h UAPI: (Scripted) Disintegrate arch/frv/include/asm 2012-10-10 12:09:42 +01:00
uaccess.h frv: uaccess s/might_sleep/might_fault/ 2013-05-28 09:41:07 +02:00
ucontext.h
unaligned.h
unistd.h sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL 2014-06-04 16:54:14 -07:00
user.h
vga.h
virtconvert.h Fix common misspellings 2011-03-31 11:26:23 -03:00
xor.h