linux/arch/arc/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
..
.gitignore ARC: Add some .gitignore entries 2013-08-26 09:40:24 +05:30
Makefile ARC: rename kconfig option for unaligned emulation 2014-10-13 14:46:15 +05:30
arc_hostlink.c ARC: Hostlink Pseudo-Driver for Metaware Debugger 2013-02-15 23:16:10 +05:30
arcksyms.c
asm-offsets.c ARC: pt_regs update #5: Use real ECR for pt_regs->event vs. synth values 2013-06-26 14:04:48 +05:30
clk.c ARC: fix typo with clock speed 2013-05-07 13:43:54 +05:30
ctx_sw.c ARC: [SMP] Fix build failures for large NR_CPUS 2013-11-06 10:41:46 +05:30
ctx_sw_asm.S ARC: Fix build breakage for !CONFIG_ARC_DW2_UNWIND 2014-06-26 10:14:02 +05:30
devtree.c ARC: fix build warning in devtree 2014-06-23 11:50:26 +05:30
disasm.c ARC: rename kconfig option for unaligned emulation 2014-10-13 14:46:15 +05:30
entry.S ARC: Fixed spelling errors within comments 2014-05-05 14:22:12 +05:30
fpu.c ARC: Process-creation/scheduling/idle-loop 2013-02-11 20:00:38 +05:30
head.S ARC: RIP @running_on_hw 2014-10-13 14:46:17 +05:30
irq.c ARC: [intc] mask/unmask can be hidden again 2014-07-23 11:22:02 +05:30
kgdb.c ARC: kgdb: generic kgdb_arch_pc() suffices 2014-10-22 16:14:04 -06:00
kprobes.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-11-15 16:47:22 -08:00
module.c ARC: Fix coding style issues 2013-04-09 12:21:14 +05:30
perf_event.c ARC: boot: cpu feature print enhancements 2014-10-13 14:46:22 +05:30
process.c ARC: make start_thread() out-of-line 2014-05-05 14:22:12 +05:30
ptrace.c ARC: Implement ptrace(PTRACE_GET_THREAD_AREA) 2014-06-26 10:14:08 +05:30
reset.c arc: export symbol for pm_power_off in reset.c 2013-11-06 10:41:44 +05:30
setup.c ARC: boot: cpu feature print enhancements 2014-10-13 14:46:22 +05:30
signal.c all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
smp.c ARC: R-M-W assist locks only needed for !LLSC 2014-12-12 16:02:34 +05:30
stacktrace.c arc: export symbol for save_stack_trace() in stacktrace.c 2013-11-06 10:41:44 +05:30
sys.c ARC: ABIv3: fork/vfork wrappers not needed in "no-legacy-syscall" ABI 2013-03-11 19:01:10 +05:30
time.c ARC: update some comments 2014-07-23 11:17:12 +05:30
traps.c ARC: Reduce #ifdef'ery for unaligned access emulation 2013-11-06 10:41:39 +05:30
troubleshoot.c arc: call find_vma with the mmap_sem held 2014-06-04 16:54:00 -07:00
unaligned.c ARC: Handle zero-overhead-loop in unaligned access handler 2013-09-27 16:28:23 +05:30
unwind.c ARC: warn on improper stack unwind FDE entries 2013-06-27 14:37:59 +05:30
vmlinux.lds.S ARC: optimize kernel bss clearing in early boot code 2014-06-26 10:14:05 +05:30