From 90ce8b8718d079b9e906d06bdd6a72da6cc5b636 Mon Sep 17 00:00:00 2001 From: Boyan Karatotev Date: Fri, 13 Jan 2023 16:47:07 +0000 Subject: [PATCH] fix(pauth): make pauth_helpers linking generic Pauth is a generic Arm feature that can be enabled on any platform that implements it. It only needs a platform specific key generation hook. As such, the generic Pauth enablement can be included in the generic build. Signed-off-by: Boyan Karatotev Change-Id: Ibf32f79addab3515214594bb8d7168151b450f59 --- Makefile | 7 +++++++ plat/arm/common/arm_common.mk | 3 +-- plat/qemu/qemu/platform.mk | 3 +-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a69bfbb3b..c27ca8469 100644 --- a/Makefile +++ b/Makefile @@ -512,6 +512,13 @@ BL_COMMON_SOURCES += common/bl_common.c \ plat/common/${ARCH}/platform_helpers.S \ ${COMPILER_RT_SRCS} +# Pointer Authentication sources +ifeq (${ENABLE_PAUTH}, 1) +# arm/common/aarch64/arm_pauth.c contains a sample platform hook to complete the +# Pauth support. As it's not secure, it must be reimplemented for real platforms +BL_COMMON_SOURCES += lib/extensions/pauth/pauth_helpers.S +endif + ifeq ($(notdir $(CC)),armclang) BL_COMMON_SOURCES += lib/${ARCH}/armclang_printf.S endif diff --git a/plat/arm/common/arm_common.mk b/plat/arm/common/arm_common.mk index 7162ce984..4fabdfc38 100644 --- a/plat/arm/common/arm_common.mk +++ b/plat/arm/common/arm_common.mk @@ -353,8 +353,7 @@ endif # Pointer Authentication sources ifeq (${ENABLE_PAUTH}, 1) -PLAT_BL_COMMON_SOURCES += plat/arm/common/aarch64/arm_pauth.c \ - lib/extensions/pauth/pauth_helpers.S +PLAT_BL_COMMON_SOURCES += plat/arm/common/aarch64/arm_pauth.c endif ifeq (${SPD},spmd) diff --git a/plat/qemu/qemu/platform.mk b/plat/qemu/qemu/platform.mk index 4cbce9d04..d8f300ff7 100644 --- a/plat/qemu/qemu/platform.mk +++ b/plat/qemu/qemu/platform.mk @@ -213,8 +213,7 @@ BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \ # Pointer Authentication sources ifeq (${ENABLE_PAUTH}, 1) -PLAT_BL_COMMON_SOURCES += plat/arm/common/aarch64/arm_pauth.c \ - lib/extensions/pauth/pauth_helpers.S +PLAT_BL_COMMON_SOURCES += plat/arm/common/aarch64/arm_pauth.c endif ifeq (${SPD},spmd)