Skip to contentSkip to conversation

Patch "arm64: Ensure the instruction emulation is ready for userspace" has been added to the 4.13-stable tree

PATCH [email protected] 1 participant 1 message Oct 10, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

arm64: Ensure the instruction emulation is ready for userspace

to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
arm64-ensure-the-instruction-emulation-is-ready-for-userspace.patch
and it can be found in the queue-4.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From c0d8832e78cbfd4a64b7112e34920af4b0b0e60e Mon Sep 17 00:00:00 2001

From: Suzuki K Poulose <[email protected]>
Date: Fri, 6 Oct 2017 14:16:52 +0100
Subject: arm64: Ensure the instruction emulation is ready for userspace

From: Suzuki K Poulose <[email protected]>

commit c0d8832e78cbfd4a64b7112e34920af4b0b0e60e upstream.

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.

---
 arch/arm64/kernel/armv8_deprecated.c |    2 +-
 arch/arm64/kernel/cpufeature.c       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/armv8_deprecated.c +1 -1
@@ -649,4 +649,4 @@ static int __init armv8_deprecated_init(
 	return 0;
 }
 
-late_initcall(armv8_deprecated_init);
+core_initcall(armv8_deprecated_init);
arch/arm64/kernel/cpufeature.c +1 -1
@@ -1294,4 +1294,4 @@ static int __init enable_mrs_emulation(v
 	return 0;
 }
 
-late_initcall(enable_mrs_emulation);
+core_initcall(enable_mrs_emulation);

Patches currently in stable-queue which might be from [email protected] are

queue-4.13/arm64-ensure-the-instruction-emulation-is-ready-for-userspace.patch