]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Ensure the instruction emulation is ready for userspace
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Fri, 6 Oct 2017 13:16:52 +0000 (14:16 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 6 Oct 2017 15:35:21 +0000 (16:35 +0100)
commitb2e701724e37420702eb421f88f99e0f43737931
tree88956debba4dc1034e63313220c53d0399560242
parent6ee5f11be996050afdf740c97e8ad4abc155b899
arm64: Ensure the instruction emulation is ready for userspace

We trap and emulate some instructions (e.g, mrs, deprecated instructions)
for the userspace. However the handlers for these are registered as
late_initcalls and the userspace could be up and running from the initramfs
by that time (with populate_rootfs, which is a rootfs_initcall()). This
could cause problems for the early applications ending up in failure
like :

[   11.152061] modprobe[93]: undefined instruction: pc=0000ffff8ca48ff4

This patch promotes the specific calls to core_initcalls, which are
guaranteed to be completed before we hit userspace.

Cc: stable@vger.kernel.org
Cc: Dave Martin <dave.martin@arm.com>
Cc: Matthias Brugger <mbrugger@suse.com>
Cc: James Morse <james.morse@arm.com>
Reported-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/armv8_deprecated.c
arch/arm64/kernel/cpufeature.c