Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Karl Mehltretter <kmehltretter@gmail.com>
Cc: Wei-Lin Chang <weilin.chang@arm.com>,
	Oliver Upton <oupton@kernel.org>, Fuad Tabba <tabba@google.com>,
	Joey Gouly <joey.gouly@arm.com>,
	Steffen Eiden <seiden@linux.ibm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	grayhat@foxmail.com
Subject: Re: [PATCH v3] KVM: arm64: nv: Keep the shadow S2 MMUs at fixed addresses
Date: Fri, 07 Aug 2026 16:43:47 +0100	[thread overview]
Message-ID: <87h5l6os0c.wl-maz@kernel.org> (raw)
In-Reply-To: <anUt9gd8HIwaj9jf@gmail.com>

On Fri, 07 Aug 2026 02:13:17 +0100,
Karl Mehltretter <kmehltretter@gmail.com> wrote:
> 
> On Thu, Aug 06, 2026 at 10:54:03PM +0100, Wei-Lin Chang wrote:
> > 
> > Hey sorry for nitpicking once more, I actually like v2 more, as this
> > version splits the error handling to two places. Marc's implementation
> > [1] is also good, but that requires a twist in kvm_arch_flush_shadow_all().
> > So I'd personally go with v2 (+my suggestions for it :)), but also fine if
> > others have other opinions.
> > 
> > I also think the comment in kvm_vcpu_init_nested() is worth adjusting
> > slightly, too.
> > 
> 
> No worries, thanks for taking another look.
> 
> I was following the guidance in include/linux/cleanup.h:
> 
>   the expectation is that usage of "goto" and cleanup helpers is never
>   mixed in the same function.
> 
> But maybe keeping goto is better. I'll wait a bit for others
> to comment.

The version I proposed in response to your first version had no goto,
and trivial error handling. Can we *please* stop the bike shedding and
settle on the simplest possible fix? Or *any* fix at all?

> 
> For the comment, I propose replacing the current text with:
> 
> 	/*
> 	 * If allocating an MMU object fails, keep the VNCR page alive so
> 	 * that userspace can retry vCPU initialisation without affecting
> 	 * the VM.
> 	 */
> 
> Is that the adjustment you had in mind?

I don't think we need to change any comment. If anything, it should be
deleted altogether. This is a security fix, not a literary exercise.

	M.

-- 
Jazz isn't dead. It just smells funny.


      reply	other threads:[~2026-08-07 15:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 19:24 [PATCH v3] KVM: arm64: nv: Keep the shadow S2 MMUs at fixed addresses Karl Mehltretter
2026-08-06 21:54 ` Wei-Lin Chang
2026-08-07  1:13   ` Karl Mehltretter
2026-08-07 15:43     ` Marc Zyngier [this message]

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=87h5l6os0c.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=grayhat@foxmail.com \
    --cc=joey.gouly@arm.com \
    --cc=kmehltretter@gmail.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oupton@kernel.org \
    --cc=seiden@linux.ibm.com \
    --cc=stable@vger.kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=tabba@google.com \
    --cc=weilin.chang@arm.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