Subject: Re: [PATCH 1/5] arm64: bti: Support building kernel C code using BTI

From: Mark Brown <[email-masked]>
Date: Mon, 30 Mar 2020 12:33:00 +0100

On Sat, Mar 28, 2020 at 02:14:09PM -0700, Kees Cook wrote:
> On Fri, Mar 27, 2020 at 07:21:03PM +0000, Mark Brown wrote:

> > When running with BTI enabled we need to ask the compiler to enable
> > generation of BTI landing pads beyond those generated as a result of
> > pointer authentication instructions being landing pads. Since the two
> > features are practically speaking unlikely to be used separately we
> > will make kernel mode BTI depend on pointer authentication in order
> > to simplify the Makefile.

> Some vendors have been making chips with weird combinations of features.
> Is there a better justification to use beyond "unlikely"?

The design intent is that BTI is complementary to PAC so it would be a
peculiar implementation choice to do BTI without also doing PAC but yes,
implementors and system integrators have the freedom to innovate in ways
that we cannot always forsee.  The other bit of it is that there's
fairly limited overhead from running PAC enabled code on hardware
without the support.

> The compiler appears to accept a leading +, so how about:

...

> Or, this is all overkill. :)

I feel better about adding the extra dependency than feeding an option
to the compiler that looks wrong like -mbranch-protection=+bti (more
BTI!) but ultimately I don't have strong feelings either way so whatever
Catalin and Will prefer.
_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel