aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-09-07 00:29:15 +0100
committerKees Cook <keescook@chromium.org>2015-11-18 11:10:42 -0800
commitda8cfaf1fc24625aa220a29f3b1fde6c172a2cf2 (patch)
treec38de4401a6829b54eb63161d922c81a83a749d5
parent9f4d82cfa4664b3fd9be1ac8118ab090a1750df3 (diff)
downloadv4.1-da8cfaf1fc24625aa220a29f3b1fde6c172a2cf2.tar.gz
UPSTREAM: ARM: swpan: fix nwfpe for uaccess changes
NWFPE needs to access userspace to check whether the next instruction is another FP instruction. Allow userspace access for this read. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Bug: 25672827 Patchset: PAN emulation (cherry picked from commit 39dc53deff30d9b239ac36cfeb0ef2022d03a449) Signed-off-by: Kees Cook <keescook@google.com> Change-Id: Ia9a0fd707d14f8a8f4b181a210a8e27fabd9060d
-rw-r--r--arch/arm/nwfpe/entry.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/nwfpe/entry.S b/arch/arm/nwfpe/entry.S
index 71df4354765..39c20afad7e 100644
--- a/arch/arm/nwfpe/entry.S
+++ b/arch/arm/nwfpe/entry.S
@@ -95,9 +95,10 @@ emulate:
reteq r4 @ no, return failure
next:
+ uaccess_enable r3
.Lx1: ldrt r6, [r5], #4 @ get the next instruction and
@ increment PC
-
+ uaccess_disable r3
and r2, r6, #0x0F000000 @ test for FP insns
teq r2, #0x0C000000
teqne r2, #0x0D000000