linux_dsm_epyc7002/arch/arm/kernel
Thomas Garnier e33f8d3267 arm/syscalls: Optimize address limit check
Disable the generic address limit check in favor of an architecture
specific optimized implementation. The generic implementation using
pending work flags did not work well with ARM and alignment faults.

The address limit is checked on each syscall return path to user-mode
path as well as the irq user-mode return function. If the address limit
was changed, a function is called to report data corruption (stopping
the kernel or process based on configuration).

The address limit check has to be done before any pending work because
they can reset the address limit and the process is killed using a
SIGKILL signal. For example the lkdtm address limit check does not work
because the signal to kill the process will reset the user-mode address
limit.

Signed-off-by: Thomas Garnier <thgarnie@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
Tested-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Pratyush Anand <panand@redhat.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: Will Drewry <wad@chromium.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: David Howells <dhowells@redhat.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-api@vger.kernel.org
Cc: Yonghong Song <yhs@fb.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1504798247-48833-4-git-send-email-keescook@chromium.org
2017-09-17 19:45:33 +02:00
..
.gitignore
arch_timer.c
armksyms.c ARM: implement memset32 & memset64 2017-09-08 18:26:48 -07:00
asm-offsets.c
atags_compat.c
atags_parse.c ARM: fix rd_size declaration 2017-07-10 16:32:34 -07:00
atags_proc.c
atags.h
bios32.c ARM/PCI: Fix pcibios_init_resource() struct pci_host_bridge leak 2017-07-10 09:33:14 -05:00
cpuidle.c ARM: Convert to using %pOF instead of full_name 2017-08-16 22:25:30 +02:00
crash_dump.c
debug.S
devtree.c ARM: Convert to using %pOF instead of full_name 2017-08-16 22:25:30 +02:00
dma-isa.c
dma.c
early_printk.c
efi.c
elf.c
entry-armv.S Merge branches 'fixes' and 'misc' into for-linus 2017-09-09 16:34:41 +01:00
entry-common.S arm/syscalls: Optimize address limit check 2017-09-17 19:45:33 +02:00
entry-ftrace.S ARM: 8678/1: ftrace: Adds support for CONFIG_DYNAMIC_FTRACE_WITH_REGS 2017-06-18 22:25:16 +01:00
entry-header.S
entry-v7m.S
fiq.c
fiqasm.S
ftrace.c ARM: 8678/1: ftrace: Adds support for CONFIG_DYNAMIC_FTRACE_WITH_REGS 2017-06-18 22:25:16 +01:00
head-common.S
head-nommu.S
head.S ARM: align .data section 2017-08-14 16:22:55 +01:00
hibernate.c
hw_breakpoint.c ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init 2017-06-20 12:25:22 +02:00
hyp-stub.S ARM: align .data section 2017-08-14 16:22:55 +01:00
insn.c
io.c
irq.c
isa.c
iwmmxt.S ARM: align .data section 2017-08-14 16:22:55 +01:00
jump_label.c
kgdb.c
machine_kexec.c ARM: kexec: fix failure to boot crash kernel 2017-07-20 11:37:42 +01:00
Makefile
module-plts.c
module.c ARM: Silence first allocation with CONFIG_ARM_MODULE_PLTS=y 2017-05-11 14:43:31 +01:00
module.lds
opcodes.c
paravirt.c
patch.c arm: Prevent hotplug rwsem recursion 2017-05-26 10:10:46 +02:00
perf_callchain.c
perf_event_v6.c arm: perf: make of_device_ids const 2017-06-15 11:07:34 +01:00
perf_event_v7.c
perf_event_xscale.c
perf_regs.c
pj4-cp0.c
process.c ARM: 8683/1: ARM32: Support mremap() for sigpage/vDSO 2017-06-21 13:02:58 +01:00
psci_smp.c
ptrace.c
reboot.c
reboot.h
relocate_kernel.S
return_address.c
setup.c ARM: kexec: avoid allocating crashkernel region outside lowmem 2017-07-20 11:37:15 +01:00
signal.c arm/syscalls: Optimize address limit check 2017-09-17 19:45:33 +02:00
sigreturn_codes.S
sleep.S ARM: align .data section 2017-08-14 16:22:55 +01:00
smccc-call.S
smp_scu.c
smp_tlb.c
smp_twd.c clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLARE 2017-06-14 11:58:45 +02:00
smp.c arm: Adjust system_state check 2017-05-23 10:01:35 +02:00
stacktrace.c ARM: 8691/1: Export save_stack_trace_tsk() 2017-09-09 16:26:42 +01:00
suspend.c
swp_emulate.c
sys_arm.c
sys_oabi-compat.c
tcm.c
thumbee.c
time.c clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
topology.c ARM: Convert to using %pOF instead of full_name 2017-08-16 22:25:30 +02:00
traps.c
unwind.c
v7m.c
vdso.c ARM: 8683/1: ARM32: Support mremap() for sigpage/vDSO 2017-06-21 13:02:58 +01:00
vmlinux-xip.lds.S
vmlinux.lds.S
xscale-cp0.c