diff options
author | James Morse <james.morse@arm.com> | 2018-10-10 16:55:44 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-10-10 17:52:08 +0100 |
commit | 3b82a6ea23277f56c4f005872bb73c8ce29779d7 (patch) | |
tree | 9b9a4e0faa0221fbb22aee5a214424ba784d0e63 /drivers/oprofile/oprof.h | |
parent | 742fafa50b62cb9f379ba14a13443f52afdc0c5d (diff) |
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 'drivers/oprofile/oprof.h')
0 files changed, 0 insertions, 0 deletions