Thread (60 messages) 60 messages, 6 authors, 2020-01-21

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

From: Vincenzo Frascino <vincenzo.frascino@arm.com>
Date: 2020-01-21 14:46:23

On 21/01/2020 14:37, Amit Kachhap wrote:
[...]
quoted
Also Will had a preference for warning during build if the user
requested a feature in .config (i.e. PAC) but the compiler/assembler
does not support it (that was for the LSE patch above). You could
attempt something similar with this patch.
I tried to add warnings like below which are in similar line to the above link,

ifeq ($(CONFIG_ARM64_PTR_AUTH),y)
+  ifneq ($(CONFIG_CC_HAS_SIGN_RETURN_ADDRESS),y)
+    ifneq ($(CONFIG_CC_HAS_BRANCH_PROT_PAC_RET),y)
+$(warning Pointer authentication not supported by compiler)
+    endif
+  endif
+  ifneq ($(CONFIG_AS_HAS_PAC),y)
+$(warning Pointer authentication not supported by assembler)
+  endif
endif

But the issue is that warnings are printed twice and becomes confusing. First
warning computed with the incorrect Kconfig flags and later with the correct
computed Kconfig flags. This may be due to arch/arm64/Kconfig sourced twice.
This seems similar to the problem we had on vDSOs some time ago. The main
Makefile includes the arch specific twice, once for generating the building
scripts and once for building the kernel. As a consequence of this the arch
Kconfig is sourced twice. For the vDSOs we discarded the warning because it was
causing confusion.
quoted
-- 
Regards,
Vincenzo

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help