[PATCH v2 3/4] KVM: arm64: Selftest for pKVM transitions
Marc Zyngier
maz at kernel.org
Wed Feb 26 06:32:52 PST 2025
On Tue, 25 Feb 2025 01:53:26 +0000,
Quentin Perret <qperret at google.com> wrote:
>
> We have recently found a bug [1] in the pKVM memory ownership
> transitions by code inspection, but it could have been caught with a
> test.
>
> Introduce a boot-time selftest exercising all the known pKVM memory
> transitions and importantly checks the rejection of illegal transitions.
>
> The new test is hidden behind a new Kconfig option separate from
> CONFIG_EL2_NVHE_DEBUG on purpose as that has side effects on the
> transition checks ([1] doesn't reproduce with EL2 debug enabled).
That's a bit annoying, isn't it? Without EL2_DEBUG selected, you won't
get any stacktrace, and the WARN_ON()s are a guaranteed panic. Yes,
this is better than nothing, but I'm a bit worried this is going to be
hard to use.
Is there a way to reduce the impact the EL2 debug has on the rest of
the code? It feels like it is more invasive than it should be...
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list