From 3195f010ebd24432c492ade9224a9c697f5d70e6fe0a94dc55594ade538b1566 Mon Sep 17 00:00:00 2001 From: Petr Tesarik Date: Thu, 29 May 2025 13:14:44 +0200 Subject: [PATCH] Update to makedumpfile-1.7.7 New features: - Support for kernels up to v6.14 (x86_64) Drop upstreamed patches: - makedumpfile-fix-detection-of-typed-compound-pages-Linux-6.12.patch Signed-off-by: Petr Tesarik --- _service | 6 ++ makedumpfile-1.7.6.tar.gz | 3 - makedumpfile-1.7.7.tar.xz | 3 + ...n-of-typed-compound-pages-Linux-6.12.patch | 93 ------------------- makedumpfile.changes | 10 ++ makedumpfile.spec | 5 +- 6 files changed, 21 insertions(+), 99 deletions(-) create mode 100644 _service delete mode 100644 makedumpfile-1.7.6.tar.gz create mode 100644 makedumpfile-1.7.7.tar.xz delete mode 100644 makedumpfile-fix-detection-of-typed-compound-pages-Linux-6.12.patch diff --git a/_service b/_service new file mode 100644 index 0000000..87c7b25 --- /dev/null +++ b/_service @@ -0,0 +1,6 @@ + + + yes + + + diff --git a/makedumpfile-1.7.6.tar.gz b/makedumpfile-1.7.6.tar.gz deleted file mode 100644 index 318b1b0..0000000 --- a/makedumpfile-1.7.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c949a5b2ad95e5f83a6d1b4faac0972510e4286b0e3257020762e45357816a61 -size 211258 diff --git a/makedumpfile-1.7.7.tar.xz b/makedumpfile-1.7.7.tar.xz new file mode 100644 index 0000000..4b0af16 --- /dev/null +++ b/makedumpfile-1.7.7.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69b4d24ace3024cf2a41f343e162838b62b1b37d6edc7bbad4260fa36217efee +size 211199 diff --git a/makedumpfile-fix-detection-of-typed-compound-pages-Linux-6.12.patch b/makedumpfile-fix-detection-of-typed-compound-pages-Linux-6.12.patch deleted file mode 100644 index 6a5edc4..0000000 --- a/makedumpfile-fix-detection-of-typed-compound-pages-Linux-6.12.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: David Hildenbrand -Date: Fri, 22 Nov 2024 11:12:19 +0100 -Subject: fix detection of typed (compound) pages (Linux 6.12) -Git-commit: 72c3414949bd2e9284c8ba7ceaf109a5a34ac2e1 -References: bsc#1237269 -Link: https://lore.kernel.org/kexec/20241122101219.936746-1-david@redhat.com/ -Upstream: merged - -* Required for kernel 6.12 - -Ever since kernel commit 4ffca5a96678c ("mm: support only one page_type -per page"), page types are no longer flags (PG_slab, PG_offline, ...) -stored in page->_mapcount, but values stored in the top byte. - -Because we currently try deriving flags from the mapcount values to -check for slab and hugetlb pages, we get: -(1) "false positives" from isSlab(), making us not detect free (buddy) - pages and offline pages anymore. -(2) "false positives" when detecting hugetlb pages. - -In the common case we now simply dump all memory, and fail to exclude -offline and free (buddy) pages, assuming they are all slab pages, -which is bad. - -We should just consistently compare the page->_mapcount with the unmodified -PAGE_*_MAPCOUNT_VALUE, like we already did for free (buddy) and offline -pages already. This also works for older kernels, because the kernel never -supported having multiple page types set on a single page, so there was -never the need to derive flags from the PAGE_*_MAPCOUNT_VALUE. - -It is worth noting that the lower 24bit of the page->_mapcount field -can be used while a page type is set. This is, however, currently not -the case for any of the involved page types (slab, buddy, offline, -hugetlb). In the future, the kernel could either just tell us the types, -or provide a mask to be applied to the page->_mapcount ("bits to ignore") -when comparing the values. But, there might be bigger changes coming up -with the "memdesc" work in the kernel, where the type would not longer -be stored in page->_mapcount ... so for now we can keep it simple. - -Link: https://github.com/makedumpfile/makedumpfile/issues/16 -Cc: Masamitsu Yamazaki -Cc: Kazuhito Hagio -Cc: Matthew Wilcox -Signed-off-by: David Hildenbrand -Acked-by: Petr Tesarik ---- - makedumpfile.c | 6 ++---- - makedumpfile.h | 2 -- - 2 files changed, 2 insertions(+), 6 deletions(-) - -diff --git a/makedumpfile.c b/makedumpfile.c -index b356eb3..bad3c48 100644 ---- a/makedumpfile.c -+++ b/makedumpfile.c -@@ -280,8 +280,7 @@ isSlab(unsigned long flags, unsigned int _mapcount) - { - /* Linux 6.10 and later */ - if (NUMBER(PAGE_SLAB_MAPCOUNT_VALUE) != NOT_FOUND_NUMBER) { -- unsigned int PG_slab = ~NUMBER(PAGE_SLAB_MAPCOUNT_VALUE); -- if ((_mapcount & (PAGE_TYPE_BASE | PG_slab)) == PAGE_TYPE_BASE) -+ if (_mapcount == (int)NUMBER(PAGE_SLAB_MAPCOUNT_VALUE)) - return TRUE; - } - -@@ -6549,11 +6548,10 @@ __exclude_unnecessary_pages(unsigned long mem_map, - */ - if (NUMBER(PAGE_HUGETLB_MAPCOUNT_VALUE) != NOT_FOUND_NUMBER) { - unsigned long _flags_1 = ULONG(addr + OFFSET(page.flags)); -- unsigned int PG_hugetlb = ~NUMBER(PAGE_HUGETLB_MAPCOUNT_VALUE); - - compound_order = _flags_1 & 0xff; - -- if ((_mapcount & (PAGE_TYPE_BASE | PG_hugetlb)) == PAGE_TYPE_BASE) -+ if (_mapcount == (int)NUMBER(PAGE_HUGETLB_MAPCOUNT_VALUE)) - compound_dtor = IS_HUGETLB; - - goto check_order; -diff --git a/makedumpfile.h b/makedumpfile.h -index 7ed566d..2b3495e 100644 ---- a/makedumpfile.h -+++ b/makedumpfile.h -@@ -164,8 +164,6 @@ test_bit(int nr, unsigned long addr) - #define isAnon(mapping, flags, _mapcount) \ - (((unsigned long)mapping & PAGE_MAPPING_ANON) != 0 && !isSlab(flags, _mapcount)) - --#define PAGE_TYPE_BASE (0xf0000000) -- - #define PTOB(X) (((unsigned long long)(X)) << PAGESHIFT()) - #define BTOP(X) (((unsigned long long)(X)) >> PAGESHIFT()) - --- -2.48.1 - diff --git a/makedumpfile.changes b/makedumpfile.changes index 9b4f64a..ed09343 100644 --- a/makedumpfile.changes +++ b/makedumpfile.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu May 29 11:10:50 UTC 2025 - Petr Tesařík + +- Update to 1.7.7: + * Support for kernels up to v6.14 (x86_64) + * Fix gcc-15 compile errors + * Improve message readability and fix typos +- Drop upstreamed patches: + * makedumpfile-fix-detection-of-typed-compound-pages-Linux-6.12.patch + ------------------------------------------------------------------- Thu May 29 10:54:22 UTC 2025 - Petr Tesařík diff --git a/makedumpfile.spec b/makedumpfile.spec index b5e4590..9059bd5 100644 --- a/makedumpfile.spec +++ b/makedumpfile.spec @@ -28,19 +28,18 @@ %endif Name: makedumpfile -Version: 1.7.6 +Version: 1.7.7 Release: 0 Summary: Partial kernel dump License: GPL-2.0-only Group: System/Kernel URL: https://github.com/makedumpfile/makedumpfile -Source: https://github.com/makedumpfile/makedumpfile/releases/download/%{version}/%{name}-%{version}.tar.gz +Source: https://github.com/makedumpfile/makedumpfile/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.xz Source1: https://github.com/lucchouina/eppic/archive/%{eppic_commit}.tar.gz#/eppic-%{eppic_commit}.tar.gz Source99: %{name}-rpmlintrc Patch0: %{name}-override-libtinfo.patch Patch1: %{name}-ppc64-VA-range-SUSE.patch Patch2: %{name}-PN_XNUM.patch -Patch3: %{name}-fix-detection-of-typed-compound-pages-Linux-6.12.patch BuildRequires: libbz2-devel BuildRequires: libdw-devel BuildRequires: libelf-devel -- 2.49.0