linux-stable/arch/arm64
Shanker Donthineni ea6eac904f arm64: Avoid clobbering mm in erratum workaround on QDF2400
Commit 38fd94b027 ("arm64: Work around Falkor erratum 1003") tried to
work around a hardware erratum, but actually caused a system crash of
its own during switch_mm:

 cpu_do_switch_mm+0x20/0x40
 efi_virtmap_load+0x34/0x40
 virt_efi_get_next_variable+0x64/0xc8
 efivar_init+0x8c/0x348
 efisubsys_init+0xd4/0x270
 do_one_initcall+0x80/0x110
 kernel_init_freeable+0x19c/0x240
 kernel_init+0x10/0x100
 ret_from_fork+0x10/0x50

 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

In cpu_do_switch_mm, x1 contains the mm_struct pointer, which needs to
be preserved by the pre_ttbr0_update_workaround macro rather than passed
as a temporary.

This patch clobbers x2 and x3 instead, keeping the mm_struct intact
after the workaround has run.

Fixes: 38fd94b027 ("arm64: Work around Falkor erratum 1003")
Tested-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-02-24 10:55:31 +00:00
..
boot Amlogic fixes for v4.10 2017-01-04 16:42:00 +01:00
configs ARM64: defconfig: enable DRM_MESON as module 2017-01-03 09:31:13 -08:00
crypto crypto: arm64/crc32 - accelerated support based on x86 SSE implementation 2016-12-07 20:01:22 +08:00
include arm64: ptrace: add XZR-safe regs accessors 2017-02-15 12:20:29 +00:00
kernel arm64/kprobes: consistently handle MRS/MSR with XZR 2017-02-15 12:20:29 +00:00
kvm arm64: KVM: Save/restore the host SPE state when entering/leaving a VM 2017-02-02 18:33:01 +00:00
lib arm64: don't pull uaccess.h into *.S 2016-12-26 13:05:17 -05:00
mm arm64: Avoid clobbering mm in erratum workaround on QDF2400 2017-02-24 10:55:31 +00:00
net arm64: bpf: optimize LD_ABS, LD_IND 2016-06-10 23:11:50 -07:00
xen arm64: don't pull uaccess.h into *.S 2016-12-26 13:05:17 -05:00
Kconfig arm64: Work around Falkor erratum 1003 2017-02-10 11:22:12 +00:00
Kconfig.debug efi: arm64: Add vmlinux debug link to the Image binary 2017-02-03 15:22:37 +00:00
Kconfig.platforms ARM: SoC driver updates for v4.10 2016-12-15 16:03:25 -08:00
Makefile arm64: Add detection code for broken .inst support in binutils 2016-12-06 15:54:21 +00:00