Re: [PATCH v2 02/10] arm64: asm: Override SYM_FUNC_START when building the kernel with BTI

Mark Brown
2020-05-05T15:18:14Z

[-- Attachment #1.1: Type: text/plain, Size: 1142 bytes --]

On Tue, May 05, 2020 at 03:56:42PM +0100, Will Deacon wrote:
> On Wed, Apr 29, 2020 at 10:16:33PM +0100, Mark Brown wrote:

> > +#define SYM_INNER_LABEL(name, linkage) \
> > + .type name SYM_T_NONE ASM_NL \
> > + SYM_ENTRY(name, linkage, SYM_A_NONE) \
> > + BTI_J

> This break building the compat vDSO:

Right, fixed locally.

> I also see a scary linker warning about the native VDSO:

> aarch64-none-linux-gnu-ld: arch/arm64/kernel/vdso/vgettimeofday.o: warning: BTI turned on by -z force-bti when all inputs do not have BTI in NOTE section.

I can't reproduce this, I am using clang-10 as well... can you share
your exact command line and config? I'm using

make -j56 ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- CC=clang-10

which is the same clang version as you, not that I'd expect that to make
a difference. This looks like the C code isn't being built with BTI
enabled but I can't see how you're managing to do that and I'm not -
this is the warning that "arm64: vdso: Force the VDSO to be linked as
BTI when built for BTI" is intended to trigger if something goes wrong
so I guess it's a good job I enabled that :/

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]