Re: [PATCH v5 16/17] arm64: compile the kernel with ptrauth return address signing

From
Vincenzo Frascino <vincenzo.frascino@arm.com>
Date
2020-03-04 11:01:32
Reply to
Mark Brown, 2020-03-02
Hi Mark,

On 3/2/20 1:16 PM, Mark Brown wrote:
On Fri, Feb 28, 2020 at 06:23:37PM +0000, Catalin Marinas wrote:
quoted
On Mon, Feb 17, 2020 at 02:57:47PM +0530, Amit Daniel Kachhap wrote:
quoted
quoted
+# only to the assembler when clang is selected as a compiler. For the GNU toolchain
+# this option is not used.
+branch-prot-flags-$(CONFIG_AS_HAS_PAC) += -Wa,-march=armv8.3-a
+KBUILD_CFLAGS += $(branch-prot-flags-y)
+endif
quoted
Does this work with the clang integrated assembler? AFAIK it ignores the
-Wa, though it may be fine with the instructions generated by the
compiler. (while we don't officially support it, we merged patches to
facilitate it).
If the assembler integrated into the compiler doesn't cope with
instructions emitted by the compiler that seems like something we should
push to get fixed on the compiler side.
This option should be required only in the "hybrid" scenario of building the
kernel with clang+binutils.

The llvm assembler relies on "--target" and "-mbranch-protection=pac-ret+leaf"
so I do not think we should report or fix anything in this case.

This series is already passing the correct parameters to clang hence seems safe
to assume that it will continue doing so once the assembler will be switched to
the native version.

-- 
Regards,
Vincenzo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (32 messages) 32 messages, 5 authors, last reply 2020-03-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help