]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Kconfig: ptrauth: Add binutils version check to fix mismatch
authorAmit Daniel Kachhap <amit.kachhap@arm.com>
Mon, 30 Mar 2020 11:41:39 +0000 (17:11 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 1 Apr 2020 12:26:58 +0000 (13:26 +0100)
commitfb02be0deedd002b283077715694538150a790d0
treee80b0f10f00e21db448a9960f14dc78db09fa4df
parent40e0342138622e7ee9612c61a2df296e627428fa
arm64: Kconfig: ptrauth: Add binutils version check to fix mismatch

Recent addition of ARM64_PTR_AUTH exposed a mismatch issue with binutils.
9.1+ versions of gcc inserts a section note .note.gnu.property but this
can be used properly by binutils version greater than 2.33.1. If older
binutils are used then the following warnings are generated,

aarch64-linux-ld: warning: arch/arm64/kernel/vdso/vgettimeofday.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0000000
aarch64-linux-objdump: warning: arch/arm64/lib/csum.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0000000
aarch64-linux-nm: warning: .tmp_vmlinux1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0000000

This patch enables ARM64_PTR_AUTH when gcc and binutils versions are
compatible with each other. Older gcc which do not insert such section
continue to work as before.

This scenario may not occur with clang as a recent commit 68b7f69e7e72c52
("arm64: Kconfig: verify binutils support for ARM64_PTR_AUTH") masks
binutils version lesser then 2.34.

Reported-by: kbuild test robot <lkp@intel.com>
Suggested-by: Vincenzo Frascino <Vincenzo.Frascino@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
[catalin.marinas@arm.com: slight adjustment to the comment]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/Kconfig