summaryrefslogtreecommitdiff
path: root/kexec
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2010-10-29 09:54:25 +0200
committerSimon Horman <horms@verge.net.au>2010-10-31 10:12:11 +0900
commit841c02cfbfb54a5460b3507c497c07bc869a6fe8 (patch)
tree1394496ac89404d62ca7822dbc72afe8e70b9b47 /kexec
parent46b2d0b8a7192bb3b8f3b34629514bc7d50bf3ce (diff)
make /proc/vmcore accessible on x86_64
If the x86_64 arch returns 0 (KEXEC_ARCH_DEFAULT) then following condition in load_crashdump_segments function will fill 386 as the machine for the vmcore elf header.. ... if ((info->kexec_flags & KEXEC_ARCH_MASK) == KEXEC_ARCH_X86_64) { elf_info.machine = EM_X86_64; } else { elf_info.machine = EM_386; elf_info.lowmem_limit = X86_MAXMEM; elf_info.get_note_info = get_crash_notes; } ... ending with kexec-ed kernel failing check for the machine, and disabling vmcore interface. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec')
-rw-r--r--kexec/arch/i386/crashdump-x86.c2
-rw-r--r--kexec/arch/x86_64/kexec-x86_64.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index 06e5ae9..40f989a 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -691,6 +691,8 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
struct memory_range *mem_range, *memmap_p;
struct crash_elf_info elf_info;
+ memset(&elf_info, 0x0, sizeof(elf_info));
+
/* Constant parts of the elf_info */
elf_info.data = ELFDATA2LSB;
elf_info.backup_src_start = BACKUP_SRC_START;
diff --git a/kexec/arch/x86_64/kexec-x86_64.c b/kexec/arch/x86_64/kexec-x86_64.c
index 3092643..c34fd92 100644
--- a/kexec/arch/x86_64/kexec-x86_64.c
+++ b/kexec/arch/x86_64/kexec-x86_64.c
@@ -134,10 +134,7 @@ int arch_process_options(int argc, char **argv)
}
const struct arch_map_entry arches[] = {
- /* For compatibility with older patches
- * use KEXEC_ARCH_DEFAULT instead of KEXEC_ARCH_X86_64 here.
- */
- { "x86_64", KEXEC_ARCH_DEFAULT },
+ { "x86_64", KEXEC_ARCH_X86_64 },
{ NULL, 0 },
};