[RFC PATCH v4 22/37] arm64: kernel: Skip validation of kuser32.o

From: Chen Zhongjin
Date: Fri Apr 29 2022 - 05:48:16 EST


From: Raphael Gault <raphael.gault@xxxxxxx>

kuser32 being used for compatibility, it contains a32 instructions
which are not recognised by objtool when trying to analyse arm64
object files. Thus, we add an exception to skip validation on this
particular file.

Signed-off-by: Raphael Gault <raphael.gault@xxxxxxx>
Signed-off-by: Julien Thierry <jthierry@xxxxxxxxxx>
Signed-off-by: Chen Zhongjin <chenzhongjin@xxxxxxxxxx>
---
arch/arm64/kernel/Makefile | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
index 986837d7ec82..c4f01bfe79b4 100644
--- a/arch/arm64/kernel/Makefile
+++ b/arch/arm64/kernel/Makefile
@@ -41,6 +41,9 @@ obj-$(CONFIG_COMPAT) += sys32.o signal32.o \
sys_compat.o
obj-$(CONFIG_COMPAT) += sigreturn32.o
obj-$(CONFIG_KUSER_HELPERS) += kuser32.o
+
+OBJECT_FILES_NON_STANDARD_kuser32.o := y
+
obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_ARM64_MODULE_PLTS) += module-plts.o
--
2.17.1