1
0
Fork 0
alistair23-linux/arch/alpha/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
Makefile alpha: Enable system-call auditing support. 2014-01-31 09:21:55 -08:00
alpha_ksyms.c alpha: Eliminate compiler warning from memset macro 2013-11-16 16:33:09 -08:00
asm-offsets.c
audit.c alpha: Enable system-call auditing support. 2014-01-31 09:21:55 -08:00
binfmt_loader.c get rid of pt_regs argument of ->load_binary() 2012-11-28 21:53:38 -05:00
console.c TTY:vt: convert remain take_over_console's users to do_take_over_console 2013-05-20 22:29:27 -07:00
core_apecs.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
core_cia.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
core_irongate.c alpha: Add export.h for THIS_MODULE/EXPORT_SYMBOL 2011-10-31 19:31:03 -04:00
core_lca.c Fix common misspellings 2011-03-31 11:26:23 -03:00
core_marvel.c
core_mcpcia.c alpha: Remove set but unused variables. 2011-04-17 14:41:30 -07:00
core_polaris.c
core_t2.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
core_titan.c
core_tsunami.c alpha: include module.h to fix modpost on Tsunami 2012-05-02 15:54:06 -04:00
core_wildfire.c
entry.S alpha: Enable system-call auditing support. 2014-01-31 09:21:55 -08:00
err_common.c
err_ev6.c
err_ev7.c
err_impl.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
err_marvel.c Fix common misspellings 2011-03-31 11:26:23 -03:00
err_titan.c alpha: Remove set but unused variables. 2011-04-17 14:41:30 -07:00
es1888.c
gct.c
head.S Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
io.c
irq.c alpha: irq: run all handlers with interrupts disabled 2013-04-07 12:59:30 -07:00
irq_alpha.c alpha: Use qemu+cserve provided high-res clock and alarm. 2013-11-16 16:33:21 -08:00
irq_i8259.c alpha: Convert to new irq function names 2011-03-29 14:47:58 +02:00
irq_impl.h alpha: i8259, alcor, jensen wildfire: Convert irq_chip 2011-03-02 14:57:55 -05:00
irq_pyxis.c alpha: Convert to new irq function names 2011-03-29 14:47:58 +02:00
irq_srm.c alpha: Convert to new irq function names 2011-03-29 14:47:58 +02:00
machvec_impl.h alpha: Reorganize rtc handling 2013-11-16 16:33:16 -08:00
module.c modules: make arch's use default loader hooks 2011-07-24 22:06:04 +09:30
osf_sys.c vfs: make first argument of dir_context.actor typed 2014-10-31 17:48:54 -04:00
pc873xx.c
pc873xx.h
pci-noop.c Alpha: adapt for dma_map_ops changes 2012-03-28 16:36:36 +02:00
pci-sysfs.c PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev 2013-12-21 10:06:10 -07:00
pci.c alpha/PCI: Clip bridge windows to fit in upstream windows 2015-01-16 10:04:42 -06:00
pci_impl.h alpha/PCI: replace pci_probe_only with pci_flags 2012-02-23 20:18:56 -07:00
pci_iommu.c alpha/PCI: Use dev_is_pci() to identify PCI devices 2013-12-11 16:53:19 -07:00
perf_event.c alpha: Replace __get_cpu_var 2014-08-26 13:45:53 -04:00
process.c alpha: Primitive support for CPU power down. 2013-11-16 16:33:15 -08:00
proto.h alpha: Use qemu+cserve provided high-res clock and alarm. 2013-11-16 16:33:21 -08:00
ptrace.c ARCH: AUDIT: audit_syscall_entry() should not require the arch 2014-09-23 16:21:26 -04:00
rtc.c alpha: Reorganize rtc handling 2013-11-16 16:33:16 -08:00
setup.c alpha: Allow HZ to be configured 2013-11-16 16:33:13 -08:00
signal.c all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
smc37c93x.c alpha: Remove set but unused variables. 2011-04-17 14:41:30 -07:00
smc37c669.c alpha: remove mysterious if zero-ed out includes 2012-07-30 17:25:11 -07:00
smp.c alpha: Switch to GENERIC_CLOCKEVENTS 2013-11-16 16:33:19 -08:00
srm_env.c srm_env: don't bother with pointer to srm_env_t 2013-04-09 14:13:33 -04:00
srmcons.c TTY: switch tty_schedule_flip 2013-01-15 22:43:15 -08:00
sys_alcor.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_cabriolet.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_dp264.c alpha: Don't if-out dp264_device_interrupt. 2013-07-19 13:54:26 -07:00
sys_eb64p.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_eiger.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_jensen.c alpha: Reorganize rtc handling 2013-11-16 16:33:16 -08:00
sys_marvel.c alpha: Reorganize rtc handling 2013-11-16 16:33:16 -08:00
sys_miata.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_mikasa.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_nautilus.c mm: enhance free_reserved_area() to support poisoning memory with zero 2013-07-03 16:07:32 -07:00
sys_noritake.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_rawhide.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_ruffian.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_rx164.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_sable.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_sio.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_sx164.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_takara.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
sys_titan.c alpha: irq: remove deprecated use of IRQF_DISABLED 2013-04-07 12:59:30 -07:00
sys_wildfire.c Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
systbls.S alpha: Wire up sched_setattr, sched_getattr, and renameat2 syscalls. 2014-08-29 11:18:45 -07:00
time.c alpha: Replace __get_cpu_var 2014-08-26 13:45:53 -04:00
traps.c alpha: Primitive support for CPU power down. 2013-11-16 16:33:15 -08:00
vmlinux.lds.S Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00