From: sashiko-bot@kernel.org
To: "Jeremy Linton" <jeremy.linton@arm.com>
Cc: "Petr Pavlu" <petr.pavlu@suse.com>, linux-modules@vger.kernel.org
Subject: Re: [RFC 3/3] arm64: bti: Drop compiler specific BTI checks
Date: Tue, 06 Oct 2026 22:26:27 +0000 [thread overview]
Message-ID: <sashiko-outbox-162483@kernel.org> (raw)
In-Reply-To: <20261006221815.2823252-4-jeremy.linton@arm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: Kconfig: GCC 9 BTI code generation defect exposed
--
commit 1d7b856a59cb9c3b290733174839f2dcf79cb2c1
Author: Jeremy Linton <jeremy.linton@arm.com>
arm64: bti: Drop compiler specific BTI checks
This commit drops compiler-specific version checks for ARM64_BTI_KERNEL,
relying on a link pass to correct specific cases of missing BTI landing
pads in modules generated by clang and gcc.
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 41ce1fd6ca91e..3c9b89fc215c2 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -2140,12 +2140,6 @@ config ARM64_BTI_KERNEL
> depends on ARM64_BTI
> depends on ARM64_PTR_AUTH_KERNEL
> depends on CC_HAS_BRANCH_PROT_PAC_RET_BTI
> - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94697
> - depends on !CC_IS_GCC || GCC_VERSION >= 100100
[Severity: High]
Does the newly added module link script mitigate the specific code generation
defect from GCC bug 94697?
The new script scans for and mitigates missing landing pads for cross-section
direct module calls to address GCC bug 106671 and LLVM issue 215547. However,
GCC bug 94697 is a separate defect present in GCC 9 where the compiler fails
to emit BTI landing pads for internal indirect branches to address-taken local
labels.
If the script does not rewrite internal indirect branches, dropping this check
will allow GCC 9 to build a BTI-enabled kernel with incorrectly annotated
machine code. Will this result in runtime Branch Target exceptions when
executing those internal indirect branches?
> - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106671
> - depends on !CC_IS_GCC
> - # https://github.com/llvm/llvm-project/issues/215547
> - depends on !CC_IS_CLANG || CLANG_VERSION < 210000
> depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_ARGS)
> help
> Build the kernel with Branch Target Identification annotations
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261006221815.2823252-1-jeremy.linton@arm.com?part=3
next prev parent reply other threads:[~2026-10-06 22:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 22:18 [RFC 0/3] kbuild: modules: Fixup arm64 BTI relocations Jeremy Linton
2026-10-06 22:18 ` [RFC 1/3] kbuild: modules: Add arm64 BTI fixup utility Jeremy Linton
2026-10-06 22:32 ` sashiko-bot
2026-10-06 22:18 ` [RFC 2/3] kbuild: modules: Build and trigger BTI scanner for arm64 Jeremy Linton
2026-10-06 22:28 ` sashiko-bot
2026-10-06 22:18 ` [RFC 3/3] arm64: bti: Drop compiler specific BTI checks Jeremy Linton
2026-10-06 22:26 ` sashiko-bot [this message]
2026-10-07 8:09 ` [RFC 0/3] kbuild: modules: Fixup arm64 BTI relocations Emanuele Rocca
2026-10-07 8: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=sashiko-outbox-162483@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=jeremy.linton@arm.com \
--cc=linux-modules@vger.kernel.org \
--cc=petr.pavlu@suse.com \
--cc=sashiko-reviews@lists.linux.dev \
/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