[PATCH] arm64: kvm: Make nvhe stack size configurable
Marc Zyngier
maz at kernel.org
Sun Nov 10 03:05:58 PST 2024
[that's an impressive Cc list...]
On Fri, 08 Nov 2024 21:14:00 +0000,
Kalesh Singh <kaleshsingh at google.com> wrote:
>
> In order to make the nVHE stack size easily configurable,
> introduce NVHE_STACK_SHIFT which must be >= PAGE_SHIFT.
>
> The default stack size remains 1 page (no functional change)
>
> Downstream vendor features which require a larger stack
> can configure it by setting CONFIG_NVHE_STACK_SHIFT.
We don't let make the stack size configurable for the rest of the
kernel, do we? Why should a tiny portion be treated differently?
Making this configurable means that testing is harder, and bugs harder
to reproduce. It also seems specially designed to allow badly written
code to run in hypervisor context. And once you allow two pages to be
used (up to 128kB), what prevents the "downstream vendor" to push this
to 4 or 8?
If anything, I would prefer to see this (obviously out of tree) code
isolated with its own stack instead of growing EL2's private stack. At
least this would make the problems attributable to the guilty party.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list