linux/arch/microblaze/kernel
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
..
cpu microblaze: Add target architecture 2015-01-08 08:37:22 +01:00
.gitignore microblaze: Add .gitignore entries for auto-generated files 2013-02-12 11:24:44 +01:00
asm-offsets.c microblaze: Remove "cache" optimized copy_page function 2010-05-06 11:21:58 +02:00
dma.c microblaze: Fix mmap for cache coherent memory 2014-12-17 12:59:59 +01:00
early_printk.c early_printk: consolidate random copies of identical code 2013-04-29 18:28:13 -07:00
entry-nommu.S microblaze: fix handling of multiple pending signals 2013-02-03 18:16:02 -05:00
entry.S microblaze: Move restart allowed out of block 2013-02-03 18:16:02 -05:00
exceptions.c microblaze: Do not use module.h in files which are not modules 2013-02-12 11:24:45 +01:00
ftrace.c microblaze: ftrace: Add call to ftrace_graph_is_dead() in function graph code 2014-07-18 13:55:45 -04:00
head.S microblaze: Fix typo in head.S s/substract/subtract/ 2014-06-05 13:02:02 +02:00
heartbeat.c microblaze: Rename global function heartbeat() 2014-03-12 10:10:06 +01:00
hw_exception_handler.S microblaze: Fix compilation error for BS=0 2014-01-27 11:26:33 +01:00
intc.c microblaze: intc: Reformat output 2015-01-08 08:37:24 +01:00
irq.c microblaze: intc: Using irqchip 2013-09-03 11:24:48 +02:00
kgdb.c microblaze: Use unsigned type for "for" loop because of comparison-kgdb.c 2015-01-05 12:36:45 +01:00
Makefile microblaze: Remove unused prom_parse.c 2015-01-05 12:36:41 +01:00
mcount.S microblaze: ftrace: Remove check of obsolete variable function_trace_stop 2014-07-18 13:57:08 -04:00
microblaze_ksyms.c microblaze: Do not use module.h in files which are not modules 2013-02-12 11:24:45 +01:00
misc.S microblaze: Handle TLB skip size dynamically 2012-03-23 09:28:19 +01:00
module.c microblaze: Do not use module.h in files which are not modules 2013-02-12 11:24:45 +01:00
platform.c microblaze: Remove platform folder 2014-04-07 13:45:21 +02:00
process.c microblaze: Fix sparse warning because of missing cpu.h header 2014-04-07 13:45:17 +02:00
prom.c of/fdt: create common debugfs 2014-04-30 00:59:16 -05:00
ptrace.c microblaze: Use unsigned return type in do_syscall_trace_enter 2015-01-05 12:36:43 +01:00
reset.c microblaze: Remove unused prom header from reset.c 2015-01-05 12:36:42 +01:00
setup.c microblaze: remove check for CONFIG_XILINX_CONSOLE 2014-06-04 07:00:00 +02:00
signal.c all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
stacktrace.c microblaze: Do not use module.h in files which are not modules 2013-02-12 11:24:45 +01:00
sys_microblaze.c microblaze: Fix bug with mmap2 syscall MB implementation 2013-11-08 15:20:44 +01:00
syscall_table.S microblaze: Wire-up execveat syscall 2015-01-05 12:36:40 +01:00
timer.c microblaze: include the new timecounter header. 2015-01-02 16:47:36 -05:00
traps.c dump_stack: consolidate dump_stack() implementations and unify their behaviors 2013-04-30 17:04:02 -07:00
unwind.c microblaze: Mark get_frame_size as static 2015-01-05 12:36:44 +01:00
vmlinux.lds.S microblaze: Add NOTES section to linker script 2014-01-27 11:25:01 +01:00