diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2016-12-12 08:50:26 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2016-12-12 12:52:27 -0500 |
commit | 75037120e62b58c536999eb23d70cfcb6d6c0bcc (patch) | |
tree | 5fe10ee846ba9d7e5c61b1ea7ce0fc2fac83d793 | |
parent | cd9e1927a525f6ce7c0d99c6e038f0a0b9e85176 (diff) |
arm64: Disable PAN on uaccess_enable()
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>
-rw-r--r-- | arch/arm64/include/asm/uaccess.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h index 6986f56cfa88..d26750ca6e06 100644 --- a/arch/arm64/include/asm/uaccess.h +++ b/arch/arm64/include/asm/uaccess.h | |||
@@ -188,7 +188,7 @@ do { \ | |||
188 | 188 | ||
189 | #define __uaccess_enable(alt) \ | 189 | #define __uaccess_enable(alt) \ |
190 | do { \ | 190 | do { \ |
191 | if (uaccess_ttbr0_enable()) \ | 191 | if (!uaccess_ttbr0_enable()) \ |
192 | asm(ALTERNATIVE("nop", SET_PSTATE_PAN(0), alt, \ | 192 | asm(ALTERNATIVE("nop", SET_PSTATE_PAN(0), alt, \ |
193 | CONFIG_ARM64_PAN)); \ | 193 | CONFIG_ARM64_PAN)); \ |
194 | } while (0) | 194 | } while (0) |