On Wed, Oct 04, 2017 at 12:10:40PM +0100, Catalin Marinas wrote:
On Wed, Oct 04, 2017 at 11:14:26AM +0100, Mark Rutland wrote:
On Wed, Oct 04, 2017 at 10:48:05AM +0100, Suzuki K Poulose wrote:
Make sure the MRS emulation is enabled early enough, such that the
early userspace applications (e.g, those run from initrd) could
use the facility without crashing them.
Fixes: commit 77c97b4ee2129 ("arm64: cpufeature: Expose CPUID registers by emulation")
Reported-by: Matwey V. Kornilov <matwey.kornilov@xxxxxxxxx>
Cc: James Morse <james.morse@xxxxxxx>
Cc: Dave Martin <Dave.martin@xxxxxxx>
Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
Cc: Will Deacon <will.deacon@xxxxxxx>
Cc: Mark Rutland <mark.rutland@xxxxxxx>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
This looks sensible, but shouldn't we do the same for other
late_inicalls can affect initrd userspace?
e.g. armv8_deprecated_init, fpsimd_init, sys_reg_genericv8_init?
I think we should, though not all of them are concerned with the user
code. For example, fpsimd_init() takes care of the pm/hotplug aspect and
nothing to do with user space.
My worry was that without the pm/hotplug notifiers, things could go
wrong during the initrd. e.g. we could lose userspace fp state without
the pm notifier, or userspace could trigger hotplpug that we wouldn't
So even if it's not directly userspace related, it can affect (or can be
affected by) initrd userspace.