diff --git a/Fix-Exclude-pages-correctly-in-exclude_nodata_pages.patch b/Fix-Exclude-pages-correctly-in-exclude_nodata_pages.patch new file mode 100644 index 0000000000000000000000000000000000000000..75774d5fda726ac7b346c39398a3a4974cd997cc --- /dev/null +++ b/Fix-Exclude-pages-correctly-in-exclude_nodata_pages.patch @@ -0,0 +1,26 @@ +From c8075ad4b8e8111a83dbf3a8630bb343c8a0ede8 Mon Sep 17 00:00:00 2001 +From: wangming +Date: Wed, 9 Oct 2024 11:07:55 +0800 +Subject: [PATCH] Fix: Exclude pages correctly in exclude_nodata_pages() + +Signed-off-by: wangming +--- + makedumpfile-1.7.2/makedumpfile.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/makedumpfile-1.7.2/makedumpfile.c b/makedumpfile-1.7.2/makedumpfile.c +index f403683..1172a80 100644 +--- a/makedumpfile-1.7.2/makedumpfile.c ++++ b/makedumpfile-1.7.2/makedumpfile.c +@@ -5104,7 +5104,7 @@ exclude_nodata_pages(struct cycle *cycle) + NULL, &file_size)) { + unsigned long long pfn, pfn_end; + +- pfn = paddr_to_pfn(phys_start + file_size); ++ pfn = paddr_to_pfn(roundup(phys_start + file_size, PAGESIZE())); + pfn_end = paddr_to_pfn(roundup(phys_end, PAGESIZE())); + + if (pfn < cycle->start_pfn) +-- +2.41.1 + diff --git a/kexec-tools.spec b/kexec-tools.spec index 0c7c76f4f0a1cb0578caa0bcdc4c24c3f4b61fc3..198f84d0c72221118b769e48824dd3eb168ca03b 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -3,7 +3,7 @@ %global mkdf_ver 1.7.4 %global mkdf_shortver %(c=%{mkdf_ver}; echo ${c:0:7}) -%define anolis_release 6 +%define anolis_release 7 Name: kexec-tools Version: 2.0.26 @@ -93,6 +93,7 @@ Patch0001: loongarch64-fix-some-functional-issues-and-compilati.patch Patch0002: kexec-tools-rv64-support.patch Patch0003: loongarch64-fix-kernel-image-size-error.patch Patch0004: Fix-building-on-x86_64-with-binutils-2.41.patch +Patch0005: Fix-Exclude-pages-correctly-in-exclude_nodata_pages.patch %description kexec-tools provides /sbin/kexec binary that facilitates a new @@ -120,6 +121,7 @@ tar -z -x -v -f %{SOURCE19} %patch0002 -p1 %patch0003 -p1 %patch0004 -p1 +%patch0005 -p1 %build autoreconf @@ -348,6 +350,9 @@ done %doc TODO AUTHORS %changelog +* Fri Sep 20 2024 Ming Wang - 2.0.26-7 +- Fix incorrect PFN exclusion when LOAD segments overlap + * Tue Jun 4 2024 Ming Wang - 2.0.26-6 - Backport upstream patch for loongarch and x86_64