linux/arch/alpha/include/asm
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
..
a.out-core.h
a.out.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
agp.h agp: kill phys_to_gart() and gart_to_phys() 2009-08-03 09:05:00 +01:00
agp_backend.h
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
atomic.h locking,arch: Use ACCESS_ONCE() instead of cast to volatile in atomic_read() 2014-10-03 06:06:23 +02:00
barrier.h arch: Cleanup read_barrier_depends() and comments 2014-12-11 21:15:05 -05:00
bitops.h arch,alpha: Convert smp_mb__*() to the asm-generic primitives 2014-04-18 11:40:31 +02:00
bug.h alpha: Convert BUG() to use unreachable() 2009-12-18 01:14:52 -05:00
bugs.h
cache.h alpha: remove homegrown L1_CACHE_ALIGN macro 2010-08-31 22:45:31 -04:00
cacheflush.h mm: Fix out-of-date comments which refers non-existent functions 2011-02-17 16:54:39 +01:00
checksum.h
cmpxchg.h alpha: fix build failures from system.h dismemberment 2012-04-13 13:15:16 -04:00
compiler.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
console.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
core_apecs.h
core_cia.h
core_irongate.h
core_lca.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
core_marvel.h alpha: fix compile errors in dma-mapping-common.h 2010-03-18 22:35:28 -04:00
core_mcpcia.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
core_polaris.h
core_t2.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
core_titan.h alpha: fix compile errors in dma-mapping-common.h 2010-03-18 22:35:28 -04:00
core_tsunami.h alpha: fix compile errors in dma-mapping-common.h 2010-03-18 22:35:28 -04:00
core_wildfire.h
current.h
delay.h
device.h
div64.h
dma-mapping.h Alpha: adapt for dma_map_ops changes 2012-03-28 16:36:36 +02:00
dma.h
elf.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
emergency-restart.h
err_common.h
err_ev6.h
err_ev7.h
fb.h
floppy.h alpha: irq: remove deprecated use of IRQF_DISABLED 2013-04-07 12:59:30 -07:00
fpu.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
ftrace.h tracing: make CALLER_ADDRx overwriteable 2009-03-02 16:49:37 -05:00
futex.h alpha: fix 32/64-bit bug in futex support 2012-03-05 15:49:43 -08:00
gct.h
gpio.h gpiolib/arches: Centralise bolierplate asm/gpio.h 2012-05-11 18:00:14 -06:00
hardirq.h alpha: convert to asm-generic/hardirq.h 2009-09-22 07:17:43 -07:00
hw_irq.h alpha: add performance monitor interrupt counter 2010-08-09 20:45:03 -07:00
hwrpb.h
io.h alpha: io: implement relaxed accessor macros for writes 2014-08-29 11:18:45 -07:00
io_trivial.h
irq.h alpha: kill off alpha_do_IRQ 2011-01-17 05:42:13 +01:00
irq_regs.h
irqflags.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
jensen.h
Kbuild net, lib: kill arch_fast_hash library bits 2014-12-10 15:17:46 -05:00
kdebug.h
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
linkage.h consolidate cond_syscall and SYSCALL_ALIAS declarations 2013-03-03 22:55:19 -05:00
local.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
machvec.h alpha: Reorganize rtc handling 2013-11-16 16:33:16 -08:00
mc146818rtc.h
mce.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
mmu.h
mmu_context.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
mmzone.h mm/ALPHA: clean up unused VALID_PAGE() 2013-07-03 16:07:39 -07:00
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
mutex.h
page.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
pal.h alpha: Use qemu+cserve provided high-res clock and alarm. 2013-11-16 16:33:21 -08:00
param.h alpha: Force the user-visible HZ to a constant 1024. 2013-07-19 13:54:26 -07:00
parport.h ALPHA: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
pci.h PCI: Turn pcibios_penalize_isa_irq() into a weak function 2014-05-27 16:23:58 -06:00
percpu.h alpha: fix percpu build breakage 2009-06-30 18:55:59 -07:00
perf_event.h perf, arch: Cleanup perf-pmu init vs lockup-detector 2010-11-26 15:14:56 +01:00
pgalloc.h alpha: handle pgtable_page_ctor() fail 2013-11-15 09:32:16 +09:00
pgtable.h mm: make FIRST_USER_ADDRESS unsigned long on all archs 2015-02-11 17:06:03 -08:00
processor.h arch, locking: Ciao arch_mutex_cpu_relax() 2014-07-17 12:32:47 +02:00
ptrace.h alpha: Enable system-call auditing support. 2014-01-31 09:21:55 -08:00
rtc.h alpha: Reorganize rtc handling 2013-11-16 16:33:16 -08:00
rwsem.h rwsem: Move duplicate function prototypes to linux/rwsem.h 2011-01-27 12:30:39 +01:00
segment.h
serial.h
sfp-machine.h
shmparam.h
signal.h consolidate kernel-side struct sigaction declarations 2013-02-03 15:09:22 -05:00
smp.h Remove unused PROC_CHANGE_PENALTY constant 2011-05-25 08:39:43 -07:00
socket.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
special_insns.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
spinlock.h alpha: locks: remove unused arch_*_relax operations 2013-07-19 13:54:23 -07:00
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
string.h alpha: Eliminate compiler warning from memset macro 2013-11-16 16:33:09 -08:00
switch_to.h Disintegrate asm/system.h for Alpha 2012-03-28 18:11:12 +01:00
syscall.h Alpha: define syscall_get_arch() 2014-09-23 16:20:03 -04:00
termios.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
thread_info.h all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
timex.h
tlb.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
tlbflush.h alpha: switch to dynamic percpu allocator 2009-06-24 15:13:52 +09:00
topology.h alpha: cpumask_of_node() should handle -1 as a node 2010-01-14 13:21:35 -05:00
types.h UAPI: (Scripted) Disintegrate arch/alpha/include/asm 2012-12-17 14:12:19 +00:00
uaccess.h alpha: Use new generic strncpy_from_user() and strnlen_user() 2012-08-19 08:41:18 -07:00
ucontext.h
unaligned.h
unistd.h alpha: Wire up sched_setattr, sched_getattr, and renameat2 syscalls. 2014-08-29 11:18:45 -07:00
user.h
vga.h
word-at-a-time.h alpha: Use new generic strncpy_from_user() and strnlen_user() 2012-08-19 08:41:18 -07:00
wrperfmon.h alpha: add wrperfmon.h header file to aid use of wrperfmon PALcall 2010-08-09 20:45:04 -07:00
xchg.h alpha: fix build failures from system.h dismemberment 2012-04-13 13:15:16 -04:00
xor.h