From fe7a6893092152f98ea55e985c71884ff950374b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E4=BB=B2=E4=BC=9F?= Date: Fri, 24 May 2024 15:40:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0loongarch64=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 0001-add-loongarch64-support.patch | 37 ++++++++++++++++++++++++++++++ kpatch.spec | 9 +++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 0001-add-loongarch64-support.patch diff --git a/0001-add-loongarch64-support.patch b/0001-add-loongarch64-support.patch new file mode 100644 index 0000000..dc3ed37 --- /dev/null +++ b/0001-add-loongarch64-support.patch @@ -0,0 +1,37 @@ +From c5bdb0c5b87ca1b94b59f88b548b9f2c263ef2df Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Tue, 14 May 2024 15:50:15 +0800 +Subject: [PATCH] add loongarch64 support + +--- + kpatch-build/Makefile | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/kpatch-build/Makefile b/kpatch-build/Makefile +index f24165b..f042a6a 100644 +--- a/kpatch-build/Makefile ++++ b/kpatch-build/Makefile +@@ -13,6 +13,11 @@ SOURCES = create-diff-object.c kpatch-elf.c \ + SOURCES += insn/insn.c insn/inat.c + INSN = insn/insn.o insn/inat.o + insn/%.o: CFLAGS := $(filter-out -Wconversion, $(CFLAGS)) ++ifeq ($(ARCH),loongarch64) ++SOURCES += insn/insn.c insn/inat.c ++INSN = insn/insn.o insn/inat.o ++insn/%.o: CFLAGS := $(filter-out -Wconversion, $(CFLAGS)) ++endif + ifeq ($(ARCH),ppc64le) + SOURCES += gcc-plugins/ppc64le-plugin.c + PLUGIN = gcc-plugins/ppc64le-plugin.so +@@ -22,7 +27,7 @@ PLUGIN_CFLAGS := $(filter-out -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 aarch64 riscv64),) ++ifeq ($(filter $(ARCH),s390x x86_64 ppc64le aarch64 riscv64 loongarch64),) + $(error Unsupported architecture ${ARCH}, check https://github.com/dynup/kpatch/#supported-architectures) + endif + +-- +2.43.0 + diff --git a/kpatch.spec b/kpatch.spec index 6cbb255..9674690 100644 --- a/kpatch.spec +++ b/kpatch.spec @@ -1,7 +1,7 @@ Name: kpatch Epoch: 1 Version: 0.9.9 -Release: 6 +Release: 7 Summary: A Linux dynamic kernel patching infrastructure License: GPLv2 @@ -52,6 +52,7 @@ Patch0036:0036-create-diff-object-ignore-entsize-change-of-.return_.patch Patch0037:0037-add-initial-riscv64-support.patch Patch0038:0038-Fix-undefined-behavior-problem-when-using-list_forea.patch Patch0039:0039-build-support-for-building-with-clang.patch +Patch0040:0001-add-loongarch64-support.patch Patch9001:huawei-fix-function-ptr-relocation.patch Patch9002:huawei-lookup.c-ignore-BTF-ID-when-matching-locals.patch @@ -121,6 +122,12 @@ popd %{_mandir}/man1/*.1.gz %changelog +* Fri May 24 2024 shenzhongwei - 1:0.9.9-7 +- Type:update +- CVE:NA +- SUG:NA +- DESC:add support loongarch64 + * Wed May 22 2024 caixiaomeng - 1:0.9.9-6 - Type: bugfix - CVE:NA -- Gitee