summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@in.ibm.com>2006-01-25 17:47:13 -0500
committerEric W. Biederman <ebiederm@xmission.com>2006-07-27 10:57:39 -0600
commitbce59244e37901a9d1434c75d2eff2fd72884652 (patch)
tree13ed37e233096abed0c808141058e5ca27d0eadb
parent3d14d4d0ac791d1d180763806f610cdd06a95a94 (diff)
kexec-tools: x86_64 vmcore copy operation failure fix
o An additional PT_LOAD type ELF header was being generated for ACPI tables region. ELF headers should be generated only for memory type RAM_RANGE. This was leading to bloated /proc/vmcore file size. Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-rw-r--r--kexec/arch/x86_64/crashdump-x86_64.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kexec/arch/x86_64/crashdump-x86_64.c b/kexec/arch/x86_64/crashdump-x86_64.c
index 3d0f3a5..7831cf2 100644
--- a/kexec/arch/x86_64/crashdump-x86_64.c
+++ b/kexec/arch/x86_64/crashdump-x86_64.c
@@ -542,6 +542,8 @@ static int prepare_crash_memory_elf64_headers(struct kexec_info *info,
mend = crash_memory_range[i].end;
if (!mstart && !mend)
break;
+ if (crash_memory_range[i].type != RANGE_RAM)
+ break;
phdr = (Elf64_Phdr *) bufp;
bufp += sizeof(Elf64_Phdr);
phdr->p_type = PT_LOAD;
@@ -647,6 +649,8 @@ static int prepare_crash_memory_elf32_headers(struct kexec_info *info,
mend = crash_memory_range[i].end;
if (!mstart && !mend)
break;
+ if (crash_memory_range[i].type != RANGE_RAM)
+ break;
phdr = (Elf32_Phdr *) bufp;
bufp += sizeof(Elf32_Phdr);
phdr->p_type = PT_LOAD;