aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2016-12-12 13:50:26 +0000
committerAlex Shi <alex.shi@linaro.org>2017-05-27 11:47:58 +0800
commit8ab4646d94cfa23f0892331664374acee5763d02 (patch)
tree7cfa2a19675efe1cc83940ad0cca3d17ab7b4147
parent9f72bfbc3b0786e2025b177e959f8bc68659fe07 (diff)
downloadlinux-linaro-stable-v4.9/topic/PANemulation.tar.gz
arm64: Disable PAN on uaccess_enable()v4.9/topic/PANemulation
Commit 4b65a5db3627 ("arm64: Introduce uaccess_{disable,enable} functionality based on TTBR0_EL1") added conditional user access enable/disable. Unfortunately, a typo prevents the PAN bit from being cleared for user access functions. Restore the PAN functionality by adding the missing '!'. Fixes: b65a5db3627 ("arm64: Introduce uaccess_{disable,enable} functionality based on TTBR0_EL1") Reported-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> (cherry picked from commit 75037120e62b58c536999eb23d70cfcb6d6c0bcc) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--arch/arm64/include/asm/uaccess.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h
index 6986f56..d26750c 100644
--- a/arch/arm64/include/asm/uaccess.h
+++ b/arch/arm64/include/asm/uaccess.h
@@ -188,7 +188,7 @@ do { \
#define __uaccess_enable(alt) \
do { \
- if (uaccess_ttbr0_enable()) \
+ if (!uaccess_ttbr0_enable()) \
asm(ALTERNATIVE("nop", SET_PSTATE_PAN(0), alt, \
CONFIG_ARM64_PAN)); \
} while (0)