diff options
author | James Morse <james.morse@arm.com> | 2018-10-10 17:55:44 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-10-10 18:52:08 +0200 |
commit | 3b82a6ea23277f56c4f005872bb73c8ce29779d7 (patch) | |
tree | 9b9a4e0faa0221fbb22aee5a214424ba784d0e63 /Documentation/arm64 | |
parent | arm64: mm: Drop the unused cpu parameter (diff) | |
download | linux-3b82a6ea23277f56c4f005872bb73c8ce29779d7.tar.xz linux-3b82a6ea23277f56c4f005872bb73c8ce29779d7.zip |
Revert "arm64: uaccess: implement unsafe accessors"
This reverts commit a1f33941f7e103bcf471eaf8461b212223c642d6.
The unsafe accessors allow the PAN enable/disable calls to be made
once for a group of accesses. Adding these means we can now have
sequences that look like this:
| user_access_begin();
| unsafe_put_user(static-value, x, err);
| unsafe_put_user(helper-that-sleeps(), x, err);
| user_access_end();
Calling schedule() without taking an exception doesn't switch the
PSTATE or TTBRs. We can switch out of a uaccess-enabled region, and
run other code with uaccess enabled for a different thread.
We can also switch from uaccess-disabled code back into this region,
meaning the unsafe_put_user()s will fault.
For software-PAN, threads that do this will get stuck as
handle_mm_fault() will determine the page has already been mapped in,
but we fault again as the page tables aren't loaded.
To solve this we need code in __switch_to() that save/restores the
PAN state.
Acked-by: Julien Thierry <julien.thierry@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'Documentation/arm64')
0 files changed, 0 insertions, 0 deletions