diff --git a/0051-fix-rela.init.text-section-changed-due-to-__BTF_id_-changed.patch b/0051-fix-rela.init.text-section-changed-due-to-__BTF_id_-changed.patch new file mode 100644 index 0000000000000000000000000000000000000000..f796bdc11c662388cc2408ba00880f73e2c926b7 --- /dev/null +++ b/0051-fix-rela.init.text-section-changed-due-to-__BTF_id_-changed.patch @@ -0,0 +1,28 @@ +From a79ebac2bf9e1d9e01b8641f1139c5b812a846d6 Mon Sep 17 00:00:00 2001 +From: caixiaomeng +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 + + + diff --git a/kpatch.spec b/kpatch.spec index dcf193b41213ed03dc458ec08cb14544d79caf85..3f2df244d8e3223c8fa13bc35e986b4f98da5903 100644 --- a/kpatch.spec +++ b/kpatch.spec @@ -1,7 +1,7 @@ Name: kpatch Epoch: 1 Version: 0.9.9 -Release: 10 +Release: 11 Summary: A Linux dynamic kernel patching infrastructure License: GPLv2 @@ -53,6 +53,7 @@ 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 @@ -124,6 +125,12 @@ popd %{_mandir}/man1/*.1.gz %changelog +* Tue Mar 18 2025 yixiangzhike - 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 - 1:0.9.9-10 - Type:bugfix - CVE:NA