From: Will Deacon <will@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>,
linux-arm-kernel@lists.infradead.org,
"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
Mostafa Saleh <smostafa@google.com>,
Catalin marinas <catalin.marinas@arm.com>,
Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [PATCH] arm64: Unconditionally select CONFIG_JUMP_LABEL
Date: Mon, 16 Jun 2025 12:30:52 +0100 [thread overview]
Message-ID: <20250616113052.GA17582@willie-the-truck> (raw)
In-Reply-To: <aEw6A5-xvWSGPnOF@J2N7QTR9R3>
On Fri, Jun 13, 2025 at 03:47:31PM +0100, Mark Rutland wrote:
> On Fri, Jun 13, 2025 at 03:19:36PM +0100, Marc Zyngier wrote:
> > Aneesh reports that his kernel fails to boot in nVHE mode with
> > KVM's protected mode enabled. Further investigation by Mostafa
> > reveals that this fails because CONFIG_JUMP_LABEL=n and that
> > we have static keys shared between EL1 and EL2.
> >
> > While this can be worked around, it is obvious that we have long
> > relied on having CONFIG_JUMP_LABEL enabled at all times, as all
> > supported compilers now have 'asm goto' (which is the basic block
> > for jump labels).
> >
> > Let's simplify our lives once and for all by mandating jump labels.
> > It's not like anyone else is testing anything without them, and
> > we already rely on them for other things (kfence, xfs, preempt).
> >
> > Link: https://lore.kernel.org/r/yq5ah60pkq03.fsf@kernel.org
> > Reported-by: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>
> > Reported-by: Mostafa Saleh <smostafa@google.com>
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > Cc: Will Deacon <will@kernel.org>
> > Cc: Catalin marinas <catalin.marinas@arm.com>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Ard Biesheuvel <ardb@kernel.org>
>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
>
> It might be worth noting that even with this, we still need to take care
> to not use arbitrary static keys in hyp code (since we don't to consume
> anything that can legitimately be flipped after hyp initialization), but
> that aspect should be dealt with by reviewing additions to image-vars.h.
Right, we should probably try to re-use the static key sealing mechanism
used for the handling of __ro_after_init keys so that the host doesn't
try to patch the hyp text after de-privilege (which will result in a
panic).
Will
next prev parent reply other threads:[~2025-06-16 12:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 14:19 [PATCH] arm64: Unconditionally select CONFIG_JUMP_LABEL Marc Zyngier
2025-06-13 14:47 ` Mark Rutland
2025-06-16 11:30 ` Will Deacon [this message]
2025-07-04 17:44 ` 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=20250616113052.GA17582@willie-the-truck \
--to=will@kernel.org \
--cc=aneesh.kumar@kernel.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=smostafa@google.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