summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2016-02-05 14:58:50 +0000
committerJeff Vander Stoep <jeffv@google.com>2016-09-22 13:38:22 -0700
commit612055f383a023e12042f75d6d951e76ee4c5748 (patch)
tree700f95009cb9b6f1a5ce88d581a5f14e13968685 /tools/perf/scripts/python/bin
parentf7a32945ec495b6b88c251bd240b0d54f6636f06 (diff)
BACKPORT: arm64: kernel: Don't toggle PAN on systems with UAO
If a CPU supports both Privileged Access Never (PAN) and User Access Override (UAO), we don't need to disable/re-enable PAN round all copy_to_user() like calls. UAO alternatives cause these calls to use the 'unprivileged' load/store instructions, which are overridden to be the privileged kind when fs==KERNEL_DS. This patch changes the copy_to_user() calls to have their PAN toggling depend on a new composite 'feature' ARM64_ALT_PAN_NOT_UAO. If both features are detected, PAN will be enabled, but the copy_to_user() alternatives will not be applied. This means PAN will be enabled all the time for these functions. If only PAN is detected, the toggling will be enabled as normal. This will save the time taken to disable/re-enable PAN, and allow us to catch copy_to_user() accesses that occur with fs==KERNEL_DS. Futex and swp-emulation code continue to hang their PAN toggling code on ARM64_HAS_PAN. Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Bug: 30369029 Patchset: kaslr-arm64-4.4 (cherry picked from commit 705441960033e66b63524521f153fbb28c99ddbd) Signed-off-by: Jeff Vander Stoep <jeffv@google.com> Change-Id: I3fa35ebacaf401e1344e76932a26fdd14a8a3cdb
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions