linux/arch/tile/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
..
vdso tile: add clock_gettime support to vDSO 2014-10-02 13:56:07 -04:00
Makefile tile/perf: Support perf_events on tilegx and tilepro 2014-03-07 11:19:48 -05:00
asm-offsets.c
backtrace.c
compat.c
compat_signal.c tile: Use get_signal() signal_setup_done() 2014-08-06 13:03:20 +02:00
early_printk.c printk: remove used-once early_vprintk 2014-12-10 17:41:10 -08:00
entry.S
ftrace.c ftrace: Do not pass data to ftrace_dyn_arch_init 2014-03-07 10:06:14 -05:00
hardwall.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
head_32.S
head_64.S
hvglue.S
hvglue_trace.c
intvec_32.S tile: Enable NMIs on return from handle_nmi() without errors 2014-03-07 11:19:48 -05:00
intvec_64.S tile: Enable NMIs on return from handle_nmi() without errors 2014-03-07 11:19:48 -05:00
irq.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
kgdb.c arch: tile: kernel: kgdb.c: Use memcpy() instead of pointer copy one by one 2014-11-12 14:27:10 -05:00
kprobes.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
machine_kexec.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
mcount_64.S tile: ftrace: Remove check of obsolete variable function_trace_stop 2014-07-18 13:57:03 -04:00
messaging.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
module.c module: remove mod arg from module_free, rename module_memfree(). 2015-01-20 11:38:33 +10:30
pci-dma.c
pci.c tile: use PCI define for Max_Read_Request_Size 2015-01-27 08:14:26 -06:00
pci_gx.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2014-12-16 13:54:16 -08:00
perf_event.c tile: Use this_cpu_ptr() for hardware counters 2014-08-26 13:45:55 -04:00
pmc.c tile: Add support for handling PMC hardware 2014-03-07 11:19:47 -05:00
proc.c tile: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:15 -07:00
process.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
ptrace.c
reboot.c
regs_32.S
regs_64.S
relocate_kernel_32.S
relocate_kernel_64.S
setup.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2014-12-16 13:54:16 -08:00
signal.c all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
single_step.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
smp.c Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
smpboot.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
stack.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
sys.c
sysfs.c
tile-desc_32.c
tile-desc_64.c
time.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
tlb.c
traps.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
unaligned.c tile: Use the more common pr_warn instead of pr_warning 2014-11-11 15:51:42 -05:00
usb.c
vdso.c arm64,ia64,ppc,s390,sh,tile,um,x86,mm: remove default gate area 2014-08-08 15:57:27 -07:00
vmlinux.lds.S tile: Remove tile-specific _sinitdata and _einitdata 2014-10-02 10:19:33 -04:00