From 3ca6cfd4eaac0b9836709bb811bc308aa63ff395 Mon Sep 17 00:00:00 2001 From: fly_fzc <2385803914@qq.com> Date: Tue, 9 Sep 2025 14:56:05 +0800 Subject: [PATCH] backport upstream patch (cherry picked from commit a3c05e34ac7f3a01b14b8eca6b64c1d3da47b462) --- 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 83c34d0..7011029 100644 --- a/kpatch.spec +++ b/kpatch.spec @@ -1,7 +1,7 @@ Name: kpatch Epoch: 1 Version: 0.9.9 -Release: 18 +Release: 19 Summary: A Linux dynamic kernel patching infrastructure License: GPLv2 @@ -56,6 +56,9 @@ Patch0040:0001-add-loongarch64-support.patch Patch0041:0051-fix-rela.init.text-section-changed-due-to-__BTF_id_-changed.patch Patch0042:0042-CDO-Handle-.data.once-sections.patch +#upstream patch +Patch6000:backport-lookup-fix-local-bind-check.patch + %ifarch sw_64 Patch8001:0001-kpatch-build-sw64-add-sw64-architecture-support.patch Patch8002:0002-kpatch-build-sw64-symtab_read-support-sw64.patch @@ -140,6 +143,13 @@ popd %{_mandir}/man1/*.1.gz %changelog +* Tue Sep 9 2025 fuanan - 1:0.9.9-19 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:backport upstream patch + backport-lookup-fix-local-bind-check.patch + * Fri Aug 29 2025 jinsaihang - 1:0.9.9-18 - Type:bugfix - CVE:NA -- Gitee