linux/arch/ia64/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 cpufreq: ia64: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:25 +02:00
Makefile.gate
acpi-ext.c ACPICA: Resources: Provide common part for struct acpi_resource_address structures. 2015-01-26 16:09:56 +01:00
acpi.c ACPI / table: remove duplicate NULL check for the handler of acpi_table_parse() 2015-02-06 01:34:47 +01:00
asm-offsets.c ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
audit.c
brl_emu.c
crash.c ia64: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:15 -07:00
crash_dump.c
cyclone.c
dma-mapping.c ia64: Add export.h to arch/ia64 specific files as required 2011-10-31 19:30:58 -04:00
efi.c ia64: efi: Format EFI memory type & attrs with efi_md_typeattr_format() 2014-10-03 18:41:01 +01:00
efi_stub.S
elfcore.c switch elf_core_write_extra_data() to dump_emit() 2013-11-09 00:16:23 -05:00
entry.S [IA64] Enable execveat syscall for ia64 2015-01-05 11:25:19 -08:00
entry.h
err_inject.c ia64, err-inject: Fix CPU hotplug callback registration 2014-03-20 13:43:41 +01:00
esi.c
esi_stub.S
fsys.S Fix broken fsys_getppid() 2013-03-19 16:14:52 -07:00
fsyscall_gtod_data.h ia64: vsyscall: Use seqcount instead of seqlock 2012-03-15 18:17:59 -07:00
ftrace.c ftrace: Do not pass data to ftrace_dyn_arch_init 2014-03-07 10:06:14 -05:00
gate-data.S
gate.S Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
gate.lds.S Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
head.S [IA64] Change default PSR.ac from '1' to '0' (Fix erratum #237) 2014-04-16 10:20:34 -07:00
ia64_ksyms.c treewide: Put a space between #include and FILE 2012-06-28 11:44:36 +02:00
init_task.c
iosapic.c ia64: Use irq_init_desc 2014-05-16 14:05:22 +02:00
irq.c ia64: Replace __get_cpu_var uses 2014-08-26 13:45:52 -04:00
irq_ia64.c ia64: Replace __get_cpu_var uses 2014-08-26 13:45:52 -04:00
irq_lsapic.c
ivt.S [IA64] Change default PSR.ac from '1' to '0' (Fix erratum #237) 2014-04-16 10:20:34 -07:00
jprobes.S
kprobes.c ia64: Replace __get_cpu_var uses 2014-08-26 13:45:52 -04:00
machine_kexec.c [IA64] kexec: Move the dereference below the NULL test 2012-09-10 14:31:23 -07:00
machvec.c Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
mca.c ia64: Replace __get_cpu_var uses 2014-08-26 13:45:52 -04:00
mca_asm.S
mca_drv.c Remove cast for kmalloc return value 2013-03-19 16:14:53 -07:00
mca_drv.h
mca_drv_asm.S
minstate.h cputime: Generic on-demand virtual cputime accounting 2013-01-27 19:23:27 +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
msi_ia64.c PCI/MSI: Rename mask/unmask_msi_irq treewide 2014-11-23 13:01:45 +01:00
nr-irqs.c ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
numa.c [IA64] Delete __cpuinit usage from all ia64 users 2013-06-24 15:44:27 -07:00
pal.S
palinfo.c ia64, palinfo: Fix CPU hotplug callback registration 2014-03-20 13:43:40 +01:00
paravirt.c static keys: Introduce 'struct static_key', static_key_true()/false() and static_key_slow_[inc|dec]() 2012-02-24 10:05:59 +01:00
paravirt_inst.h ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
paravirt_patch.c
paravirt_patchlist.c
paravirt_patchlist.h ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
paravirtentry.S
patch.c Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
pci-dma.c [IA64] pci: Remove unused fallback_dev 2013-06-03 16:04:31 -07:00
pci-swiotlb.c X86 & IA64: adapt for dma_map_ops changes 2012-03-28 16:36:31 +02:00
perfmon.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-12-16 15:53:03 -08:00
perfmon_default_smpl.c
perfmon_generic.h
perfmon_itanium.h
perfmon_mckinley.h
perfmon_montecito.h
process.c ia64: Replace __get_cpu_var uses 2014-08-26 13:45:52 -04:00
ptrace.c ARCH: AUDIT: audit_syscall_entry() should not require the arch 2014-09-23 16:21:26 -04:00
relocate_kernel.S
sal.c
salinfo.c ia64, salinfo: Fix hotplug callback registration 2014-03-20 13:43:40 +01:00
setup.c DMI: Parse memory device (type 17) in SMBIOS 2013-10-23 10:10:12 -07:00
sigframe.h
signal.c all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
smp.c Merge branch 'akpm' (Andrew's patch-bomb) 2012-03-28 17:19:28 -07:00
smpboot.c [IA64] Delete __cpuinit usage from all ia64 users 2013-06-24 15:44:27 -07:00
stacktrace.c
sys_ia64.c mm: use vm_unmapped_area() on ia64 architecture 2013-02-22 13:46:59 -08:00
time.c rtc: ia64: allow other architectures to use EFI RTC 2014-08-08 15:57:19 -07:00
topology.c ia64, topology: Fix CPU hotplug callback registration 2014-03-20 13:43:40 +01:00
traps.c ia64: Replace __get_cpu_var uses 2014-08-26 13:45:52 -04:00
unaligned.c
uncached.c mm: fix GFP_THISNODE callers and clarify 2014-03-10 17:26:19 -07:00
unwind.c Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
unwind_decoder.c
unwind_i.h
vmlinux.lds.S ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00