kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Marc Zyngier <maz@kernel.org>
Cc: catalin.marinas@arm.com, kernel-team@android.com,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] KVM: arm64: Move __hyp_set_vectors out of .hyp.text
Date: Thu, 28 Jan 2021 20:11:02 +0000	[thread overview]
Message-ID: <20210128201101.GA3016@willie-the-truck> (raw)
In-Reply-To: <d64f85c885701719d5f607c3d2f12600@kernel.org>

On Thu, Jan 28, 2021 at 06:11:52PM +0000, Marc Zyngier wrote:
> On 2021-01-28 17:38, Quentin Perret wrote:
> > The .hyp.text section is supposed to be reserved for the nVHE EL2 code.
> > However, there is currently one occurrence of EL1 executing code located
> > in .hyp.text when calling __hyp_{re}set_vectors(), which happen to sit
> > next to the EL2 stub vectors. While not a problem yet, such patterns
> > will cause issues when removing the host kernel from the TCB, so a
> > cleaner split would be preferable.
> > 
> > Fix this by delimiting the end of the .hyp.text section in hyp-stub.S.
> > 
> > Signed-off-by: Quentin Perret <qperret@google.com>
> > ---
> >  arch/arm64/kernel/hyp-stub.S | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S
> > index 160f5881a0b7..8a60f9c586bb 100644
> > --- a/arch/arm64/kernel/hyp-stub.S
> > +++ b/arch/arm64/kernel/hyp-stub.S
> > @@ -85,6 +85,8 @@ SYM_CODE_END(\label)
> >  	invalid_vector	el1_fiq_invalid
> >  	invalid_vector	el1_error_invalid
> > 
> > +	.popsection
> > +
> >  /*
> >   * __hyp_set_vectors: Call this after boot to set the initial
> > hypervisor
> >   * vectors as part of hypervisor installation.  On an SMP system, this
> > should
> 
> Thanks for tracking this one down, Quentin.
> 
> Catalin, Will: should you want to take this one via the arm64 tree,
> please add my
> 
> Acked-by: Marc Zyngier <maz:kernel.org>

Cheers, I'll pick this up for 5.12 with your Ack.

Will
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

  reply	other threads:[~2021-01-28 20:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 17:38 [PATCH] KVM: arm64: Move __hyp_set_vectors out of .hyp.text Quentin Perret
2021-01-28 18:11 ` Marc Zyngier
2021-01-28 20:11   ` Will Deacon [this message]
2021-01-28 21:07 ` Will Deacon

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=20210128201101.GA3016@willie-the-truck \
    --to=will@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    /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).