Skip to content

Commit 7503712

Browse files
Marc Zyngierctmarinas
authored andcommitted
arm64: Disable PAN on uaccess_enable()
Commit 4b65a5d ("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 <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent cd9e192 commit 7503712

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/include/asm/uaccess.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ do { \
188188

189189
#define __uaccess_enable(alt) \
190190
do { \
191-
if (uaccess_ttbr0_enable()) \
191+
if (!uaccess_ttbr0_enable()) \
192192
asm(ALTERNATIVE("nop", SET_PSTATE_PAN(0), alt, \
193193
CONFIG_ARM64_PAN)); \
194194
} while (0)

0 commit comments

Comments
 (0)