diff --git a/SOURCES/ignore-section-pi.patch b/SOURCES/ignore-section-pi.patch new file mode 100644 index 0000000..309361d --- /dev/null +++ b/SOURCES/ignore-section-pi.patch @@ -0,0 +1,27 @@ +From 3285953f7633113d399d9ccd93a134670f02d8d4 Mon Sep 17 00:00:00 2001 +From: Song Liu +Date: Wed, 26 May 2021 10:27:35 -0700 +Subject: [PATCH] create-diff-object: ignore section _pi.* + +Signed-off-by: Song Liu +--- + kpatch-build/create-diff-object.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c +index 2222fea..d403800 100644 +--- a/kpatch-build/create-diff-object.c ++++ b/kpatch-build/create-diff-object.c +@@ -2592,7 +2592,8 @@ static void kpatch_mark_ignored_sections(struct kpatch_elf *kelf) + list_for_each_entry(sec, &kelf->sections, list) { + if (!strncmp(sec->name, ".discard", 8) || + !strncmp(sec->name, ".rela.discard", 13) || +- !strncmp(sec->name, ".printk_index", 13)) ++ !strncmp(sec->name, ".printk_index", 13) || ++ !strncmp(sec->name, "_pi.", 4)) + sec->ignore = 1; + } + +-- +2.30.2 + diff --git a/SPECS/kpatch.spec b/SPECS/kpatch.spec index 4f5b3be..162e8a7 100644 --- a/SPECS/kpatch.spec +++ b/SPECS/kpatch.spec @@ -2,7 +2,7 @@ Name: kpatch Version: 0.9.3 -Release: 1.2%{?dist} +Release: 1.3%{?dist} Summary: Dynamic kernel patch manager Group: System Environment/Kernel @@ -17,6 +17,7 @@ Patch1: 0002-kpatch-clarify-unload-unsupport.patch # Hyperscale only Patch50: ignore-printk_index.patch +Patch51: ignore-section-pi.patch # Upstream backports Patch100: https://github.com/dynup/kpatch/pull/1183.patch @@ -65,6 +66,7 @@ kpatch-build is a tool to build patches for kpatch. %patch0 -p1 %patch1 -p1 %patch50 -p1 +%patch51 -p1 %patch100 -p1 %setup -D -T -a 1 @@ -106,6 +108,9 @@ echo -e "\t$ dnf kpatch auto" %{_mandir}/man1/kpatch-build.1* %changelog +* Wed May 26 2021 Davide Cavalca - 0.9.3-1.3 +- Add patch to ignore _pi.* sections + * Wed May 26 2021 Davide Cavalca - 0.9.3-1.2 - Backport PR#1183 to add support for atomic replace of cumulative patches