[PATCH v3 2/2] arm64: Unconditionally override SYM_FUNC macros

Ard Biesheuvel ardb at kernel.org
Tue Dec 14 06:31:07 PST 2021


On Tue, 14 Dec 2021 at 15:28, Mark Brown <broonie at kernel.org> wrote:
>
> On Tue, Dec 14, 2021 at 03:12:01PM +0100, Ard Biesheuvel wrote:
> > On Tue, 14 Dec 2021 at 15:10, Will Deacon <will at kernel.org> wrote:
>
> > > I don't have a strong opinion here, so whatever you like. I just tend to
> > > think that most people will have BTI enabled and there's something to be
> > > said for having an instruction always emitted when you have a token in
> > > assembly code.
>
> > +1
>
> > I already pointed out computed gotos, which are admittedly rare, but
> > there are other reasons why adhering to WYSIWYG is strongly preferred
> > for asm code IMO.
>
> The use case for this macro is for SYM_FUNC_START() which is going to be
> emitting the BTI without it really appearing directly in the code so I'm
> not sure how much I buy that TBH.  I think you're pushing back on uses
> of the macro outside of linkage.h more than on what linkage.h is doing,
> that does make more sense to me.

Fair point, but we don't really have any control over where else BTI_C
may end up being used, no?

In any case, I don't think it's worth it blowing up the validation
matrix over this, so if we can emit the same code for all
configurations, we should IMO



More information about the linux-arm-kernel mailing list