linux/arch/parisc/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 parisc: add kernel audit feature 2013-11-07 22:27:20 +01:00
asm-offsets.c parisc: Use of align_frame provides stack frame. 2010-05-30 05:38:27 -04:00
audit.c parisc: add kernel audit feature 2013-11-07 22:27:20 +01:00
binfmt_elf32.c parisc: fix redefinition of SET_PERSONALITY 2013-03-02 20:15:28 +01:00
cache.c parisc: change value of SHMLBA from 0x00400000 to PAGE_SIZE 2014-04-13 15:00:53 +02:00
compat_audit.c parisc: add kernel audit feature 2013-11-07 22:27:20 +01:00
drivers.c parisc/PCI: Use dev_is_pci() to identify PCI devices 2013-12-11 16:53:12 -07:00
entry.S parisc: make interrupt and interruption stack allocation reentrant 2013-05-24 22:35:36 +02:00
firmware.c parisc: delete __cpuinit usage from all users 2013-07-14 19:36:51 -04:00
ftrace.c parisc: ftrace: Remove check of obsolete variable function_trace_stop 2014-07-18 13:57:05 -04:00
hardware.c parisc: add serial ports of C8000/1GHz machine to hardware database 2014-07-13 15:51:58 +02:00
head.S parisc: fix kernel memory layout in vmlinux.ld.S 2013-11-30 22:09:21 +01:00
hpmc.S parisc: fix partly 16/64k PAGE_SIZE boot 2013-05-06 23:08:32 +02:00
inventory.c parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
irq.c parisc: Validate online cpus in irq_set_affinity() callbacks 2014-03-12 13:07:41 +01:00
module.c module_arch_freeing_init(): new hook for archs before module->module_init freed. 2015-01-20 11:38:32 +10:30
pa7300lc.c
pacache.S parisc: Use unshadowed index register for flush instructions in flush_dcache_page_asm and flush_icache_page_asm 2013-06-18 20:29:10 +02:00
parisc_ksyms.c parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds. 2013-04-25 22:36:15 +02:00
pci-dma.c parisc: Add export.h to files needing EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:00 -04:00
pci.c parisc: provide pci_mmap_page_range() for parisc 2013-06-18 20:29:08 +02:00
pdc_chassis.c parisc: single_open() leaks 2013-05-05 00:10:41 -04:00
pdc_cons.c TTY: switch tty_flip_buffer_push 2013-01-15 22:30:15 -08:00
perf.c parisc: remove big kernel lock 2010-10-16 22:43:08 +02:00
perf_asm.S
perf_images.h
process.c parisc: add flexible mmap memory layout support 2014-02-02 21:00:13 +01:00
processor.c parisc: delete __cpuinit usage from all users 2013-07-14 19:36:51 -04:00
ptrace.c Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
real2.S
setup.c parisc: correctly display number of active CPUs 2013-11-07 22:29:05 +01:00
signal.c all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
signal32.c constify copy_siginfo_to_user{,32}() 2013-11-09 00:16:29 -05:00
signal32.h constify copy_siginfo_to_user{,32}() 2013-11-09 00:16:29 -05:00
smp.c parisc: do not count IPI calls twice 2013-11-07 22:28:54 +01:00
stacktrace.c parisc: add LATENCYTOP_SUPPORT and CONFIG_STACKTRACE_SUPPORT 2009-03-31 02:51:34 +00:00
sys_parisc.c parisc,metag: Do not hardcode maximum userspace stack size 2014-05-15 00:01:41 +01:00
sys_parisc32.c parisc: drop unused defines and header includes 2014-07-13 15:56:12 +02:00
syscall.S parisc: Implement new LWS CAS supporting 64 bit operations. 2014-09-13 22:40:48 +02:00
syscall_table.S parisc: Use compat layer for msgctl, shmat, shmctl and semtimedop syscalls 2014-11-10 22:23:47 +01:00
time.c parisc: move definition of PAGE0 to asm/page.h 2012-05-10 15:12:08 -07:00
topology.c parisc: Replace NR_CPUS in parisc code 2009-01-05 19:09:02 +00:00
traps.c parisc: ratelimit userspace segfault printing 2014-05-15 21:12:15 +02:00
unaligned.c parisc: show number of FPE and unaligned access handler calls in /proc/interrupts 2013-05-24 22:35:26 +02:00
unwind.c parisc: use kernel_text_address() in unwind functions 2013-11-30 22:08:54 +01:00
vmlinux.lds.S parisc: fix kernel memory layout in vmlinux.ld.S 2013-11-30 22:09:21 +01:00