linux_old1/arch/hexagon/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
..
Makefile Hexagon: add screen_info for VGA_CONSOLE 2014-04-04 18:20:01 -05:00
asm-offsets.c Hexagon: update copyright dates 2013-04-30 19:40:27 -05:00
dma.c Hexagon: use correct translations for DMA mappings 2013-04-30 19:40:28 -05:00
head.S Hexagon: update copyright dates 2013-04-30 19:40:27 -05:00
hexagon_ksyms.c arch: hexagon: kernel: hexagon_ksyms.c: export related symbols which various modules need 2014-04-04 18:20:00 -05:00
irq_cpu.c Hexagon: Copyright marking changes 2012-10-18 17:07:21 -05:00
kgdb.c hexagon: kernel: kgdb: include related header for pass compiling. 2014-04-04 18:19:59 -05:00
module.c Hexagon: Copyright marking changes 2012-10-18 17:07:21 -05:00
process.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel 2013-05-01 07:43:05 -07:00
ptrace.c Hexagon: set the e_flags in user regset view for core dumps 2014-04-04 18:20:02 -05:00
reset.c arch: hexagon: kernel: reset.c: use function pointer instead of function for pm_power_off and export it 2014-04-04 18:20:00 -05:00
screen_info.c Hexagon: add screen_info for VGA_CONSOLE 2014-04-04 18:20:01 -05:00
setup.c hexagon: Fix build failures in linux-next 2014-12-16 13:27:12 -06:00
signal.c all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
smp.c smp, hexagon: kill SMP single function call interrupt 2014-04-04 18:20:01 -05:00
stacktrace.c Hexagon: Copyright marking changes 2012-10-18 17:07:21 -05:00
syscalltab.c Hexagon: Copyright marking changes 2012-10-18 17:07:21 -05:00
time.c arch: hexagon: kernel: add export symbol function __delay() 2014-04-04 18:19:59 -05:00
trampoline.S Hexagon: Copyright marking changes 2012-10-18 17:07:21 -05:00
traps.c Hexagon: fix signal delivery for debug traps 2014-12-16 13:27:39 -06:00
vdso.c Hexagon: Copyright marking changes 2012-10-18 17:07:21 -05:00
vm_entry.S Hexagon: fix register used to call do_work_pending 2013-05-07 11:37:53 -05:00
vm_events.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel 2013-05-01 07:43:05 -07:00
vm_init_segtable.S Hexagon: Copyright marking changes 2012-10-18 17:07:21 -05:00
vm_ops.S Hexagon: Copyright marking changes 2012-10-18 17:07:21 -05:00
vm_switch.S Hexagon: Copyright marking changes 2012-10-18 17:07:21 -05:00
vm_vectors.S Hexagon: update copyright dates 2013-04-30 19:40:27 -05:00
vmlinux.lds.S Hexagon: fix alignment of init_task in RW_DATA_SECTION 2014-12-16 13:27:22 -06:00