linux_dsm_epyc7002/arch/microblaze/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
..
asm-compat.h microblaze: Copy ppc asm-compat.h for clean handling of constants in asm and C 2009-09-22 10:10:06 +02:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
atomic.h atomic: implement generic atomic_dec_if_positive() 2012-10-09 16:22:46 +09:00
bitops.h microblaze: convert all simple headers to use asm-generic 2009-07-06 10:26:55 +02:00
bug.h microblaze: convert all simple headers to use asm-generic 2009-07-06 10:26:55 +02:00
bugs.h microblaze: convert all simple headers to use asm-generic 2009-07-06 10:26:55 +02:00
cache.h microblaze: Define correct L1_CACHE_SHIFT value 2010-05-06 11:21:59 +02:00
cacheflush.h microblaze: Use static inline functions in cacheflush.h 2013-06-03 11:33:23 +02:00
checksum.h microblaze: Add support for little-endian Microblaze 2010-10-21 15:51:59 +10:00
cmpxchg.h microblaze: Add missing headers caused by disintegration asm/system.h 2012-03-30 12:11:46 +02:00
cpuinfo.h microblaze: Add support for CCF 2014-01-27 11:24:55 +01:00
cputable.h microblaze: Fix problem with removing zero length files 2009-04-14 10:37:09 +02:00
current.h microblaze_mmu_v2: Add CURRENT_TASK for entry.S 2009-05-26 16:45:19 +02:00
delay.h microblaze: Change extern inline to static inline 2015-01-05 12:36:44 +01:00
div64.h microblaze_v8: headers simple files - empty or redirect to asm-generic 2009-03-27 14:25:41 +01:00
dma-mapping.h microblaze: Remove device_to_mask 2014-06-04 06:59:58 +02:00
dma.h microblaze: Add isa_dma_bridge_buggy to dma.h 2010-05-06 11:21:58 +02:00
elf.h UAPI: (Scripted) Disintegrate arch/microblaze/include/asm 2012-12-13 14:38:55 +01:00
emergency-restart.h microblaze_v8: headers simple files - empty or redirect to asm-generic 2009-03-27 14:25:41 +01:00
entry.h arch/microblaze/include/asm/entry.h: Include "linux/linkage.h" to avoid compiling issue 2014-09-09 13:10:20 +02:00
exceptions.h microblaze: Fix sparse warning - fault.c 2011-03-09 08:09:59 +01:00
fb.h microblaze: convert all simple headers to use asm-generic 2009-07-06 10:26:55 +02:00
fixmap.h microblaze: use generic fixmap.h 2014-01-23 16:36:54 -08:00
flat.h microblaze: remove unused flat_stack_align() definition 2009-06-02 07:54:36 +02:00
ftrace.h microblaze: ftrace: Add dynamic trace support 2009-12-14 08:44:01 +01:00
futex.h microblaze: Reversed logic in futex cmpxchg 2013-05-27 12:29:35 +02:00
gpio.h gpiolib/arches: Centralise bolierplate asm/gpio.h 2012-05-11 18:00:14 -06:00
hardirq.h irq_domain/microblaze: Convert microblaze to use irq_domains 2012-02-16 06:11:24 -07:00
highmem.h microblaze: Kill __kmap_atomic() 2013-01-03 12:47:20 +01:00
hw_irq.h microblaze: Fix problem with removing zero length files 2009-04-14 10:37:09 +02:00
io.h microblaze: io: remove dummy relaxed accessor macros 2014-10-20 18:49:17 +01:00
irq_regs.h microblaze_v8: headers for irq 2009-03-27 14:25:35 +01:00
irq.h irq_domain/microblaze: Convert microblaze to use irq_domains 2012-02-16 06:11:24 -07:00
irqflags.h microblaze/irqs: Do not trace arch_local_{*,irq_*} functions 2011-07-25 09:07:45 +02:00
Kbuild net, lib: kill arch_fast_hash library bits 2014-12-10 15:17:46 -05:00
kdebug.h microblaze_v8: headers simple files - empty or redirect to asm-generic 2009-03-27 14:25:41 +01:00
kgdb.h microblaze: Declare microblaze_kgdb_break in header 2015-01-05 12:36:42 +01:00
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
linkage.h microblaze: Use empty asm-generic/linkage.h 2015-01-05 12:36:39 +01:00
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
local.h microblaze_v8: headers simple files - empty or redirect to asm-generic 2009-03-27 14:25:41 +01:00
mmu_context_mm.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
mmu_context.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
mmu.h microblaze: Handle TLB skip size dynamically 2012-03-23 09:28:19 +01:00
module.h microblaze: convert all simple headers to use asm-generic 2009-07-06 10:26:55 +02:00
mutex.h microblaze_v8: headers simple files - empty or redirect to asm-generic 2009-03-27 14:25:41 +01:00
page.h mm/microblaze: clean up unused VALID_PAGE() 2013-07-03 16:07:40 -07:00
parport.h microblaze: convert all simple headers to use asm-generic 2009-07-06 10:26:55 +02:00
pci-bridge.h microblaze/PCI: remove unused pci_flags 2012-02-23 20:18:57 -07:00
pci.h Microblaze patches for 3.16-rc1 2014-06-05 16:15:33 -07:00
percpu.h microblaze_v8: headers simple files - empty or redirect to asm-generic 2009-03-27 14:25:41 +01:00
pgalloc.h microblaze: Change extern inline to static inline 2015-01-05 12:36:44 +01: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
prom.h of: remove HAVE_ARCH_DEVTREE_FIXUPS 2013-10-09 20:04:08 -05:00
ptrace.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
pvr.h microblaze: Unprivileged stream instruction awareness 2011-07-25 09:13:42 +02:00
registers.h microblaze_mmu_v2: Update process creation for MMU 2009-05-26 16:45:18 +02:00
seccomp.h microblaze: Add seccomp support 2010-10-21 15:51:25 +10:00
sections.h microblaze: Remove duplicate declarations of _stext[] and _etext[] 2014-01-21 08:28:19 +01:00
serial.h microblaze: convert all simple headers to use asm-generic 2009-07-06 10:26:55 +02:00
setup.h microblaze: Drop architecture-specific declaration of early_printk 2014-03-12 10:10:07 +01:00
shmparam.h microblaze: convert all simple headers to use asm-generic 2009-07-06 10:26:55 +02:00
string.h microblaze: Guard __HAVE_ARCH macros with __KERNEL__ in string.h 2009-05-21 15:56:08 +02:00
switch_to.h Disintegrate asm/system.h for Microblaze 2012-03-28 18:30:02 +01:00
syscall.h microblaze: Use unsigned return type in do_syscall_trace_enter 2015-01-05 12:36:43 +01:00
thread_info.h all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
timex.h microblaze: convert all simple headers to use asm-generic 2009-07-06 10:26:55 +02:00
tlb.h mmu_gather: move minimal range calculations into generic code 2014-11-17 10:12:42 +00:00
tlbflush.h microblaze: Fix TLB macros 2010-04-01 08:38:24 +02:00
topology.h of: Provide default of_node_to_nid() implementation. 2010-07-30 00:03:58 -06:00
uaccess.h microblaze: whitespace fix 2015-01-08 08:37:25 +01:00
ucontext.h microblaze: fall back on generic header files for the ABI 2009-07-06 10:26:50 +02:00
unaligned.h microblaze: Fix unaligned.h for endians 2011-03-09 08:09:53 +01:00
unistd.h microblaze: Wire-up execveat syscall 2015-01-05 12:36:40 +01:00
unwind.h microblaze: Add stack unwinder 2010-08-04 10:22:35 +02:00
user.h microblaze: Fix problem with removing zero length files 2009-04-14 10:37:09 +02:00
vga.h microblaze: convert all simple headers to use asm-generic 2009-07-06 10:26:55 +02:00
xor.h microblaze_v8: headers simple files - empty or redirect to asm-generic 2009-03-27 14:25:41 +01:00