OrangePi_CM5/arch/microblaze/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
..
Kbuild net, lib: kill arch_fast_hash library bits 2014-12-10 15:17:46 -05:00
asm-compat.h
…
asm-offsets.h
…
atomic.h
…
bitops.h
…
bug.h
…
bugs.h
…
cache.h
…
cacheflush.h microblaze: Use static inline functions in cacheflush.h 2013-06-03 11:33:23 +02:00
checksum.h
…
cmpxchg.h
…
cpuinfo.h microblaze: Add support for CCF 2014-01-27 11:24:55 +01:00
cputable.h
…
current.h
…
delay.h microblaze: Change extern inline to static inline 2015-01-05 12:36:44 +01:00
div64.h
…
dma-mapping.h microblaze: Remove device_to_mask 2014-06-04 06:59:58 +02:00
dma.h
…
elf.h
…
emergency-restart.h
…
entry.h arch/microblaze/include/asm/entry.h: Include "linux/linkage.h" to avoid compiling issue 2014-09-09 13:10:20 +02:00
exceptions.h
…
fb.h
…
fixmap.h microblaze: use generic fixmap.h 2014-01-23 16:36:54 -08:00
flat.h
…
ftrace.h
…
futex.h microblaze: Reversed logic in futex cmpxchg 2013-05-27 12:29:35 +02:00
gpio.h
…
hardirq.h
…
highmem.h
…
hw_irq.h
…
io.h microblaze: io: remove dummy relaxed accessor macros 2014-10-20 18:49:17 +01:00
irq.h
…
irq_regs.h
…
irqflags.h
…
kdebug.h
…
kgdb.h microblaze: Declare microblaze_kgdb_break in header 2015-01-05 12:36:42 +01:00
kmap_types.h
…
linkage.h microblaze: Use empty asm-generic/linkage.h 2015-01-05 12:36:39 +01:00
local.h
…
local64.h
…
mmu.h
…
mmu_context.h
…
mmu_context_mm.h
…
module.h
…
mutex.h
…
page.h mm/microblaze: clean up unused VALID_PAGE() 2013-07-03 16:07:40 -07:00
parport.h
…
pci-bridge.h
…
pci.h Microblaze patches for 3.16-rc1 2014-06-05 16:15:33 -07:00
percpu.h
…
pgalloc.h microblaze: Change extern inline to static inline 2015-01-05 12:36:44 +01:00
pgtable.h mm: make FIRST_USER_ADDRESS unsigned long on all archs 2015-02-11 17:06:03 -08:00
processor.h arch, locking: Ciao arch_mutex_cpu_relax() 2014-07-17 12:32:47 +02:00
prom.h of: remove HAVE_ARCH_DEVTREE_FIXUPS 2013-10-09 20:04:08 -05:00
ptrace.h
…
pvr.h
…
registers.h
…
seccomp.h
…
sections.h microblaze: Remove duplicate declarations of _stext[] and _etext[] 2014-01-21 08:28:19 +01:00
serial.h
…
setup.h microblaze: Drop architecture-specific declaration of early_printk 2014-03-12 10:10:07 +01:00
shmparam.h
…
string.h
…
switch_to.h
…
syscall.h microblaze: Use unsigned return type in do_syscall_trace_enter 2015-01-05 12:36:43 +01:00
thread_info.h all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
timex.h
…
tlb.h mmu_gather: move minimal range calculations into generic code 2014-11-17 10:12:42 +00:00
tlbflush.h
…
topology.h
…
uaccess.h microblaze: whitespace fix 2015-01-08 08:37:25 +01:00
ucontext.h
…
unaligned.h
…
unistd.h microblaze: Wire-up execveat syscall 2015-01-05 12:36:40 +01:00
unwind.h
…
user.h
…
vga.h
…
xor.h
…