linux-stable/arch/arm64
James Morse 3b82a6ea23 Revert "arm64: uaccess: implement unsafe accessors"
This reverts commit a1f33941f7.

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>
2018-10-10 17:52:08 +01:00
..
boot ARM: SoC: late updates 2018-08-25 14:12:36 -07:00
configs arm64: defconfig: Enable TI's AM6 SoC platform 2018-08-29 11:51:26 -07:00
crypto crypto: arm64/aes-gcm-ce - fix scatterwalk API violation 2018-08-25 19:50:43 +08:00
include Revert "arm64: uaccess: implement unsafe accessors" 2018-10-10 17:52:08 +01:00
kernel arm64: Trap WFI executed in userspace 2018-10-01 16:52:24 +01:00
kvm arm64: KVM: Enable Common Not Private translations 2018-09-18 12:03:34 +01:00
lib arm64: lse: remove -fcall-used-x0 flag 2018-09-24 10:56:24 +01:00
mm arm64: mm: Drop the unused cpu parameter 2018-10-09 17:17:23 +01:00
net bpf, arm64: save 4 bytes in prologue when ebpf insns came from cbpf 2018-05-14 19:11:45 -07:00
xen arm64: mm: Add additional parameter to uaccess_ttbr0_disable 2018-01-17 13:57:49 +01:00
Kconfig arm64: arch_timer: avoid unused function warning 2018-10-03 11:41:34 +01:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Kconfig.platforms ARM: SoC: late updates 2018-08-25 14:12:36 -07:00
Makefile kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00