From 20969baa437ba87b21fec0e8cb2a5e17543792e5 Mon Sep 17 00:00:00 2001 From: fly_fzc <2385803914@qq.com> Date: Tue, 9 Sep 2025 14:58:10 +0800 Subject: [PATCH] backport upstream patch --- backport-lookup-fix-local-bind-check.patch | 30 ++++++++++++++++++++++ kpatch.spec | 12 ++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 backport-lookup-fix-local-bind-check.patch diff --git a/backport-lookup-fix-local-bind-check.patch b/backport-lookup-fix-local-bind-check.patch new file mode 100644 index 0000000..a0ce047 --- /dev/null +++ b/backport-lookup-fix-local-bind-check.patch @@ -0,0 +1,30 @@ +From 0f0294ab5852c5ec6cb4fa59f7ed2eb783237c5f Mon Sep 17 00:00:00 2001 +From: xieyuanbin1-huawei +Date: Fri, 23 May 2025 18:23:30 +0800 +Subject: [PATCH] lookup: fix local bind check + +STB_LOCAL is a bind attribute, not a type attribute. +Just fix it. + +Signed-off-by: Wang bing +Signed-off-by: Xie Yuanbin +--- + kpatch-build/lookup.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kpatch-build/lookup.c b/kpatch-build/lookup.c +index 565df68..ead2e04 100644 +--- a/kpatch-build/lookup.c ++++ b/kpatch-build/lookup.c +@@ -172,7 +172,7 @@ static bool file_has_locals(struct symbol *file_sym, struct list_head *sym_list) + list_for_each_entry_continue(sym, sym_list, list) { + if (sym->type == STT_FILE) + break; +- if (sym->type != STB_LOCAL) ++ if (sym->bind != STB_LOCAL) + continue; + if (maybe_discarded_sym(sym->name)) + continue; +-- +2.33.0 + diff --git a/kpatch.spec b/kpatch.spec index ab6595a..65b6e23 100644 --- a/kpatch.spec +++ b/kpatch.spec @@ -1,7 +1,7 @@ Name: kpatch Epoch: 1 Version: 0.9.5 -Release: 14 +Release: 15 Summary: A Linux dynamic kernel patching infrastructure License: GPLv2 @@ -65,6 +65,9 @@ Patch0049:0049-adapt-kpatch_bundle_symbols-to-kernel-change-and-fix.patch Patch0050:0050-create-diff-object-fix-__UNIQUE_ID-variable-correlation.patch Patch0051:0051-fix-rela.init.text-section-changed-due-to-__BTF_id_-changed.patch +#upstream patch +Patch6000:backport-lookup-fix-local-bind-check.patch + BuildRequires: gcc elfutils-libelf-devel kernel-devel git %ifarch ppc64le BuildRequires: gcc-plugin-devel gcc-c++ @@ -127,6 +130,13 @@ popd %{_mandir}/man1/*.1.gz %changelog +* Tue Sep 9 2025 fuanan - 1:0.9.5-15 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:backport upstream patch + backport-lookup-fix-local-bind-check.patch + * Thu Jul 10 2025 fuanan - 1:0.9.5-14 - Type:bugfix - CVE:NA -- Gitee