Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Nick Desaulniers" <ndesaulniers@google.com>,
	"Josh Poimboeuf" <jpoimboe@kernel.org>
Cc: "Will Deacon" <will@kernel.org>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	live-patching@vger.kernel.org, "Song Liu" <song@kernel.org>,
	"Miroslav Benes" <mbenes@suse.cz>,
	"Petr Mladek" <pmladek@suse.com>,
	"Joe Lawrence" <joe.lawrence@redhat.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Mark Brown" <broonie@kernel.org>, "Kees Cook" <kees@kernel.org>
Subject: Re: [PATCH] arm64/module: Fix livepatch BTI exceptions with Clang 21+
Date: Tue, 11 Aug 2026 18:54:51 +0200	[thread overview]
Message-ID: <b4bdf563-274f-4ab9-804f-35c47ab2f353@app.fastmail.com> (raw)
In-Reply-To: <CAKwvOdkS5ZaBGaoiLwcXqCBjcOXLXE88VD3bj5ES1sssKFf4HA@mail.gmail.com>


On Tue, 11 Aug 2026, at 18:52, Nick Desaulniers wrote:
> On Tue, Aug 11, 2026 at 9:41 AM Josh Poimboeuf <jpoimboe@kernel.org> wrote:
>>
>> On Tue, Aug 11, 2026 at 09:27:28AM -0700, Nick Desaulniers wrote:
>> > On Tue, Aug 11, 2026 at 7:23 AM Will Deacon <will@kernel.org> wrote:
>> > >
>> > > On Tue, Aug 11, 2026 at 03:18:17PM +0200, Ard Biesheuvel wrote:
>> > > >
>> > > > On Tue, 11 Aug 2026, at 14:02, Ard Biesheuvel wrote:
>> > > > > On Tue, 11 Aug 2026, at 11:44, Will Deacon wrote:
>> > > > >> On Mon, Aug 10, 2026 at 09:41:35AM -0700, Nick Desaulniers wrote:
>> > > > >
>> > > > >>> Sure, but let's replace this with a link to a bug report in llvm's
>> > > > >>> issue tracker?
>> > > > >>
>> > > > >> Yes, please! I can apply the patch once we have the bug number.
>> > > > >>
>> > > > >
>> > > > > I can look into that.
>> > > >
>> > > > https://github.com/llvm/llvm-project/issues/215547
>> > >
>> > > Thanks, Ard. I've ended up with the patch below.
>> >
>> > What's the extent that HAVE_LIVEPATCH will be used?
>> >
>> > Does this penalize kernels built with BTI in favor of HAVE_LIVEPATCH?
>> >
>> > For example, with my Android hat on, if we have a kernel that's built
>> > with ARM64_BTI_KERNEL=y, and _dont_ use HAVE_LIVEPATCH, we're going to
>> > turn off BTI for a feature we're not using?  But maybe we _do_ intend
>> > to use HAVE_LIVEPATCH, and my assumption was wrong?
>>
>> The problem isn't specific to livepatch, livepatch just makes it easier
>> to hit.
>
> Rereading Ard's report, let me see if I can articulate _how_ and tell
> me if I'm still not getting it.
>
> Let's say we have code in .init.text that calls code in .text. If
> .text was placed large enough away from .init.text, we get a veneer
> inserted by _the kernel_ (not the linker).  This veneer has an
> indirect call to the destination. No landing pad. Boom.
>
> Is that precise?
>

Yes.


  reply	other threads:[~2026-08-11 16:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 21:46 [PATCH] arm64/module: Fix livepatch BTI exceptions with Clang 21+ Josh Poimboeuf
2026-08-07 22:00 ` sashiko-bot
2026-08-10 10:31 ` Will Deacon
2026-08-10 15:48   ` Josh Poimboeuf
2026-08-10 16:12     ` Ard Biesheuvel
2026-08-10 16:39       ` Josh Poimboeuf
2026-08-10 16:41         ` Nick Desaulniers
2026-08-11  9:44           ` Will Deacon
2026-08-11 12:02             ` Ard Biesheuvel
2026-08-11 13:18               ` Ard Biesheuvel
2026-08-11 14:23                 ` Will Deacon
2026-08-11 14:55                   ` Ard Biesheuvel
2026-08-11 15:05                     ` Josh Poimboeuf
2026-08-11 16:27                   ` Nick Desaulniers
2026-08-11 16:41                     ` Josh Poimboeuf
2026-08-11 16:52                       ` Nick Desaulniers
2026-08-11 16:54                         ` Ard Biesheuvel [this message]
2026-08-11 17:05                           ` Nick Desaulniers
2026-08-11 17:08                             ` Ard Biesheuvel
2026-08-11 16:17                 ` Nick Desaulniers
2026-08-11 17:23                   ` Mark Brown
2026-08-10 16:25   ` Mark Brown

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=b4bdf563-274f-4ab9-804f-35c47ab2f353@app.fastmail.com \
    --to=ardb@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mbenes@suse.cz \
    --cc=ndesaulniers@google.com \
    --cc=pmladek@suse.com \
    --cc=song@kernel.org \
    --cc=will@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