From ed0d08d1ca7ab2c16922b1abcaa542325500b781ddb20a8231093a1790173e44 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 28 Nov 2008 14:38:28 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/makedumpfile?expand=0&rev=25 --- makedumpfile-1.3.0.tar.bz2 | 3 -- makedumpfile-1.3.1.tar.bz2 | 3 ++ makedumpfile-2.6.27.diff | 25 ---------- ...mpfile-64bit-kernel-on-32bit-userland.diff | 47 +++++++++++++++++++ makedumpfile-coptflags.diff | 4 +- makedumpfile.changes | 21 +++++++++ makedumpfile.spec | 20 ++++++-- 7 files changed, 89 insertions(+), 34 deletions(-) delete mode 100644 makedumpfile-1.3.0.tar.bz2 create mode 100644 makedumpfile-1.3.1.tar.bz2 delete mode 100644 makedumpfile-2.6.27.diff create mode 100644 makedumpfile-64bit-kernel-on-32bit-userland.diff diff --git a/makedumpfile-1.3.0.tar.bz2 b/makedumpfile-1.3.0.tar.bz2 deleted file mode 100644 index ef4a06d..0000000 --- a/makedumpfile-1.3.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ee3318b53f318f5656420bb4746b3a80e6c453f55a6516a90a50f9c67e2413f9 -size 50089 diff --git a/makedumpfile-1.3.1.tar.bz2 b/makedumpfile-1.3.1.tar.bz2 new file mode 100644 index 0000000..c45d413 --- /dev/null +++ b/makedumpfile-1.3.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31a65eb569acfb5c140c65a2f23c685a7ee833c0910a17d5ebd6c9898a6967c6 +size 50315 diff --git a/makedumpfile-2.6.27.diff b/makedumpfile-2.6.27.diff deleted file mode 100644 index 3548f96..0000000 --- a/makedumpfile-2.6.27.diff +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User Bernhard Walle -# Date 1226482672 -3600 -# Node ID 9dccce624c6991f9e7f778dc18f334bfcf2063b8 -# Parent d9fb89bb3bbc78f2fcd313bbb75bbbbff35a7a42 -Claim to support 2.6.27 - -According to the changelog and my tests, 2.6.27 kernel is supported. Express -that in the LATEST_VERSION check. - - -Signed-off-by: Bernhard Walle - -diff -r d9fb89bb3bbc -r 9dccce624c69 makedumpfile.h ---- a/makedumpfile.h Wed Nov 12 10:36:17 2008 +0100 -+++ b/makedumpfile.h Wed Nov 12 10:37:52 2008 +0100 -@@ -436,7 +436,7 @@ - #define KVER_MIN_SHIFT 16 - #define KERNEL_VERSION(x,y,z) (((x) << KVER_MAJ_SHIFT) | ((y) << KVER_MIN_SHIFT) | (z)) - #define OLDEST_VERSION (0x0206000f) /* linux-2.6.15 */ --#define LATEST_VERSION (0x0206001a) /* linux-2.6.26 */ -+#define LATEST_VERSION (0x0206001b) /* linux-2.6.27 */ - #define VERSION_LINUX_2_6_26 (0x0206001a) /* linux-2.6.26 */ - #define VERSION_LINUX_2_6_27 (0x0206001b) /* linux-2.6.27 */ - diff --git a/makedumpfile-64bit-kernel-on-32bit-userland.diff b/makedumpfile-64bit-kernel-on-32bit-userland.diff new file mode 100644 index 0000000..7867824 --- /dev/null +++ b/makedumpfile-64bit-kernel-on-32bit-userland.diff @@ -0,0 +1,47 @@ +From: Bernhard Walle +Subject: [PATCH] Parse 64 bit VMCOREINFO on 32 bit userland +References: bnc #447432 + +This bug fixes the problem that on a 32 bit userland makedumpfile (as common +on the PPC platform) the parsing of the 64 bit VMCOREINFO fails with: + + # makedumpfile -c /home/sachin/dump/vmcore vmcore.filtered + read_vmcoreinfo_symbol: Invalid data in /tmp/vmcoreinfowVoyJK: + SYMBOL(mem_section)=c000000000bb4400 + +We just need to assume that the symbols are always 'unsigned long long' (64 bit) +instead of 'unsigned long' (native pointer size on Linux platforms). + + +Signed-off-by: Bernhard Walle + +--- + makedumpfile.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/makedumpfile.c ++++ b/makedumpfile.c +@@ -2271,10 +2271,10 @@ read_vmcoreinfo_basic_info(void) + return TRUE; + } + +-unsigned long ++unsigned long long + read_vmcoreinfo_symbol(char *str_symbol) + { +- unsigned long symbol = NOT_FOUND_SYMBOL; ++ unsigned long long symbol = NOT_FOUND_SYMBOL; + char buf[BUFSIZE_FGETS], *endp; + unsigned int i; + +@@ -2291,8 +2291,8 @@ read_vmcoreinfo_symbol(char *str_symbol) + if (buf[i - 1] == '\n') + buf[i - 1] = '\0'; + if (strncmp(buf, str_symbol, strlen(str_symbol)) == 0) { +- symbol = strtoul(buf + strlen(str_symbol), &endp, 16); +- if ((!symbol || symbol == ULONG_MAX) ++ symbol = strtoull(buf + strlen(str_symbol), &endp, 16); ++ if ((!symbol || symbol == ULONGLONG_MAX) + || strlen(endp) != 0) { + ERRMSG("Invalid data in %s: %s", + info->name_vmcoreinfo, buf); diff --git a/makedumpfile-coptflags.diff b/makedumpfile-coptflags.diff index 76857a6..f9f6645 100644 --- a/makedumpfile-coptflags.diff +++ b/makedumpfile-coptflags.diff @@ -4,8 +4,8 @@ --- a/Makefile +++ b/Makefile -@@ -4,10 +4,10 @@ VERSION=1.3.0 - DATE=10 October 2008 +@@ -4,10 +4,10 @@ VERSION=1.3.1 + DATE=26 November 2008 CC = gcc -CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \ diff --git a/makedumpfile.changes b/makedumpfile.changes index 7a8b1a5..3081665 100644 --- a/makedumpfile.changes +++ b/makedumpfile.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Fri Nov 28 10:30:49 CET 2008 - bwalle@suse.de + +- makedumpfile-64bit-kernel-on-32bit-userland.diff: Change return + type of read_vmcoreinfo_symbol() to 'unsigned long long'. + +------------------------------------------------------------------- +Thu Nov 27 15:43:30 CET 2008 - bwalle@suse.de + +- Fix parsing of 64 bit VMCOREINFO on 32 bit platforms. For SUSE, + this only affects openSUSE on PPC because SLES PPC has a 64 bit + userland now. (bnc#447432). + +------------------------------------------------------------------- +Thu Nov 27 10:12:43 CET 2008 - bwalle@suse.de + +- Update to 1.3.1 + o Support linux-2.6.26 sparsemem on i386. + o Support linux-2.6.27 and linux-2.6.28. +- Remove makedumpfile-2.6.27.diff: Mainline. + ------------------------------------------------------------------- Thu Nov 20 18:06:55 CET 2008 - bwalle@suse.de diff --git a/makedumpfile.spec b/makedumpfile.spec index 2cff210..4bf6aaa 100644 --- a/makedumpfile.spec +++ b/makedumpfile.spec @@ -1,5 +1,5 @@ # -# spec file for package makedumpfile (Version 1.3.0) +# spec file for package makedumpfile (Version 1.3.1) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -26,14 +26,14 @@ BuildRequires: libdw-devel BuildRequires: libdw-devel libdw1 libelf-devel libelf0 libelf1 %endif License: GPL v2 or later -Version: 1.3.0 -Release: 3 +Version: 1.3.1 +Release: 1 Summary: Partial kernel dump Group: System/Kernel Url: https://sourceforge.net/projects/makedumpfile/ Source: %{name}-%{version}.tar.bz2 Patch0: %{name}-coptflags.diff -Patch1: %{name}-2.6.27.diff +Patch1: %{name}-64bit-kernel-on-32bit-userland.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -73,6 +73,18 @@ install -c -m 0644 makedumpfile.8 $RPM_BUILD_ROOT%{_mandir}/man8 /bin/* %changelog +* Fri Nov 28 2008 bwalle@suse.de +- makedumpfile-64bit-kernel-on-32bit-userland.diff: Change return + type of read_vmcoreinfo_symbol() to 'unsigned long long'. +* Thu Nov 27 2008 bwalle@suse.de +- Fix parsing of 64 bit VMCOREINFO on 32 bit platforms. For SUSE, + this only affects openSUSE on PPC because SLES PPC has a 64 bit + userland now. (bnc#447432). +* Thu Nov 27 2008 bwalle@suse.de +- Update to 1.3.1 + o Support linux-2.6.26 sparsemem on i386. + o Support linux-2.6.27 and linux-2.6.28. +- Remove makedumpfile-2.6.27.diff: Mainline. * Thu Nov 20 2008 bwalle@suse.de - Don't require a C++ compiler. That was from the time where the library was built within that package and statically linked in.