Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Ard Biesheuvel <ardb+git@google.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mark Brown <broonie@kernel.org>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH v2 1/2] arm64: module: Emit BTI veneers for cross-section calls
Date: Wed, 18 Nov 2026 17:14:51 +0000	[thread overview]
Message-ID: <av3dC9SRzdZc6REO@arm.com> (raw)
In-Reply-To: <536669c0-1e59-4d9c-9601-2691689da8bf@app.fastmail.com>

On Thu, Nov 12, 2026 at 12:11:02PM +0100, Ard Biesheuvel wrote:
> On Wed, 4 Nov 2026, at 17:28, Catalin Marinas wrote:
> > Apart from those, I don't have other technical objections to the patch
> > but I wonder whether we'll find alternative options going forward that
> > make this fix redundant. E.g. allocating .init.text and .text together
> > (you had an RFC) or a new execmem_alloc_near() to try to place them
> > nearby.
> >
> > In the meantime, would something like the following work for us instead
> > of the veneers? We won't free the .init.text module section but this
> > should be small. There's the ppc64 precedent.
> >
> > bool module_init_section(const char *name)
> > {
> > 	if (system_supports_bti_kernel() && strstarts(name, ".init.text"))
> > 		return false;
> >
> > 	return strstarts(name, ".init");
> > }
> >
> 
> I've done an experiment to simply combine these unconditionally, and the
> impact on module .text footprint on a typical config is negligible (~10k
> per 100 loaded modules). That would make this change unnecessary, and would
> allow the init PLTs and init ftrace trampoline to be dropped as well.

I forgot about this thread. Thanks for testing. That's fine by me to
make it unconditional. Would you mind respinning with the above? I guess
we still need the Kconfig checks.

Thanks.

-- 
Catalin


  reply	other threads:[~2026-11-18 17:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05 11:05 [PATCH v2 0/2] arm64: Implement support for BTI veneers Ard Biesheuvel
2026-10-05 11:05 ` [PATCH v2 1/2] arm64: module: Emit BTI veneers for cross-section calls Ard Biesheuvel
2026-10-05 15:07   ` Mark Brown
2026-11-04 16:28   ` Catalin Marinas
2026-11-12 11:11     ` Ard Biesheuvel
2026-11-18 17:14       ` Catalin Marinas [this message]
2026-10-05 11:05 ` [PATCH v2 2/2] DONOTMERGE: arm64: module: Test module for BTI veneers Ard Biesheuvel
2026-11-04  8:55 ` [PATCH v2 0/2] arm64: Implement support " Ard Biesheuvel

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=av3dC9SRzdZc6REO@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=ardb+git@google.com \
    --cc=ardb@kernel.org \
    --cc=broonie@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ndesaulniers@google.com \
    --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