Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Will Deacon" <will@kernel.org>
Cc: "Nick Desaulniers" <ndesaulniers@google.com>,
	"Josh Poimboeuf" <jpoimboe@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 16:55:37 +0200	[thread overview]
Message-ID: <eb01f226-b067-42dc-be86-328a19a20844@app.fastmail.com> (raw)
In-Reply-To: <answWdRpVQLtIzIj@willie-the-truck>


On Tue, 11 Aug 2026, at 16:23, Will Deacon wrote:

> Author: Josh Poimboeuf <jpoimboe@kernel.org>
> Date:   Tue Aug 11 14:11:44 2026 +0000
>
>     arm64: bti: Disable in-kernel BTI with recent versions of Clang
>    
>     The following BTI exception was seen when loading a livepatch module:
>    
>       Internal error: Oops - BTI: 0000000036000001 [#1]  SMP
>       pstate: 634004c9 (nZCv daIF +PAN -UAO +TCO +DIT -SSBS BTYPE=jc)
>       pc : kill_orphaned_pgrp+0x0/0x150
>       lr : do_exit+0x498/0xaf0 [livepatch_combined]
>    
>     The problem is that the patch module's do_exit() is branching to a
>     static function in vmlinux using a module PLT veneer (indirect branch),
>     but the target function doesn't have a BTI landing pad.
>    

I had missed this bit before, i.e., the fact that the target is a static
function inside vmlinux.

The lack of a BTI landing pad suggests that the address of this function
is never taken either, and so the symbol in question is not exported to
modules, right?

Does KLP make any special accommodations to ensure that this is safe? Otherwise,
BTI is not the only potential issue: the compiler may apply interprocedural
optimizations, and the function in question may not be AAPCS64 compliant as
a result.

It also means treating cross-section jumps as indirect calls in the BTI
landing pad elision heuristic would not work around the issue here.



  reply	other threads:[~2026-08-11 14:56 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 [this message]
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
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=eb01f226-b067-42dc-be86-328a19a20844@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