From 6cad45050fa9cdd02e420e39ad312838db299458 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 08 2015 10:13:08 +0000 Subject: import crash-7.1.2-3.el7_2 --- diff --git a/SOURCES/fix_sadump_read_failures.patch b/SOURCES/fix_sadump_read_failures.patch new file mode 100644 index 0000000..fdce6c7 --- /dev/null +++ b/SOURCES/fix_sadump_read_failures.patch @@ -0,0 +1,50 @@ +commit 5e887f898c709f912686addde1e046dd1639c97b +Author: Dave Anderson +Date: Tue Oct 20 11:54:59 2015 -0400 + + Fix for the behavior of the --zero_excluded option when used with + SADUMP dumpfiles. Without the patch, the behavior of --zero_excluded + option is the opposite to what is expected: reads of filtered pages + return successfully with zero-filled memory, while reads of filtered + filtered pages fail when --zero_excluded option has been specified. + (d.hatayama@jp.fujitsu.com) + +diff --git a/sadump.c b/sadump.c +index 2806521..7cad15a 100644 +--- a/sadump.c ++++ b/sadump.c +@@ -790,7 +790,7 @@ int read_sadump(int fd, void *bufptr, int cnt, ulong addr, physaddr_t paddr) + if ((pfn >= sd->max_mapnr) || !page_is_ram(pfn)) + return SEEK_ERROR; + if (!page_is_dumpable(pfn)) { +- if (sd->flags & SADUMP_ZERO_EXCLUDED) ++ if (!(sd->flags & SADUMP_ZERO_EXCLUDED)) + return PAGE_EXCLUDED; + memset(bufptr, 0, cnt); + return cnt; + +commit ebca719c1906bd7bd7f8f6ab0e158be23437c6e2 +Author: Dave Anderson +Date: Tue Oct 20 11:48:05 2015 -0400 + + Fix for bitmap-handling in SADUMP dumpfiles, which associate each bit + in a bitmap with a physical page in the reverse order that is used + in kdump-compressed format. The bug had not been detected for a long + time because bitmaps in SADUMP formats consist mostly of 0x00 and + 0xff excluding a very limited amount of memory space for firmware. + (indou.takao@jp.fujitsu.com, d.hatayama@jp.fujitsu.com) + +diff --git a/sadump.c b/sadump.c +index bc67354..2806521 100644 +--- a/sadump.c ++++ b/sadump.c +@@ -715,7 +715,7 @@ is_set_bit(char *bitmap, uint64_t pfn) + ulong index, bit; + + index = pfn >> 3; +- bit = pfn & 7; ++ bit = 7 - (pfn & 7); + + return !!(bitmap[index] & (1UL << bit)); + } + diff --git a/SPECS/crash.spec b/SPECS/crash.spec index e5b12fe..a513294 100644 --- a/SPECS/crash.spec +++ b/SPECS/crash.spec @@ -4,7 +4,7 @@ Summary: Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles Name: crash Version: 7.1.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3 Group: Development/Debuggers Source: http://people.redhat.com/anderson/crash-%{version}.tar.gz @@ -17,6 +17,7 @@ Requires: binutils Patch0: lzo_snappy.patch Patch1: recognize_multiple_page_slab_cache.patch Patch2: fix_ARM64_bt-f_SIGSEGV.patch +Patch3: fix_sadump_read_failures.patch %description The core analysis suite is a self-contained tool that can be used to @@ -40,6 +41,7 @@ offered by Mission Critical Linux, or the LKCD kernel patch. %patch0 -p1 -b lzo_snappy.patch %patch1 -p1 -b recognize_multiple_page_slab_cache.patch %patch2 -p1 -b fix_ARM64_bt-f_SIGSEGV.patch +%patch3 -p1 -b fix_sadump_read_failures.patch %build make RPMPKG="%{version}-%{release}" CFLAGS="%{optflags}" @@ -68,6 +70,10 @@ rm -rf %{buildroot} %{_includedir}/* %changelog +* Mon Nov 23 2015 Dave Anderson - 7.1.2-3 +- crash fails to read or wrongly reads some parts of memory in sadump vmcore format + Resolves: rhbz#1282997 + * Tue Aug 4 2015 Dave Anderson - 7.1.2-2 - Fix "kmem -s
", "bt -F[F]", and "rd -S[S]" options in kernels configured with CONFIG_SLUB having multiple-page slabs.