From 943edf5bc8079fee8806af6a902852dc22b5db3c Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Thu, 10 Oct 2024 17:09:46 -0400 Subject: [PATCH 103/118] aarch64: kpatch-build aarch64 implementation TODO Signed-off-by: Suraj Jitindar Singh Signed-off-by: Pete Swain Signed-off-by: Mihails Strasuns Signed-off-by: Joe Lawrence --- kpatch-build/Makefile | 2 +- kpatch-build/kpatch-build | 3 +++ kpatch-build/kpatch-cc | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/kpatch-build/Makefile b/kpatch-build/Makefile index 4e964b7..1969fff 100644 --- a/kpatch-build/Makefile +++ b/kpatch-build/Makefile @@ -21,7 +21,7 @@ PLUGIN_CFLAGS := $(filter-out -std=gnu11 -Wconversion, $(CFLAGS)) PLUGIN_CFLAGS += -shared -I$(GCC_PLUGINS_DIR)/include \ -Igcc-plugins -fPIC -fno-rtti -O2 -Wall endif -ifeq ($(filter $(ARCH),s390x x86_64 ppc64le),) +ifeq ($(filter $(ARCH),aarch64 s390x x86_64 ppc64le),) $(error Unsupported architecture ${ARCH}, check https://github.com/dynup/kpatch/#supported-architectures) endif diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index bc112fc..643d85c 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -382,6 +382,9 @@ find_special_section_data() { # Arch-specific features case "$ARCH" in + "aarch64") + check[a]=true # alt_instr + ;; "x86_64") check[a]=true # alt_instr kernel_version_gte 5.10.0 && check[s]=true # static_call_site diff --git a/kpatch-build/kpatch-cc b/kpatch-build/kpatch-cc index 17aae25..5456179 100755 --- a/kpatch-build/kpatch-cc +++ b/kpatch-build/kpatch-cc @@ -31,6 +31,7 @@ if [[ "$TOOLCHAINCMD" =~ ^(.*-)?gcc$ || "$TOOLCHAINCMD" =~ ^(.*-)?clang$ ]] ; th vmlinux.o|\ .tmp_kallsyms1.o|\ .tmp_kallsyms2.o|\ + arch/arm64/kernel/vdso*/*|\ arch/x86/boot/*|\ arch/x86/entry/vdso/*|\ arch/x86/purgatory/*|\ -- 2.48.1