Compare commits
10 Commits
7446c6970d
...
1238ef2ccb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1238ef2ccb | ||
|
|
4b43cd9213 | ||
|
|
e6e203831c | ||
|
|
38fc564e3e | ||
|
|
b94cbbdf8e | ||
|
|
b6f29cb3e5 | ||
|
|
2215b830c5 | ||
|
|
b518d14017 | ||
|
|
9836cbf331 | ||
|
|
9fbce93c90 |
37
0001-add-loongarch64-support.patch
Normal file
37
0001-add-loongarch64-support.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From c5bdb0c5b87ca1b94b59f88b548b9f2c263ef2df Mon Sep 17 00:00:00 2001
|
||||
From: shenzhongwei <shenzhongwei@kylinos.cn>
|
||||
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
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
From a79ebac2bf9e1d9e01b8641f1139c5b812a846d6 Mon Sep 17 00:00:00 2001
|
||||
From: caixiaomeng <caixiaomeng2@huawei.com>
|
||||
Date: Fri, 28 Feb 2025 09:47:06 +0800
|
||||
Subject: [PATCH] fix rela.init.text section changed due to __BTF_id_ symbol
|
||||
changed
|
||||
|
||||
---
|
||||
kpatch-build/create-diff-object.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
|
||||
index d5126f8..2dceef9 100644
|
||||
--- a/kpatch-build/create-diff-object.c
|
||||
+++ b/kpatch-build/create-diff-object.c
|
||||
@@ -428,7 +428,7 @@ static int kpatch_mangled_strcmp(char *s1, char *s2)
|
||||
if (strstr(s1, ".str1."))
|
||||
return strcmp(s1, s2);
|
||||
|
||||
- if (!strncmp(s1, "__UNIQUE_ID_", 12))
|
||||
+ if (!strncmp(s1, "__UNIQUE_ID_", 12) || !strncmp(s1, "__BTF_ID_", 9))
|
||||
return __kpatch_unique_id_strcmp(s1, s2);
|
||||
|
||||
#ifdef __riscv
|
||||
--
|
||||
2.33.0
|
||||
|
||||
|
||||
|
||||
24
huawei-ignore-the-change-of-the-hibifur-module.patch
Normal file
24
huawei-ignore-the-change-of-the-hibifur-module.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 0a982453f9d4c4c5d08eaae6dab3d4d015aa2aea Mon Sep 17 00:00:00 2001
|
||||
From: jinsaihang <jinsaihang@h-partners.com>
|
||||
Date: Fri, 18 Apr 2025 09:34:46 +0800
|
||||
Subject: [PATCH] ignore the change of the hibifur module
|
||||
|
||||
Signed-off-by: jinsaihang <jinsaihang@h-partners.com>
|
||||
|
||||
diff --git a/kpatch-build/kpatch-cc b/kpatch-build/kpatch-cc
|
||||
index 6f14fd1..509d1ca 100755
|
||||
--- a/kpatch-build/kpatch-cc
|
||||
+++ b/kpatch-build/kpatch-cc
|
||||
@@ -54,7 +54,8 @@ if [[ "$TOOLCHAINCMD" =~ ^(.*-)?gcc$ ||
|
||||
tools/*|\
|
||||
.*.o|\
|
||||
*/.lib_exports.o|\
|
||||
- drivers/net/ethernet/3snic/sssnic/*)
|
||||
+ drivers/net/ethernet/3snic/sssnic/*|\
|
||||
+ drivers/net/ethernet/huawei/hibifur/*)
|
||||
break
|
||||
;;
|
||||
*.o)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From 273d0d8a3912845ac34501dc83304958d9cf267f Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Mon, 30 Sep 2024 16:11:06 +0800
|
||||
Subject: [PATCH] remove .export_symbol section to avoid compile error
|
||||
|
||||
---
|
||||
kpatch-build/kpatch-build | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build
|
||||
index 886a753..b927555 100755
|
||||
--- a/kpatch-build/kpatch-build
|
||||
+++ b/kpatch-build/kpatch-build
|
||||
@@ -1543,6 +1543,9 @@ KPATCH_LDFLAGS="$KPATCH_LDFLAGS" \
|
||||
CROSS_COMPILE="$CROSS_COMPILE"
|
||||
save_env
|
||||
|
||||
+objcopy --remove-section=.export_symbol "$TEMPDIR/patch/output.o" "$TEMPDIR/patch/output_tmp.o"
|
||||
+mv "$TEMPDIR/patch/output_tmp.o" "$TEMPDIR/patch/output.o"
|
||||
+
|
||||
KBUILD_MODPOST_WARN=1 make "${MAKEVARS[@]}" 2>&1 | logger || die
|
||||
strip -g "$TEMPDIR/patch/$MODNAME.ko"
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
|
||||
38
kpatch.spec
38
kpatch.spec
@ -1,7 +1,7 @@
|
||||
Name: kpatch
|
||||
Epoch: 1
|
||||
Version: 0.9.9
|
||||
Release: 7
|
||||
Release: 12
|
||||
Summary: A Linux dynamic kernel patching infrastructure
|
||||
|
||||
License: GPLv2
|
||||
@ -52,6 +52,8 @@ 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
|
||||
Patch0041:0051-fix-rela.init.text-section-changed-due-to-__BTF_id_-changed.patch
|
||||
|
||||
Patch9001:huawei-fix-function-ptr-relocation.patch
|
||||
Patch9002:huawei-lookup.c-ignore-BTF-ID-when-matching-locals.patch
|
||||
@ -59,10 +61,12 @@ Patch9003:huawei-adapt-kpatch-to-6.6-kernel-and-fix-bundle-symbols-ch.patch
|
||||
Patch9004:huawei-fix-function-ptr-relocation-and-strip-.BTF-section-f.patch
|
||||
Patch9005:huawei-adapt-arm64-dynamic-ftrace-call-with-2-nops.patch
|
||||
Patch9006:huawei-ignore-initcall5-section-to-adapt-6.6-kernel.patch
|
||||
Patch9007:huawei-remove-.export_symbol-section-to-avoid-compile-error.patch
|
||||
Patch9008:huawei-ignore-the-change-of-the-hibifur-module.patch
|
||||
|
||||
BuildRequires: gcc elfutils-libelf-devel kernel-devel git
|
||||
%ifarch ppc64le
|
||||
BuildRequires: gcc-plugin-devel
|
||||
BuildRequires: gcc-plugin-devel gcc-c++
|
||||
%endif
|
||||
Requires: bc make gcc patch bison flex openssl-devel
|
||||
Recommends: %{name}-help = %{version}-%{release}
|
||||
@ -122,6 +126,36 @@ popd
|
||||
%{_mandir}/man1/*.1.gz
|
||||
|
||||
%changelog
|
||||
* Thu Apr 17 2025 jinsaihang <jinsaihang@h-partners.com> - 1:0.9.9-12
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:ignore the change of the hibifur module
|
||||
|
||||
* Tue Mar 18 2025 yixiangzhike <yixiangzhike007@163.com> - 1:0.9.9-11
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:fix .rela.init.text section changed due to __BTF_id_ changed
|
||||
|
||||
* Mon Jan 13 2025 caixiaomeng <caixiaomeng2@huawei.com> - 1:0.9.9-10
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:remove .export_symbol section newly added in 6.6 kernel to avoid compile error
|
||||
|
||||
* Fri May 24 2024 shenzhongwei <shenzhongwei@kylinos.cn> - 1:0.9.9-9
|
||||
- Type:update
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:add support loongarch64
|
||||
|
||||
* Wed Jun 12 2024 peng.zou <peng.zou@shingroup.cn> - 1:0.9.9-8
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:add gcc-c++ to BuildRequires for ppc64le
|
||||
|
||||
* Fri May 24 2024 caixiaomeng <caixiaomeng2@huawei.com> - 1:0.9.9-7
|
||||
- Type: bugfix
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user