Subject: Re: [PATCH 1/2] arm64: lib: Use .arch_extension

From: Catalin Marinas <[email-masked]>
Date: Wed, 25 Mar 2020 11:05:04 +0000

On Tue, Mar 24, 2020 at 11:17:05PM +0100, Ard Biesheuvel wrote:
> On Tue, 24 Mar 2020 at 19:58, Mark Brown <[email-masked]> wrote:
> >
> > On Tue, Mar 24, 2020 at 07:19:17PM +0100, Ard Biesheuvel wrote:
> > > On Mon, 23 Mar 2020 at 20:18, Mark Brown <[email-masked]> wrote:
> >
> > > > order to generate BTI landing pads.  We did this due to a lack of
> > > > support for the .arch_extension gas feature in older versions of the
> > > > clang built in assembler but since current versions of clang now have
> > > > support for .arch_extension we can use that.
> >
> > > This is not 100% accurate. Support for .arch_extension was added to
> > > GAS/aarch64 much later, so we should at least double check that it
> > > works on the oldest binutils that we do support.
> >
> > Ah, OK - the information I figured out from history was misleading
> > sorry.
> >
> > We've already got quite a lot of usages of .arch_extension in the kernel
> > for arm and a couple for arm64 (one in TF and another for LSE).
> 
> ARM had support for this way before it was added to AArch64 as well.
> In the LSE case, it doesn't matter since LSE itself was not
> implemented by the assembler before that. For other things, we should
> really avoid .arch_extension as long as we still support binutils <
> 2.26

Good point. So we can add .arch_extension for new features which are
already dependent on newer gas options.

I'll drop this patch for now but we should try to find a solution
because of the overriding effect of .arch. In self-contained .S files
(like crypto) that's not an issue but once we start adding more
architecture feature in a single file, things will get more complicated.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel