Resolves: bz 499849

This commit is contained in:
Neil Horman 2009-05-08 17:11:21 +00:00
parent 64c7c7b164
commit 2e66fb4fde
24 changed files with 11 additions and 1018 deletions

View File

@ -6,3 +6,4 @@ makedumpfile-1.1.5.tar.gz
kexec-tools-testing-20070330.tar.bz2
makedumpfile-1.2.6.tar.gz
kexec-tools-2.0.0.tar.bz2
makedumpfile-1.3.3.tar.gz

View File

@ -1,34 +0,0 @@
--- kexec-tools-testing-20070330/kexec/arch/i386/kexec-bzImage.c.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/i386/kexec-bzImage.c 2007-08-27 15:30:42.000000000 -0400
@@ -326,6 +326,9 @@
#define OPT_APPEND (OPT_ARCH_MAX+0)
#define OPT_RAMDISK (OPT_ARCH_MAX+1)
#define OPT_REAL_MODE (OPT_ARCH_MAX+2)
+#define OPT_ARGS_ELF (OPT_ARCH_MAX+3)
+#define OPT_ARGS_LINUX (OPT_ARCH_MAX+4)
+#define OPT_ARGS_NONE (OPT_ARCH_MAX+5)
static const struct option options[] = {
KEXEC_ARCH_OPTIONS
{ "debug", 0, 0, OPT_DEBUG },
@@ -334,6 +337,9 @@
{ "initrd", 1, 0, OPT_RAMDISK },
{ "ramdisk", 1, 0, OPT_RAMDISK },
{ "real-mode", 0, 0, OPT_REAL_MODE },
+ { "args-elf", 0, NULL, OPT_ARGS_ELF },
+ { "args-linux", 0, NULL, OPT_ARGS_LINUX },
+ { "args-none", 0, NULL, OPT_ARGS_NONE },
{ 0, 0, 0, 0 },
};
static const char short_options[] = KEXEC_ARCH_OPT_STR "d";
@@ -368,6 +374,11 @@
case OPT_REAL_MODE:
real_mode_entry = 1;
break;
+ case OPT_ARGS_ELF:
+ case OPT_ARGS_LINUX:
+ case OPT_ARGS_NONE:
+ /* we can ignore these options */
+ break;
}
}
command_line_len = 0;

View File

@ -1,79 +0,0 @@
diff -up kexec-tools-testing-20070330/include/x86/x86-linux.h.orig kexec-tools-testing-20070330/include/x86/x86-linux.h
--- kexec-tools-testing-20070330/include/x86/x86-linux.h.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/include/x86/x86-linux.h 2008-03-13 11:21:45.000000000 -0400
@@ -144,18 +144,22 @@ struct x86_linux_param_header {
/* 2.04+ */
uint32_t kernel_alignment; /* 0x230 */
uint8_t relocatable_kernel; /* 0x234 */
- uint8_t reserved15[0x2d0 - 0x235]; /* 0x230 */
+ uint8_t reserved15[3]; /* 0x235 */
+ uint32_t cmdline_size; /* 0x238 */
+ uint32_t hardware_subarch; /* 0x23C */
+ uint64_t hardware_subarch_data; /* 0x240 */
+ uint8_t reserved16[0x2d0 - 0x248]; /* 0x248 */
#endif
struct e820entry e820_map[E820MAX]; /* 0x2d0 */
/* 0x550 */
-#define COMMAND_LINE_SIZE 256
+#define COMMAND_LINE_SIZE 2048
};
struct x86_linux_faked_param_header {
struct x86_linux_param_header hdr; /* 0x00 */
- uint8_t reserved16[688]; /* 0x550 */
- uint8_t command_line[COMMAND_LINE_SIZE]; /* 0x800 */
- uint8_t reserved17[1792]; /* 0x900 - 0x1000 */
+ uint8_t reserved17[0xab0]; /* 0x550 */
+ uint8_t command_line[COMMAND_LINE_SIZE]; /* 0x1000 */
+ uint8_t reserved18[0x200]; /* 0x1800 - 0x2000 */
};
struct x86_linux_header {
@@ -206,7 +210,11 @@ struct x86_linux_header {
#else
uint32_t kernel_alignment; /* 0x230 */
uint8_t relocatable_kernel; /* 0x234 */
- uint8_t tail[32*1024 - 0x235]; /* 0x230 */
+ uint8_t reserved6[3]; /* 0x235 */
+ uint32_t cmdline_size; /* 0x238 */
+ uint32_t hardware_subarch; /* 0x23C */
+ uint64_t hardware_subarch_data; /* 0x240 */
+ uint8_t tail[32*1024 - 0x248]; /* 0x248 */
#endif
} PACKED;
diff -up kexec-tools-testing-20070330/kexec/arch/i386/kexec-bzImage.c.orig kexec-tools-testing-20070330/kexec/arch/i386/kexec-bzImage.c
--- kexec-tools-testing-20070330/kexec/arch/i386/kexec-bzImage.c.orig 2008-03-13 11:19:03.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/i386/kexec-bzImage.c 2008-03-13 11:21:45.000000000 -0400
@@ -134,6 +134,17 @@ int do_bzImage_load(struct kexec_info *i
return -1;
}
+ if (setup_header.protocol_version >= 0x0206) {
+ if (command_line_len > setup_header.cmdline_size) {
+ printf("Kernel command line too long for kernel!\n");
+ return -1;
+ }
+ } else {
+ if (command_line_len > 255) {
+ printf("WARNING: This kernel may only support 255 byte command lines\n");
+ }
+ }
+
if (setup_header.protocol_version >= 0x0205) {
relocatable_kernel = setup_header.relocatable_kernel;
dfprintf(stdout, "bzImage is relocatable\n");
diff -up kexec-tools-testing-20070330/kexec/arch/i386/x86-linux-setup.c.orig kexec-tools-testing-20070330/kexec/arch/i386/x86-linux-setup.c
--- kexec-tools-testing-20070330/kexec/arch/i386/x86-linux-setup.c.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/i386/x86-linux-setup.c 2008-03-13 11:21:45.000000000 -0400
@@ -38,8 +38,9 @@ void init_linux_parameters(struct x86_li
/* Boot block magic */
memcpy(real_mode->header_magic, "HdrS", 4);
- real_mode->protocol_version = 0x0203;
+ real_mode->protocol_version = 0x0206;
real_mode->initrd_addr_max = DEFAULT_INITRD_ADDR_MAX;
+ real_mode->cmdline_size = COMMAND_LINE_SIZE;
}
void setup_linux_bootloader_parameters(

View File

@ -1,14 +0,0 @@
--- kexec-tools-1.101/Makefile.orig 2005-11-03 10:34:21.000000000 -0500
+++ kexec-tools-1.101/Makefile 2005-11-03 10:34:47.000000000 -0500
@@ -43,9 +43,9 @@ PKGLIBDIR=$(LIBDIR)/$(PACKAGE)
PKGINCLUDEIR=$(INCLUDEDIR)/$(PACKAGE)
MAN_PAGES:= kexec/kexec.8
-BINARIES_i386:= $(SBINDIR)/kexec $(PKGLIBDIR)/kexec_test
+BINARIES_i386:= $(SBINDIR)/kexec $(PKGLIBDIR)/kexec_test $(SBINDIR)/kdump
BINARIES_x86_64:=$(SBINDIR)/kexec $(PKGLIBDIR)/kexec_test
-BINARIES:=$(SBINDIR)/kexec $(SBINDIR)/kdump $(BINARIES_$(ARCH))
+BINARIES:=$(SBINDIR)/kexec $(BINARIES_$(ARCH))
TARGETS:=$(BINARIES) $(MAN_PAGES)

View File

@ -1,13 +0,0 @@
--- kexec-tools-testing-20070330/Makefile.old 2007-08-27 15:18:35.000000000 -0400
+++ kexec-tools-testing-20070330/Makefile 2007-08-27 15:18:52.000000000 -0400
@@ -44,8 +44,8 @@
MAN_PAGES:= kexec/kexec.8
MAN_PAGES+= kdump/kdump.8
-BINARIES_i386:= $(SBINDIR)/kexec $(PKGLIBDIR)/kexec_test
-BINARIES_x86_64:=$(SBINDIR)/kexec $(PKGLIBDIR)/kexec_test
+BINARIES_i386:= $(SBINDIR)/kexec
+BINARIES_x86_64:=$(SBINDIR)/kexec
BINARIES:=$(SBINDIR)/kexec $(SBINDIR)/kdump $(BINARIES_$(ARCH))
TARGETS:=$(BINARIES) $(MAN_PAGES)

View File

@ -1,11 +0,0 @@
--- kexec-tools-1.101/kexec/arch/i386/kexec-x86.c.orig 2006-11-15 16:28:04.000000000 -0500
+++ kexec-tools-1.101/kexec/arch/i386/kexec-x86.c 2006-11-15 16:28:13.000000000 -0500
@@ -145,7 +145,7 @@
.serial_baud = 0,
.console_vga = 0,
.console_serial = 0,
- .core_header_type = CORE_TYPE_ELF64,
+ .core_header_type = CORE_TYPE_ELF32,
};
int arch_process_options(int argc, char **argv)

View File

@ -1,22 +0,0 @@
--- kexec-tools-1.101/kexec/arch/x86_64/kexec-elf-x86_64.c.fix 2006-08-29 20:07:34.000000000 -0400
+++ kexec-tools-1.101/kexec/arch/x86_64/kexec-elf-x86_64.c 2006-08-29 20:08:03.000000000 -0400
@@ -120,7 +120,7 @@ int elf_x86_64_load(int argc, char **arg
/*
* Parse the command line arguments
*/
- arg_style = ARG_STYLE_ELF;
+ arg_style = ARG_STYLE_LINUX;
command_line = 0;
modified_cmdline = 0;
modified_cmdline_len = 0;
--- kexec-tools-1.101/kexec/arch/i386/kexec-elf-x86.c.fix 2006-08-29 20:07:14.000000000 -0400
+++ kexec-tools-1.101/kexec/arch/i386/kexec-elf-x86.c 2006-08-29 20:07:24.000000000 -0400
@@ -121,7 +121,7 @@ int elf_x86_load(int argc, char **argv,
/*
* Parse the command line arguments
*/
- arg_style = ARG_STYLE_ELF;
+ arg_style = ARG_STYLE_LINUX;
command_line = 0;
modified_cmdline = 0;
modified_cmdline_len = 0;

View File

@ -1,27 +0,0 @@
diff -up kexec-tools-testing-20070330/kexec/arch/ia64/crashdump-ia64.c.orig kexec-tools-testing-20070330/kexec/arch/ia64/crashdump-ia64.c
--- kexec-tools-testing-20070330/kexec/arch/ia64/crashdump-ia64.c.orig 2008-04-08 14:36:59.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/ia64/crashdump-ia64.c 2008-04-08 14:41:43.000000000 -0400
@@ -224,9 +224,22 @@ int load_crashdump_segments(struct kexec
void *tmp;
if (info->kexec_flags & KEXEC_ON_CRASH ) {
if (get_crash_memory_ranges(&mem_range, &nr_ranges) == 0) {
+ int i;
info->kern_paddr_start = kernel_code_start;
- info->kern_vaddr_start = LOAD_OFFSET;
+ for (i=0; i < nr_ranges; i++) {
+ unsigned long long mstart = crash_memory_range[i].start;
+ unsigned long long mend = crash_memory_range[i].end;
+ if (!mstart && !mend)
+ continue;
+ if (kernel_code_start >= mstart &&
+ kernel_code_start < mend) {
+ info->kern_vaddr_start = mstart +
+ LOAD_OFFSET;
+ break;
+ }
+ }
+
info->kern_size = kernel_code_end - kernel_code_start + 1;
if (crash_create_elf64_headers(info, &elf_info,
crash_memory_range,

View File

@ -1,48 +0,0 @@
diff -up kexec-tools-testing-20070330/purgatory/arch/ia64/purgatory-ia64.c.orig kexec-tools-testing-20070330/purgatory/arch/ia64/purgatory-ia64.c
--- kexec-tools-testing-20070330/purgatory/arch/ia64/purgatory-ia64.c.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/purgatory/arch/ia64/purgatory-ia64.c 2008-03-26 08:05:11.000000000 -0400
@@ -123,6 +123,7 @@ typedef struct {
struct loaded_segment {
unsigned long start;
unsigned long end;
+ unsigned long reserved;
};
struct kexec_boot_params {
@@ -201,7 +202,8 @@ patch_efi_memmap(struct kexec_boot_param
}
dst_md->phys_addr = seg->start;
dst_md->num_pages = mid_pages;
- dst_md->type = EFI_LOADER_DATA;
+ dst_md->type = seg->reserved ?
+ EFI_UNUSABLE_MEMORY:EFI_LOADER_DATA;
if (!end_pages)
break;
dest += boot_param->efi_memdesc_size;
diff -up kexec-tools-testing-20070330/kexec/arch/ia64/crashdump-ia64.c.orig kexec-tools-testing-20070330/kexec/arch/ia64/crashdump-ia64.c
--- kexec-tools-testing-20070330/kexec/arch/ia64/crashdump-ia64.c.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/ia64/crashdump-ia64.c 2008-03-26 08:05:11.000000000 -0400
@@ -53,6 +53,7 @@ static unsigned long kernel_code_end;
struct loaded_segment {
unsigned long start;
unsigned long end;
+ unsigned long reserved;
};
#define MAX_LOAD_SEGMENTS 128
@@ -87,6 +88,7 @@ static void add_loaded_segments_info(str
start&~(ELF_PAGE_SIZE-1);
loaded_segments[loaded_segments_num].end =
(end + ELF_PAGE_SIZE - 1)&~(ELF_PAGE_SIZE - 1);
+ loaded_segments[loaded_segments_num].reserved = 0;
loaded_segments_num++;
}
}
@@ -239,6 +241,7 @@ int load_crashdump_segments(struct kexec
loaded_segments[loaded_segments_num].start = elfcorehdr;
loaded_segments[loaded_segments_num].end = elfcorehdr +
sz;
+ loaded_segments[loaded_segments_num].reserved = 1;
loaded_segments_num++;
cmdline_add_elfcorehdr(cmdline, elfcorehdr);
}

View File

@ -1,15 +0,0 @@
diff -up kexec-tools-testing-20070330/makedumpfile/Makefile.orig kexec-tools-testing-20070330/makedumpfile/Makefile
--- kexec-tools-testing-20070330/makedumpfile/Makefile.orig 2008-01-03 08:56:42.000000000 -0500
+++ kexec-tools-testing-20070330/makedumpfile/Makefile 2008-01-03 08:57:36.000000000 -0500
@@ -4,9 +4,9 @@ VERSION=1.1.5
DATE=27 July 2007
CC = gcc
-CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
+CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
-DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"'
-CFLAGS_ARCH = -g -O2 -Wall -D_FILE_OFFSET_BITS=64
+CFLAGS_ARCH = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
ARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \

View File

@ -1,81 +0,0 @@
--- kexec-tools-1.101/makedumpfile/makedumpfile.c.orig 2007-07-27 13:16:28.000000000 -0400
+++ kexec-tools-1.101/makedumpfile/makedumpfile.c 2007-08-22 13:20:04.000000000 -0400
@@ -5195,6 +5195,9 @@
int i;
struct pt_load_segment *pls;
int ret = FALSE;
+ unsigned long long paddr;
+ off_t offset_page;
+ unsigned char *buf = NULL;
/*
* NOTE: the first half of bitmap is not used for Xen extraction
@@ -5211,6 +5214,11 @@
strerror(errno));
goto out;
}
+ if ((buf = malloc(info->page_size)) == NULL) {
+ ERRMSG("Can't allocate memory for the page. %s\n",
+ strerror(errno));
+ goto out;
+ }
pfn = 0;
for (i = 0; i < info->num_load_memory; i++) {
@@ -5255,11 +5263,35 @@
* - xen heap area, or
* - selected domain page
*/
- if (_domain == 0 ||
+ if (!(_domain == 0 ||
(info->xen_heap_start <= pfn && pfn < info->xen_heap_end) ||
- ((count_info & 0xffff) && is_select_domain(info, _domain))) {
- set_bitmap(bm2.buf, pfn%PFN_BUFBITMAP, 1);
+ ((count_info & 0xffff) && is_select_domain(info, _domain)))) {
+ continue;
+ }
+ if (info->dump_level & DL_EXCLUDE_ZERO) {
+ paddr = (unsigned long long)pfn * info->page_size;
+ offset_page = paddr_to_offset(info, paddr);
+ if (!offset_page) {
+ ERRMSG("Can't convert physaddr(%llx) to a offset.\n",
+ paddr);
+ goto out;
+ }
+ if (lseek(info->fd_memory, offset_page,
+ SEEK_SET) == (off_t)-1) {
+ ERRMSG("Can't seek the dump memory(%s). %s\n",
+ info->name_memory, strerror(errno));
+ goto out;
+ }
+ if (read(info->fd_memory, buf, info->page_size)
+ != info->page_size) {
+ ERRMSG("Can't read the dump memory(%s). %s\n",
+ info->name_memory, strerror(errno));
+ goto out;
+ }
+ if (is_zero_page(buf, info->page_size))
+ continue;
}
+ set_bitmap(bm2.buf, pfn%PFN_BUFBITMAP, 1);
}
}
@@ -5275,6 +5307,8 @@
out:
if (bm2.buf != NULL)
free(bm2.buf);
+ if (buf != NULL)
+ free(buf);
return ret;
}
@@ -5546,7 +5580,7 @@
MSG("-E must be specified with --xen-syms or --xen-vmcoreinfo.\n");
goto out;
}
- info->dump_level = DL_EXCLUDE_XEN;
+ info->dump_level |= DL_EXCLUDE_XEN;
return handle_xen(info);
} else if (info->flag_rearrange) {

View File

@ -1,299 +0,0 @@
diff -up kexec-tools-testing-20070330/purgatory/purgatory.c.orig kexec-tools-testing-20070330/purgatory/purgatory.c
--- kexec-tools-testing-20070330/purgatory/purgatory.c.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/purgatory/purgatory.c 2008-02-28 10:46:42.000000000 -0500
@@ -46,3 +46,5 @@ void purgatory(void)
verify_sha256_digest();
post_verification_setup_arch();
}
+
+#include "../util_lib/sha256.c"
diff -up kexec-tools-testing-20070330/purgatory/arch/ppc64/Makefile.orig kexec-tools-testing-20070330/purgatory/arch/ppc64/Makefile
--- kexec-tools-testing-20070330/purgatory/arch/ppc64/Makefile.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/purgatory/arch/ppc64/Makefile 2008-02-28 10:46:42.000000000 -0500
@@ -6,3 +6,5 @@ PURGATORY_S_SRCS+= purgatory/arch/ppc64/
PURGATORY_C_SRCS += purgatory/arch/ppc64/purgatory-ppc64.c
PURGATORY_C_SRCS += purgatory/arch/ppc64/console-ppc64.c
PURGATORY_C_SRCS += purgatory/arch/ppc64/crashdump_backup.c
+
+PCFLAGS += -m64 -mcall-aixdesc
diff -up kexec-tools-testing-20070330/purgatory/Makefile.orig kexec-tools-testing-20070330/purgatory/Makefile
--- kexec-tools-testing-20070330/purgatory/Makefile.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/purgatory/Makefile 2008-02-28 10:50:37.000000000 -0500
@@ -57,9 +57,9 @@ $(PURGATORY_S_OBJS): $(OBJDIR)/%.o: %.S
$(MKDIR) -p $(@D)
$(CC) $(PCFLAGS) -o $@ -c $<
-$(PURGATORY): $(PURGATORY_OBJS) $(UTIL_LIB)
+$(PURGATORY): $(PURGATORY_OBJS)
$(MKDIR) -p $(@D)
- $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) --no-undefined -e purgatory_start -r -o $@ $(PURGATORY_OBJS) $(UTIL_LIB)
+ $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) --no-undefined -e purgatory_start -r -o $@ $(PURGATORY_OBJS)
echo::
@echo "PURGATORY_C_SRCS $(PURGATORY_C_SRCS)"
diff -up kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-elf-rel-ppc64.c.orig kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-elf-rel-ppc64.c
--- kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-elf-rel-ppc64.c.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-elf-rel-ppc64.c 2008-02-28 10:46:42.000000000 -0500
@@ -101,10 +101,10 @@ void machine_apply_elf_rel(struct mem_eh
break;
case R_PPC64_ADDR16_HIGHEST:
- *(uint16_t *)location = ((value>>48) & 0xffff);
+ *(uint16_t *)location = (((uint64_t)value>>48) & 0xffff);
break;
case R_PPC64_ADDR16_HIGHER:
- *(uint16_t *)location = ((value>>32) & 0xffff);
+ *(uint16_t *)location = (((uint64_t)value>>32) & 0xffff);
break;
default:
diff -up kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.h.orig kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.h
--- kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.h.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.h 2008-02-28 10:51:16.000000000 -0500
@@ -14,7 +14,7 @@ int elf_ppc64_load(int argc, char **argv
void elf_ppc64_usage(void);
void reserve(unsigned long long where, unsigned long long length);
-extern unsigned long initrd_base, initrd_size;
+extern uint64_t initrd_base, initrd_size;
extern int max_memory_ranges;
/* boot block version 2 as defined by the linux kernel */
diff -up kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c.orig kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c
--- kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c.orig 2008-02-28 10:45:00.000000000 -0500
+++ kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c 2008-02-28 10:54:54.000000000 -0500
@@ -38,10 +38,10 @@
static struct memory_range *exclude_range = NULL;
static struct memory_range *memory_range = NULL;
static struct memory_range *base_memory_range = NULL;
-static unsigned long long rmo_top;
-unsigned long long memory_max = 0;
+static uint64_t rmo_top;
+uint64_t memory_max = 0;
static int nr_memory_ranges, nr_exclude_ranges;
-unsigned long long crash_base, crash_size;
+uint64_t crash_base, crash_size;
unsigned int rtas_base, rtas_size;
int max_memory_ranges;
@@ -175,10 +175,10 @@ static int get_base_ranges()
break;
}
base_memory_range[local_memory_ranges].start =
- ((unsigned long long *)buf)[0];
+ ((uint64_t *)buf)[0];
base_memory_range[local_memory_ranges].end =
base_memory_range[local_memory_ranges].start +
- ((unsigned long long *)buf)[1];
+ ((uint64_t *)buf)[1];
base_memory_range[local_memory_ranges].type = RANGE_RAM;
local_memory_ranges++;
dfprintf(stderr, "%016llx-%016llx : %x\n",
@@ -206,7 +206,7 @@ static int get_base_ranges()
static int sort_base_ranges()
{
int i, j;
- unsigned long long tstart, tend;
+ uint64_t tstart, tend;
for (i = 0; i < nr_memory_ranges - 1; i++) {
for (j = 0; j < nr_memory_ranges - i - 1; j++) {
@@ -227,7 +227,7 @@ static int sort_base_ranges()
static int sort_ranges()
{
int i, j;
- unsigned long long tstart, tend;
+ uint64_t tstart, tend;
for (i = 0; i < nr_exclude_ranges - 1; i++) {
for (j = 0; j < nr_exclude_ranges - i - 1; j++) {
if (exclude_range[j].start > exclude_range[j+1].start) {
@@ -248,11 +248,11 @@ static int sort_ranges()
*/
static int get_devtree_details(unsigned long kexec_flags)
{
- unsigned long long rmo_base;
- unsigned long long tce_base;
+ uint64_t rmo_base;
+ uint64_t tce_base;
unsigned int tce_size;
- unsigned long long htab_base, htab_size;
- unsigned long long kernel_end;
+ uint64_t htab_base, htab_size;
+ uint64_t kernel_end;
char buf[MAXBYTES];
char device_tree[256] = "/proc/device-tree/";
char fname[256];
@@ -288,7 +288,7 @@ static int get_devtree_details(unsigned
closedir(dir);
return -1;
}
- if (fread(&kernel_end, sizeof(unsigned long), 1, file) != 1) {
+ if (fread(&kernel_end, sizeof(uint64_t), 1, file) != 1) {
perror(fname);
fclose(file);
closedir(cdir);
@@ -313,7 +313,7 @@ static int get_devtree_details(unsigned
closedir(dir);
return -1;
}
- if (fread(&crash_base, sizeof(unsigned long), 1,
+ if (fread(&crash_base, sizeof(uint64_t), 1,
file) != 1) {
perror(fname);
fclose(file);
@@ -333,7 +333,7 @@ static int get_devtree_details(unsigned
closedir(dir);
return -1;
}
- if (fread(&crash_size, sizeof(unsigned long), 1,
+ if (fread(&crash_size, sizeof(uint64_t), 1,
file) != 1) {
perror(fname);
fclose(file);
@@ -366,7 +366,7 @@ static int get_devtree_details(unsigned
closedir(dir);
return -1;
}
- if (fread(&htab_base, sizeof(unsigned long), 1, file) != 1) {
+ if (fread(&htab_base, sizeof(uint64_t), 1, file) != 1) {
perror(fname);
fclose(file);
closedir(cdir);
@@ -383,7 +383,7 @@ static int get_devtree_details(unsigned
closedir(dir);
return -1;
}
- if (fread(&htab_size, sizeof(unsigned long), 1, file) != 1) {
+ if (fread(&htab_size, sizeof(uint64_t), 1, file) != 1) {
perror(fname);
fclose(file);
closedir(cdir);
@@ -452,8 +452,8 @@ static int get_devtree_details(unsigned
closedir(dir);
return -1;
}
- rmo_base = ((unsigned long long *)buf)[0];
- rmo_top = rmo_base + ((unsigned long long *)buf)[1];
+ rmo_base = ((uint64_t *)buf)[0];
+ rmo_top = rmo_base + ((uint64_t *)buf)[1];
if (rmo_top > 0x07C00000UL)
rmo_top = 0x07C00000UL;
@@ -474,7 +474,7 @@ static int get_devtree_details(unsigned
closedir(dir);
return -1;
}
- if (fread(&tce_base, sizeof(unsigned long), 1, file) != 1) {
+ if (fread(&tce_base, sizeof(uint64_t), 1, file) != 1) {
perror(fname);
fclose(file);
closedir(cdir);
diff -up kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.h.orig kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.h
--- kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.h.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.h 2008-02-28 10:55:38.000000000 -0500
@@ -23,8 +23,8 @@ void add_usable_mem_rgns(unsigned long l
#define _ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1)))
#define _ALIGN_DOWN(addr,size) ((addr)&(~((size)-1)))
-extern unsigned long long crash_base;
-extern unsigned long long crash_size;
+extern uint64_t crash_base;
+extern uint64_t crash_size;
extern unsigned int rtas_base;
extern unsigned int rtas_size;
diff -up kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-elf-ppc64.c.orig kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-elf-ppc64.c
--- kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-elf-ppc64.c.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-elf-ppc64.c 2008-02-28 10:46:42.000000000 -0500
@@ -42,7 +42,7 @@
#define BOOTLOADER "kexec"
#define BOOTLOADER_VERSION VERSION
-unsigned long initrd_base, initrd_size;
+uint64_t initrd_base, initrd_size;
int create_flatten_tree(struct kexec_info *, unsigned char **, unsigned long *,
char *);
@@ -76,19 +76,19 @@ int elf_ppc64_load(int argc, char **argv
char *cmdline, *modified_cmdline;
const char *ramdisk, *devicetreeblob;
int cmdline_len, modified_cmdline_len;
- unsigned long long max_addr, hole_addr;
+ uint64_t max_addr, hole_addr;
unsigned char *seg_buf = NULL;
off_t seg_size = 0;
struct mem_phdr *phdr;
size_t size;
- unsigned long long *rsvmap_ptr;
+ uint64_t *rsvmap_ptr;
struct bootblock *bb_ptr;
unsigned int nr_segments, i;
int result, opt;
- unsigned long my_kernel, my_dt_offset;
+ uint64_t my_kernel, my_dt_offset;
unsigned int my_panic_kernel;
- unsigned long my_stack, my_backup_start;
- unsigned long toc_addr;
+ uint64_t my_stack, my_backup_start;
+ uint64_t toc_addr;
#define OPT_APPEND (OPT_ARCH_MAX+0)
#define OPT_RAMDISK (OPT_ARCH_MAX+1)
@@ -226,10 +226,10 @@ int elf_ppc64_load(int argc, char **argv
}
seg_buf = (unsigned char *)slurp_file(ramdisk, &seg_size);
add_buffer(info, seg_buf, seg_size, seg_size, 0, 0, max_addr, 1);
- hole_addr = (unsigned long long)
+ hole_addr = (uint64_t)
info->segment[info->nr_segments-1].mem;
initrd_base = hole_addr;
- initrd_size = (unsigned long long)
+ initrd_size = (uint64_t)
info->segment[info->nr_segments-1].memsz;
} /* ramdisk */
@@ -259,25 +259,25 @@ int elf_ppc64_load(int argc, char **argv
*/
bb_ptr = (struct bootblock *)(
(unsigned char *)info->segment[(info->nr_segments)-1].buf);
- rsvmap_ptr = (unsigned long long *)(
+ rsvmap_ptr = (uint64_t *)(
(unsigned char *)info->segment[(info->nr_segments)-1].buf +
bb_ptr->off_mem_rsvmap);
while (*rsvmap_ptr || *(rsvmap_ptr+1))
rsvmap_ptr += 2;
rsvmap_ptr -= 2;
- *rsvmap_ptr = (unsigned long long)(
+ *rsvmap_ptr = (uint64_t)(
info->segment[(info->nr_segments)-1].mem);
rsvmap_ptr++;
- *rsvmap_ptr = (unsigned long long)bb_ptr->totalsize;
+ *rsvmap_ptr = (uint64_t)bb_ptr->totalsize;
nr_segments = info->nr_segments;
/* Set kernel */
- my_kernel = (unsigned long )info->segment[0].mem;
+ my_kernel = (uint64_t)info->segment[0].mem;
elf_rel_set_symbol(&info->rhdr, "kernel", &my_kernel, sizeof(my_kernel));
/* Set dt_offset */
- my_dt_offset = (unsigned long )info->segment[nr_segments-1].mem;
+ my_dt_offset = (uint64_t)info->segment[nr_segments-1].mem;
elf_rel_set_symbol(&info->rhdr, "dt_offset", &my_dt_offset,
sizeof(my_dt_offset));
diff -up kexec-tools-testing-20070330/kexec/kexec-sha256.h.orig kexec-tools-testing-20070330/kexec/kexec-sha256.h
--- kexec-tools-testing-20070330/kexec/kexec-sha256.h.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/kexec-sha256.h 2008-02-28 10:46:42.000000000 -0500
@@ -2,8 +2,8 @@
#define KEXEC_SHA256_H
struct sha256_region {
- const void *start;
- unsigned long len;
+ uint64_t start;
+ uint64_t len;
};
#define SHA256_REGIONS 16

View File

@ -1,10 +0,0 @@
--- kexec-tools-1.101/kexec/arch/ppc/kexec-ppc.c.orig 2006-07-05 16:21:50.000000000 -0400
+++ kexec-tools-1.101/kexec/arch/ppc/kexec-ppc.c 2006-07-05 16:22:01.000000000 -0400
@@ -33,7 +33,6 @@ int get_memory_ranges(struct memory_rang
memory_range[memory_ranges].type = RANGE_RAM;
memory_ranges++;
#else
-#error Please, fix this for your platform
const char iomem[] = "/proc/iomem";
char line[MAX_LINE];
FILE *fp;

View File

@ -1,33 +0,0 @@
diff -up kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c.orig kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c
--- kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c.orig 2008-02-20 10:08:36.000000000 -0500
+++ kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c 2008-02-20 10:10:32.000000000 -0500
@@ -133,7 +133,7 @@ static int get_base_ranges()
int local_memory_ranges = 0;
char device_tree[256] = "/proc/device-tree/";
char fname[256];
- char buf[MAXBYTES-1];
+ char buf[MAXBYTES];
DIR *dir, *dmem;
FILE *file;
struct dirent *dentry, *mentry;
@@ -253,7 +253,7 @@ static int get_devtree_details(unsigned
unsigned int tce_size;
unsigned long long htab_base, htab_size;
unsigned long long kernel_end;
- char buf[MAXBYTES-1];
+ char buf[MAXBYTES];
char device_tree[256] = "/proc/device-tree/";
char fname[256];
DIR *dir, *cdir;
diff -up kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c.orig kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c
--- kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c 2008-02-20 10:09:23.000000000 -0500
@@ -101,7 +101,7 @@ static int get_crash_memory_ranges(struc
int memory_ranges = 0;
char device_tree[256] = "/proc/device-tree/";
char fname[256];
- char buf[MAXBYTES-1];
+ char buf[MAXBYTES];
DIR *dir, *dmem;
FILE *file;
struct dirent *dentry, *mentry;

View File

@ -1,65 +0,0 @@
diff -up kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c.orig kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c
--- kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c.orig 2008-03-10 15:08:18.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c 2008-03-10 15:15:27.000000000 -0400
@@ -129,7 +129,8 @@ static int get_crash_memory_ranges(struc
goto err;
}
while ((dentry = readdir(dir)) != NULL) {
- if (strncmp(dentry->d_name, "memory@", 7))
+ if (strncmp(dentry->d_name, "memory@", 7) &&
+ strcmp(dentry->d_name, "memory"))
continue;
strcpy(fname, device_tree);
strcat(fname, dentry->d_name);
diff -up kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c.orig kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c
--- kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c.orig 2008-03-10 15:08:18.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c 2008-03-10 15:15:27.000000000 -0400
@@ -101,7 +101,7 @@ err1:
}
/*
- * Count the memory@ nodes under /proc/device-tree and populate the
+ * Count the memory nodes under /proc/device-tree and populate the
* max_memory_ranges variable. This variable replaces MAX_MEMORY_RANGES
* macro used earlier.
*/
@@ -118,7 +118,8 @@ static int count_memory_ranges()
while ((dentry = readdir(dir)) != NULL) {
if (strncmp(dentry->d_name, "memory@", 7) &&
- strncmp(dentry->d_name, "pci@", 4))
+ strcmp(dentry->d_name, "memory") &&
+ strncmp(dentry->d_name, "pci@", 4))
continue;
max_memory_ranges++;
}
@@ -144,7 +145,8 @@ static int get_base_ranges()
return -1;
}
while ((dentry = readdir(dir)) != NULL) {
- if (strncmp(dentry->d_name, "memory@", 7))
+ if (strncmp(dentry->d_name, "memory@", 7) &&
+ strcmp(dentry->d_name, "memory"))
continue;
strcpy(fname, device_tree);
strcat(fname, dentry->d_name);
@@ -268,7 +270,8 @@ static int get_devtree_details(unsigned
while ((dentry = readdir(dir)) != NULL) {
if (strncmp(dentry->d_name, "chosen", 6) &&
- strncmp(dentry->d_name, "memory@0", 8) &&
+ strncmp(dentry->d_name, "memory@", 7) &&
+ strcmp(dentry->d_name, "memory") &&
strncmp(dentry->d_name, "pci@", 4) &&
strncmp(dentry->d_name, "rtas", 4))
continue;
@@ -437,7 +440,8 @@ static int get_devtree_details(unsigned
add_usable_mem_rgns(rtas_base, rtas_size);
} /* rtas */
- if (strncmp(dentry->d_name, "memory@0", 8) == 0) {
+ if (!strncmp(dentry->d_name, "memory@", 7) ||
+ !strcmp(dentry->d_name, "memory")) {
strcat(fname, "/reg");
if ((file = fopen(fname, "r")) == NULL) {
perror(fname);

View File

@ -1,29 +0,0 @@
diff -up kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c.orig kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c
--- kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c.orig 2008-05-19 15:25:25.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/ppc64/crashdump-ppc64.c 2008-05-19 15:33:22.000000000 -0400
@@ -107,6 +107,7 @@ static int get_crash_memory_ranges(struc
struct dirent *dentry, *mentry;
int i, n, crash_rng_len = 0;
unsigned long long start, end, cstart, cend;
+ int page_size = getpagesize();
crash_max_memory_ranges = max_memory_ranges + 6;
crash_rng_len = sizeof(struct memory_range) * crash_max_memory_ranges;
@@ -219,6 +220,17 @@ static int get_crash_memory_ranges(struc
if (cend > crash_base + crash_size)
cend = crash_base + crash_size;
crash_memory_range[memory_ranges].start = cstart;
+ /*
+ * The rtas section created here is formed by reading rtas-base
+ * and rtas-size from /proc/device-tree/rtas. Unfortunately
+ * rtas-size is not required to be a multiple of PAGE_SIZE
+ * The remainder of the page it ends on is just garbage, and is
+ * safe to read, its just not accounted in rtas-size. Since
+ * we're creating an elf section here though, lets round it up
+ * to the next page size boundary though, so makedumpfile can
+ * read it safely without going south on us.
+ */
+ cend = (cend + page_size - 1) & (~(page_size - 1));
crash_memory_range[memory_ranges++].end = cend;
}
/*

View File

@ -1,13 +0,0 @@
--- kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/ppc64/kexec-ppc64.c 2007-08-27 15:35:47.000000000 -0400
@@ -454,8 +454,8 @@
}
rmo_base = ((unsigned long long *)buf)[0];
rmo_top = rmo_base + ((unsigned long long *)buf)[1];
- if (rmo_top > 0x30000000UL)
- rmo_top = 0x30000000UL;
+ if (rmo_top > 0x07C00000UL)
+ rmo_top = 0x07C00000UL;
fclose(file);
closedir(cdir);

View File

@ -1,94 +0,0 @@
diff -rpuN backup/kexec-tools-testing-20070330/kexec/crashdump-elf.c kexec-tools/kexec/crashdump-elf.c
--- backup/kexec-tools-testing-20070330/kexec/crashdump-elf.c 2007-03-30 13:34:36.000000000 +0900
+++ kexec-tools/kexec/crashdump-elf.c 2007-08-03 14:45:47.000000000 +0900
@@ -36,6 +36,8 @@
char *bufp;
long int nr_cpus = 0;
uint64_t notes_addr, notes_len;
+ uint64_t vmcoreinfo_addr, vmcoreinfo_len;
+ int has_vmcoreinfo = 0;
int (*get_note_info)(int cpu, uint64_t *addr, uint64_t *len);
if (xen_present())
@@ -47,7 +49,11 @@
return -1;
}
- sz = sizeof(EHDR) + nr_cpus * sizeof(PHDR) + ranges * sizeof(PHDR);
+ if (get_kernel_vmcoreinfo(&vmcoreinfo_addr, &vmcoreinfo_len) == 0) {
+ has_vmcoreinfo = 1;
+ }
+
+ sz = sizeof(EHDR) + (nr_cpus + has_vmcoreinfo) * sizeof(PHDR) + ranges * sizeof(PHDR);
/*
* Certain architectures such as x86_64 and ia64 require a separate
@@ -148,6 +154,21 @@
dfprintf_phdr(stdout, "Elf header", phdr);
}
+ if (has_vmcoreinfo) {
+ phdr = (PHDR *) bufp;
+ bufp += sizeof(PHDR);
+ phdr->p_type = PT_NOTE;
+ phdr->p_flags = 0;
+ phdr->p_offset = phdr->p_paddr = vmcoreinfo_addr;
+ phdr->p_vaddr = 0;
+ phdr->p_filesz = phdr->p_memsz = vmcoreinfo_len;
+ /* Do we need any alignment of segments? */
+ phdr->p_align = 0;
+
+ (elf->e_phnum)++;
+ dfprintf_phdr(stdout, "vmcoreinfo header", phdr);
+ }
+
/* Setup an PT_LOAD type program header for the region where
* Kernel is mapped if info->kern_size is non-zero.
*/
--- backup/kexec-tools-testing-20070330/kexec/crashdump.c 2007-03-30 13:34:36.000000000 +0900
+++ kexec-tools/kexec/crashdump.c 2007-08-03 14:45:05.000000000 +0900
@@ -108,3 +108,32 @@
return 0;
}
+
+/* Returns the physical address of start of crash notes buffer for a kernel. */
+int get_kernel_vmcoreinfo(uint64_t *addr, uint64_t *len)
+{
+ char kdump_info[PATH_MAX];
+ char line[MAX_LINE];
+ int count;
+ FILE *fp;
+ unsigned long long temp, temp2;
+
+ *addr = 0;
+ *len = 0;
+
+ sprintf(kdump_info, "/sys/kernel/vmcoreinfo");
+ fp = fopen(kdump_info, "r");
+ if (!fp)
+ return -1;
+
+ if (!fgets(line, sizeof(line), fp))
+ die("Cannot parse %s: %s\n", kdump_info, strerror(errno));
+ count = sscanf(line, "%Lx %Lx", &temp, &temp2);
+ if (count != 2)
+ die("Cannot parse %s: %s\n", kdump_info, strerror(errno));
+
+ *addr = (uint64_t) temp;
+ *len = (uint64_t) temp2;
+
+ return 0;
+}
diff -rpuN backup/kexec-tools-testing-20070330/kexec/crashdump.h kexec-tools/kexec/crashdump.h
--- backup/kexec-tools-testing-20070330/kexec/crashdump.h 2007-03-30 13:34:36.000000000 +0900
+++ kexec-tools/kexec/crashdump.h 2007-08-03 14:45:05.000000000 +0900
@@ -2,6 +2,7 @@
#define CRASHDUMP_H
extern int get_crash_notes_per_cpu(int cpu, uint64_t *addr, uint64_t *len);
+extern int get_kernel_vmcoreinfo(uint64_t *addr, uint64_t *len);
/* Need to find a better way to determine per cpu notes section size. */
#define MAX_NOTE_BYTES 1024
_

View File

@ -1,60 +0,0 @@
--- kexec-tools-testing-20070330/kexec/arch/i386/crashdump-x86.c.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/arch/i386/crashdump-x86.c 2007-08-27 15:40:22.000000000 -0400
@@ -497,6 +497,7 @@
unsigned long sz, elfcorehdr;
int nr_ranges, align = 1024;
struct memory_range *mem_range, *memmap_p;
+ int i;
if (get_crash_memory_ranges(&mem_range, &nr_ranges) < 0)
return -1;
@@ -543,8 +544,13 @@
* elf core header segment to 16K to avoid being placed in such gaps.
* This is a makeshift solution until it is fixed in kernel.
*/
- elfcorehdr = add_buffer(info, tmp, sz, 16*1024, align, min_base,
- max_addr, -1);
+ for (i=0;i<KEXEC_MAX_SEGMENTS;i++) {
+ if ((memmap_p[i].start == 0) &&
+ (memmap_p[i].end == 0))
+ break;
+ }
+ elfcorehdr = add_buffer(info, tmp, sz, 16*1024, align, min_base,
+ memmap_p[i-1].end, -1);
dfprintf(stdout, "Created elf header segment at 0x%lx\n", elfcorehdr);
if (delete_memmap(memmap_p, elfcorehdr, sz) < 0)
return -1;
--- kexec-tools-testing-20070330/kexec/kexec.c.orig 2007-03-30 00:34:36.000000000 -0400
+++ kexec-tools-testing-20070330/kexec/kexec.c 2007-08-27 15:40:22.000000000 -0400
@@ -336,6 +336,7 @@
unsigned long base;
int result;
int pagesize;
+ int i;
result = sort_segments(info);
if (result < 0) {
@@ -345,11 +346,22 @@
/* Round memsz up to a multiple of pagesize */
pagesize = getpagesize();
memsz = (memsz + (pagesize - 1)) & ~(pagesize - 1);
-
+retry:
base = locate_hole(info, memsz, buf_align, buf_min, buf_max, buf_end);
if (base == ULONG_MAX) {
die("locate_hole failed\n");
}
+
+ for (i = 0; i < info->nr_segments; i++) {
+ if ((base < (info->segment[i].mem + info->segment[i].memsz)) &&
+ ((base+memsz) > info->segment[i].mem)) {
+ /*
+ *we have an overlap, bump down buf_max
+ */
+ buf_max = (unsigned long)info->segment[i].mem;
+ goto retry;
+ }
+ }
add_segment(info, buf, bufsz, base, memsz);
return base;

View File

@ -1,20 +0,0 @@
diff -up kexec-tools-testing-20070330/makedumpfile/x86_64.c.orig kexec-tools-testing-20070330/makedumpfile/x86_64.c
--- kexec-tools-testing-20070330/makedumpfile/x86_64.c.orig 2008-06-05 01:30:57.000000000 -0400
+++ kexec-tools-testing-20070330/makedumpfile/x86_64.c 2008-07-14 11:30:05.000000000 -0400
@@ -148,12 +148,11 @@ vaddr_to_offset_x86_64(unsigned long vad
struct pt_load_segment *pls;
/*
- * Check the relocatable kernel.
+ * Note this computation of phys_base works for RHEL5
+ * because we always keep phys_base at 0x200000. This
+ * doesn't work in general
*/
- if (SYMBOL(phys_base) != NOT_FOUND_SYMBOL)
- phys_base = info->phys_base;
- else
- phys_base = 0;
+ phys_base = info->phys_base;
if (is_vmalloc_addr(vaddr)) {
if ((paddr = vtop4_x86_64(vaddr)) == NOT_PADDR) {

View File

@ -1,21 +0,0 @@
--- kexec-tools-1.101/kexec/arch/x86_64/crashdump-x86_64.c.orig 2006-11-14 12:15:45.000000000 -0500
+++ kexec-tools-1.101/kexec/arch/x86_64/crashdump-x86_64.c 2006-11-14 12:16:04.000000000 -0500
@@ -113,6 +113,8 @@
* initializing acpi tables in second kernel.
*/
type = RANGE_ACPI;
+ } else if(memcmp(str,"ACPI Non-volatile Storage\n",26) == 0 ) {
+ type = RANGE_ACPI_NVS;
} else {
continue;
}
@@ -645,7 +647,8 @@
/* Inform second kernel about the presence of ACPI tables. */
for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) {
unsigned long start, end;
- if (mem_range[i].type != RANGE_ACPI)
+ if ( !( mem_range[i].type == RANGE_ACPI
+ || mem_range[i].type == RANGE_ACPI_NVS) )
continue;
start = mem_range[i].start;
end = mem_range[i].end;

View File

@ -1,19 +0,0 @@
diff -up kexec-tools-2.0.0/makedumpfile/makedumpfile.8.orig kexec-tools-2.0.0/makedumpfile/makedumpfile.8
--- kexec-tools-2.0.0/makedumpfile/makedumpfile.8.orig 2008-06-05 01:31:22.000000000 -0400
+++ kexec-tools-2.0.0/makedumpfile/makedumpfile.8 2008-12-01 11:06:41.000000000 -0500
@@ -73,6 +73,15 @@ data in the flattened format needs to be
.SH OPTIONS
.TP
+\fB\-b\fR
+Specify cache block order.
+.br
+makedumpfile attempts to accelerate dumping by caching disk access to ram, in an
+effort to consolidate writes. The size of the application cached used for this
+purpose is controlled by this option. It specifys that 2^b pages should be used
+for the cache.
+
+.TP
\fB\-c\fR
Compress dump data by each page.
.br

View File

@ -1,6 +1,6 @@
Name: kexec-tools
Version: 2.0.0
Release: 12%{?dist}
Release: 13%{?dist}
License: GPLv2
Group: Applications/System
Summary: The kexec/kdump userspace component.
@ -13,7 +13,7 @@ Source5: kdump.sysconfig.ppc64
Source6: kdump.sysconfig.ia64
Source7: mkdumprd
Source8: kdump.conf
Source9: makedumpfile-1.2.6.tar.gz
Source9: makedumpfile-1.3.3.tar.gz
Source10: kexec-kdump-howto.txt
Source11: firstboot_kdump.py
Source12: mkdumprd.8
@ -59,9 +59,7 @@ Obsoletes: diskdumputils netdump
#
# Patches 601 onward are generic patches
#
Patch603: kexec-tools-2.0.0-disable-kexec-test.patch
Patch605: kexec-tools-1.102pre-x86-phys_base.patch
Patch606: kexec-tools-2.0.0-makedumpfile-manpage.patch
Patch601: kexec-tools-2.0.0-disable-kexec-test.patch
%description
kexec-tools provides /sbin/kexec binary that facilitates a new
@ -76,9 +74,7 @@ component of the kernel's kexec feature.
mkdir -p -m755 kcp
tar -z -x -v -f %{SOURCE9}
%patch603 -p1
%patch605 -p1
%patch606 -p1
%patch601 -p1
tar -z -x -v -f %{SOURCE13}
@ -106,7 +102,7 @@ rm -f kexec-tools.spec.in
cp %{SOURCE10} .
make
%ifarch %{ix86} x86_64 ia64 ppc64
make -C makedumpfile
make -C makedumpfile-1.3.3
%endif
make -C kexec-tools-po
@ -135,7 +131,7 @@ install -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_mandir}/man8/mkdumprd.8
install -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/98-kexec.rules
%ifarch %{ix86} x86_64 ia64 ppc64
install -m 755 makedumpfile/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
install -m 755 makedumpfile-1.3.3/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
%endif
make -C kexec-tools-po install DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}
@ -243,6 +239,9 @@ done
%changelog
* Fri May 08 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-13
- Update makedumpfile to v 1.3.3 (bz 499849)
* Tue Apr 07 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-12
- Simplifed rootfs mounting code in mkdumprd (bz 494416)

View File

@ -1,3 +1,3 @@
9b8434ea5fdd546f24fde82bd2ce59c3 makedumpfile-1.2.6.tar.gz
d9f2ecd3c3307905f24130a25816e6cc kexec-tools-2.0.0.tar.bz2
3e802d638dce0080b910f15908c04a24 kexec-tools-po.tar.gz
190f8878aa7e7b63a96fde5d59538eec makedumpfile-1.3.3.tar.gz