arm64: asm: Override SYM_FUNC_START when building the kernel with BTI
authorMark Brown <broonie@kernel.org>
Wed, 6 May 2020 19:51:30 +0000 (20:51 +0100)
committerWill Deacon <will@kernel.org>
Thu, 7 May 2020 16:53:20 +0000 (17:53 +0100)
commit714a8d02ca4da1479bf0b778fc1951dc88515c3d
tree052a8bb57dca406062ef023a38d2c3d1fc69c743
parent92e2294d870bc9e77592c2454f565c3bd6bb79ad
arm64: asm: Override SYM_FUNC_START when building the kernel with BTI

When the kernel is built for BTI override SYM_FUNC_START and related macros
to add a BTI landing pad to the start of all global functions, ensuring that
they are BTI safe. The ; at the end of the BTI_x macros is for the
benefit of the macro-generated functions in xen-hypercall.S.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200506195138.22086-4-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/linkage.h