[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86r07jz6uh.wl-maz@kernel.org>
Date: Sun, 10 Nov 2024 11:05:58 +0000
From: Marc Zyngier <maz@...nel.org>
To: Kalesh Singh <kaleshsingh@...gle.com>
Cc: will@...nel.org,
qperret@...gle.com,
broonie@...nel.org,
mark.rutland@....com,
keir@...gle.com,
vdonnefort@...gle.com,
kernel-team@...roid.com,
android-mm@...gle.com,
Catalin Marinas <catalin.marinas@....com>,
Oliver Upton <oliver.upton@...ux.dev>,
Joey Gouly <joey.gouly@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Zenghui Yu <yuzenghui@...wei.com>,
Ard Biesheuvel <ardb@...nel.org>,
D Scott Phillips <scott@...amperecomputing.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Ankit Agrawal <ankita@...dia.com>,
Wang Jinchao <wangjinchao@...sion.com>,
"Madhavan T. Venkataraman" <madvenka@...ux.microsoft.com>,
"Pierre-Clément Tosi" <ptosi@...gle.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Ryan Roberts <ryan.roberts@....com>,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
kvmarm@...ts.linux.dev
Subject: Re: [PATCH] arm64: kvm: Make nvhe stack size configurable
[that's an impressive Cc list...]
On Fri, 08 Nov 2024 21:14:00 +0000,
Kalesh Singh <kaleshsingh@...gle.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.
Powered by blists - more mailing lists