arm64: uaccess: remove redundant PAN toggling
authorMark Rutland <mark.rutland@arm.com>
Wed, 2 Dec 2020 13:15:57 +0000 (13:15 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 2 Dec 2020 19:49:11 +0000 (19:49 +0000)
commit7cf283c7bd6260ae43a74cd213f5ec9d665a19b5
tree5545af2e5ab25dfc021e79ab6ab140a7d7ad4b4f
parentb5a5a01d8e9a44ecb18dc31d471233cad2f88291
arm64: uaccess: remove redundant PAN toggling

Some code (e.g. futex) needs to make privileged accesses to userspace
memory, and uses uaccess_{enable,disable}_privileged() in order to
permit this. All other uaccess primitives use LDTR/STTR, and never need
to toggle PAN.

Remove the redundant PAN toggling.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20201202131558.39270-12-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cpucaps.h
arch/arm64/include/asm/uaccess.h
arch/arm64/kernel/cpufeature.c