diff --git a/crash.spec b/crash.spec index a801351..14ef193 100644 --- a/crash.spec +++ b/crash.spec @@ -4,7 +4,7 @@ Summary: Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles Name: crash Version: 7.3.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3 Group: Development/Debuggers Source0: https://github.com/crash-utility/crash/archive/crash-%{version}.tar.gz @@ -107,6 +107,7 @@ Patch87: 0088-Fix-net-command-on-kernel-configured-with-CONFIG_IPV.patch Patch88: 0089-gdb-7.6-fix-for-whatis-command-causes-crash-coredump.patch Patch89: lzo_snappy_zstd.patch Patch90: rhel8_build.patch +Patch91: rhel8-freepointer.patch %description The core analysis suite is a self-contained tool that can be used to @@ -218,6 +219,7 @@ offered by Mission Critical Linux, or the LKCD kernel patch. %patch88 -p1 %patch89 -p1 %patch90 -p1 +%patch91 -p1 %build cp %{SOURCE1} . @@ -248,6 +250,9 @@ rm -rf %{buildroot} %{_includedir}/* %changelog +* Mon May 08 2023 Lianbo Jiang - 7.3.2-6 +- Fix for freelist pointer on PPC64le, ARM64 and S390x + * Mon May 08 2023 Lianbo Jiang - 7.3.2-5 - Update to the latest upstream commit 47216437e79a - ("Fix "net" command on kernel configured with CONFIG_IPV6=m") diff --git a/rhel8-freepointer.patch b/rhel8-freepointer.patch new file mode 100644 index 0000000..eebd657 --- /dev/null +++ b/rhel8-freepointer.patch @@ -0,0 +1,31 @@ +From d39b714d36c12e17c9e3359dd283adbb0693458e Mon Sep 17 00:00:00 2001 +From: Lianbo Jiang +Date: Mon, 8 May 2023 21:51:02 +0800 +Subject: [PATCH] rhel8 freepointer + +CONFIG_SLAB_FREELIST_HARDENED=y + +This is a RHEL-Only patch. + +Signed-off-by: Lianbo Jiang +--- + memory.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/memory.c b/memory.c +index 0568f18eb9b7..82d4214be066 100644 +--- a/memory.c ++++ b/memory.c +@@ -19671,7 +19671,8 @@ freelist_ptr(struct meminfo *si, ulong ptr, ulong ptr_addr) + if (VALID_MEMBER(kmem_cache_random)) { + /* CONFIG_SLAB_FREELIST_HARDENED */ + +- if (vt->flags & FREELIST_PTR_BSWAP) ++ if ((vt->flags & FREELIST_PTR_BSWAP) || machine_type("PPC64") ++ || machine_type("ARM64") || machine_type("S390X")) + ptr_addr = (sizeof(long) == 8) ? bswap_64(ptr_addr) + : bswap_32(ptr_addr); + return (ptr ^ si->random ^ ptr_addr); +-- +2.37.1 +