1
0
Fork 0
remarkable-linux/arch/arm/kernel
Russell King 70b96be10d ARM: oabi-compat: copy semops using __copy_from_user()
Commit 8c8484a1c1 upstream.

__get_user_error() is used as a fast accessor to make copying structure
members as efficient as possible.  However, with software PAN and the
recent Spectre variant 1, the efficiency is reduced as these are no
longer fast accessors.

In the case of software PAN, it has to switch the domain register around
each access, and with Spectre variant 1, it would have to repeat the
access_ok() check for each access.

Rather than using __get_user_error() to copy each semops element member,
copy each semops element in full using __copy_from_user().

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David A. Long <dave.long@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-18 09:16:28 +02:00
..
.gitignore
Makefile ARM: bugs: prepare processor bug infrastructure 2018-10-18 09:16:26 +02:00
arch_timer.c arch_timer: Move to generic sched_clock framework 2013-10-09 16:54:10 -07:00
armksyms.c ARM: implement memset32 & memset64 2017-09-08 18:26:48 -07:00
asm-offsets.c ARM: save and reset the address limit when entering an exception 2016-07-07 16:01:01 +01:00
atags.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atags_compat.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
atags_parse.c ARM: fix rd_size declaration 2017-07-10 16:32:34 -07:00
atags_proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bios32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bugs.c ARM: bugs: add support for per-processor bug checking 2018-10-18 09:16:26 +02:00
cpuidle.c ARM: Convert to using %pOF instead of full_name 2017-08-16 22:25:30 +02:00
crash_dump.c ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr 2014-04-07 12:10:00 +01:00
debug.S ARM: 8704/1: semihosting: use proper instruction on v7m processors 2017-10-12 11:28:29 +01:00
devtree.c ARM: Convert to using %pOF instead of full_name 2017-08-16 22:25:30 +02:00
dma-isa.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
dma.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
early_printk.c early_printk: consolidate random copies of identical code 2013-04-29 18:28:13 -07:00
efi.c ARM/efi: Apply strict permissions for UEFI Runtime Services regions 2016-04-28 11:33:53 +02:00
elf.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
entry-armv.S Merge branches 'fixes' and 'misc' into for-linus 2017-09-09 16:34:41 +01:00
entry-common.S ARM: spectre-v1: fix syscall entry 2018-10-18 09:16:27 +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 ARM: spectre-v1: fix syscall entry 2018-10-18 09:16:27 +02:00
entry-v7m.S ARM: rename S_FRAME_SIZE to PT_REGS_SIZE 2016-06-22 19:54:28 +01:00
fiq.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fiqasm.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
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 ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
head-nommu.S ARM: 8649/2: nommu: remove Hivecs configuration is asm 2017-02-28 11:06:15 +00:00
head.S ARM: align .data section 2017-08-14 16:22:55 +01:00
hibernate.c ARM: use virt_to_idmap() for soft_restart() 2016-02-08 15:48:32 +00:00
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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq.c ARM: 8499/1: irq: l2c: do not print error in case of missing l2c from 2016-01-26 23:49:02 +00:00
isa.c arm: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:15 -07:00
iwmmxt.S ARM: align .data section 2017-08-14 16:22:55 +01:00
jump_label.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kgdb.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
machine_kexec.c ARM: kexec: fix kdump register saving on panic() 2018-06-21 04:03:01 +09:00
module-plts.c ARM: 8662/1: module: split core and init PLT sections 2017-03-17 10:01:28 +00:00
module.c ARM: Silence first allocation with CONFIG_ARM_MODULE_PLTS=y 2017-05-11 14:43:31 +01:00
module.lds License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
opcodes.c ARM: 7206/1: Add generic ARM instruction set condition code checks. 2011-12-13 08:52:02 +00:00
paravirt.c arm: introduce CONFIG_PARAVIRT, PARAVIRT_TIME_ACCOUNTING and pv_time_ops 2015-12-21 14:40:54 +00:00
patch.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf_callchain.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf_event_v6.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf_event_v7.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf_event_xscale.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf_regs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pj4-cp0.c ARM: 8452/3: PJ4: make coprocessor access sequences buildable in Thumb2 mode 2016-01-04 11:12:10 +00:00
process.c ARM: 8683/1: ARM32: Support mremap() for sigpage/vDSO 2017-06-21 13:02:58 +01:00
psci_smp.c ARM: use const and __initconst for smp_operations 2015-12-01 22:17:45 +01:00
ptrace.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
reboot.c ARM: soft-reboot into same mode that we entered the kernel 2017-04-09 07:49:24 -07:00
reboot.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
relocate_kernel.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
return_address.c ARM: 8328/1: remove empty preprocessor #else branch 2015-03-28 16:54:53 +00:00
setup.c ARM: kexec: avoid allocating crashkernel region outside lowmem 2017-07-20 11:37:15 +01:00
signal.c ARM: vfp: use __copy_from_user() when restoring VFP state 2018-10-18 09:16:28 +02:00
sigreturn_codes.S ARM: 7895/1: signal: fix armv7-m build issue in sigreturn_codes.S 2013-11-30 22:21:00 +00:00
sleep.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smccc-call.S arm: kernel: Add SMC structure parameter 2017-02-03 18:46:33 +00:00
smp.c ARM: bugs: hook processor bug checking into SMP and suspend paths 2018-10-18 09:16:26 +02:00
smp_scu.c ARM: 8122/1: smp_scu: enable SCU standby support 2014-08-02 08:51:53 +01:00
smp_tlb.c ARM: 8613/1: Fix the uaccess crash on PB11MPCore 2017-01-16 17:30:46 +00:00
smp_twd.c clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLARE 2017-06-14 11:58:45 +02:00
stacktrace.c ARM: 8691/1: Export save_stack_trace_tsk() 2017-09-09 16:26:42 +01:00
suspend.c ARM: bugs: hook processor bug checking into SMP and suspend paths 2018-10-18 09:16:26 +02:00
swp_emulate.c sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
sys_arm.c arm: switch to generic fork/vfork/clone 2012-11-28 22:13:54 -05:00
sys_oabi-compat.c ARM: oabi-compat: copy semops using __copy_from_user() 2018-10-18 09:16:28 +02:00
tcm.c ARM: 8388/1: tcm: Don't crash when TCM banks are protected by TrustZone 2015-06-06 10:37:28 +01:00
thumbee.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
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 ARM: 8771/1: kprobes: Prohibit kprobes on do_undefinstr 2018-05-22 18:54:00 +02:00
unwind.c ARM: 8176/1: Use current_stack_pointer in unwind_backtrace 2014-11-13 23:58:09 +00:00
v7m.c ARM: 7828/1: ARMv7-M: implement restart routine common to all v7-M machines 2013-09-02 13:49:29 +01:00
vdso.c ARM: 8748/1: mm: Define vdso_start, vdso_end as array 2018-05-30 07:52:20 +02:00
vmlinux-xip.lds.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmlinux.lds.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xscale-cp0.c ARM: make xscale iwmmxt code multiplatform aware 2015-12-01 21:44:24 +01:00