linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Kalesh Singh <kaleshsingh@google.com>
Cc: will@kernel.org, qperret@google.com, broonie@kernel.org,
	mark.rutland@arm.com, keir@google.com, vdonnefort@google.com,
	kernel-team@android.com, android-mm@google.com,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Oliver Upton" <oliver.upton@linux.dev>,
	"Joey Gouly" <joey.gouly@arm.com>,
	"Suzuki K Poulose" <suzuki.poulose@arm.com>,
	"Zenghui Yu" <yuzenghui@huawei.com>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"D Scott Phillips" <scott@os.amperecomputing.com>,
	"Andrey Konovalov" <andreyknvl@gmail.com>,
	"Ankit Agrawal" <ankita@nvidia.com>,
	"Wang Jinchao" <wangjinchao@xfusion.com>,
	"Madhavan T. Venkataraman" <madvenka@linux.microsoft.com>,
	"Pierre-Clément Tosi" <ptosi@google.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Ryan Roberts" <ryan.roberts@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev
Subject: Re: [PATCH] arm64: kvm: Make nvhe stack size configurable
Date: Sun, 10 Nov 2024 11:05:58 +0000	[thread overview]
Message-ID: <86r07jz6uh.wl-maz@kernel.org> (raw)
In-Reply-To: <20241108211446.3304809-1-kaleshsingh@google.com>

[that's an impressive Cc list...]

On Fri, 08 Nov 2024 21:14:00 +0000,
Kalesh Singh <kaleshsingh@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.


  reply	other threads:[~2024-11-10 11:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 21:14 [PATCH] arm64: kvm: Make nvhe stack size configurable Kalesh Singh
2024-11-10 11:05 ` Marc Zyngier [this message]
2024-11-11 17:10   ` Kalesh Singh
2024-11-11 17:52     ` Marc Zyngier
2024-11-12  0:52       ` Kalesh Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86r07jz6uh.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=andreyknvl@gmail.com \
    --cc=android-mm@google.com \
    --cc=ankita@nvidia.com \
    --cc=ardb@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kaleshsingh@google.com \
    --cc=keir@google.com \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=madvenka@linux.microsoft.com \
    --cc=mark.rutland@arm.com \
    --cc=oliver.upton@linux.dev \
    --cc=ptosi@google.com \
    --cc=qperret@google.com \
    --cc=ryan.roberts@arm.com \
    --cc=scott@os.amperecomputing.com \
    --cc=suzuki.poulose@arm.com \
    --cc=vdonnefort@google.com \
    --cc=wangjinchao@xfusion.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).