diff --git a/huawei-ignore-initcall5-section-to-adapt-6.6-kernel.patch b/huawei-ignore-initcall5-section-to-adapt-6.6-kernel.patch new file mode 100644 index 0000000..ac0a92b --- /dev/null +++ b/huawei-ignore-initcall5-section-to-adapt-6.6-kernel.patch @@ -0,0 +1,29 @@ +From bad5b93c1fa85cc4b71533284064fd0af1bab464 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Fri, 24 May 2024 14:45:55 +0800 +Subject: [PATCH] ignore initcall5 section to adapt 6.6 kernel + +--- + kpatch-build/create-diff-object.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c +index f1dfc1d..4c029ae 100644 +--- a/kpatch-build/create-diff-object.c ++++ b/kpatch-build/create-diff-object.c +@@ -2035,8 +2035,12 @@ static void kpatch_include_force_elements(struct kpatch_elf *kelf) + int kpatch_include_new_static_var(struct kpatch_elf *kelf) + { + struct symbol *sym; ++ char *initcall_prefix = "__initcall__kmod"; + + list_for_each_entry(sym, &kelf->symbols, list) { ++ if (strncmp(sym->name, initcall_prefix, strlen(initcall_prefix)) == 0) { ++ continue; ++ } + if (sym->status == NEW && + sym->bind == STB_LOCAL && + (sym->type == STT_OBJECT || +-- +2.33.0 + diff --git a/kpatch.spec b/kpatch.spec index 6cbb255..12f8283 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 @@ -58,6 +58,7 @@ Patch9002:huawei-lookup.c-ignore-BTF-ID-when-matching-locals.patch 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 BuildRequires: gcc elfutils-libelf-devel kernel-devel git %ifarch ppc64le @@ -121,6 +122,12 @@ popd %{_mandir}/man1/*.1.gz %changelog +* Fri May 24 2024 caixiaomeng - 1:0.9.9-7 +- Type: bugfix +- CVE:NA +- SUG:NA +- DESC:ignore initcall5 section to adapt 6.6 kernel + * Wed May 22 2024 caixiaomeng - 1:0.9.9-6 - Type: bugfix - CVE:NA