linux-stable/arch
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
..
alpha Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2018-08-24 09:25:39 -07:00
arc kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
arm arm64: KVM: Enable Common Not Private translations 2018-09-18 12:03:34 +01:00
arm64 Revert "arm64: uaccess: implement unsafe accessors" 2018-10-10 17:52:08 +01:00
c6x kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
h8300 Kbuild updates for v4.19 (2nd) 2018-08-25 13:40:38 -07:00
hexagon kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
ia64 ia64: Fix allnoconfig section mismatch for ioc_init/ioc_iommu_info 2018-08-22 14:12:47 -07:00
m68k m68k/mac: Use correct PMU response format 2018-08-31 09:33:45 +02:00
microblaze kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
mips Kbuild updates for v4.19 (2nd) 2018-08-25 13:40:38 -07:00
nds32 kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
nios2 nios2: kconfig: remove duplicate DEBUG_STACK_USAGE symbol defintions 2018-08-27 09:47:20 +08:00
openrisc OpenRISC updates for 4.19 2018-08-23 14:09:37 -07:00
parisc Merge branch 'parisc-4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2018-08-22 14:06:37 -07:00
powerpc powerpc: disable support for relative ksymtab references 2018-08-29 16:12:07 -07:00
riscv RISC-V: Use a less ugly workaround for unused variable warnings 2018-08-28 12:58:36 -07:00
s390 Kbuild updates for v4.19 (2nd) 2018-08-25 13:40:38 -07:00
sh kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
sparc Kbuild updates for v4.19 (2nd) 2018-08-25 13:40:38 -07:00
um kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
unicore32 mm: convert return type of handle_mm_fault() caller to vm_fault_t 2018-08-17 16:20:28 -07:00
x86 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-09-02 10:11:30 -07:00
xtensa Kbuild updates for v4.19 (2nd) 2018-08-25 13:40:38 -07:00
.gitignore
Kconfig Merge branch 'tlb-fixes' 2018-08-23 14:55:01 -07:00