[Crash-utility] [PATCH] Add support for 'foreign' page sizes in kdump dumps

Dave Anderson anderson at redhat.com
Thu Jan 15 18:42:20 UTC 2009


----- "Bernhard Walle" <bwalle at suse.de> wrote:

> This affects only ppc64 and ia64 since that are the only architectures
> that have a page size that is configurable at runtime by the system (which means
> at boot by the kernel).

OK -- so then I still don't understand why it would ever be necessary
to apply this to 32-bit ELF kdump dumpfiles?  Unless ppc64 or ia64
could conceivably create a 32-bit kdump vmcore, there's no need for the 
change to dump_Elf32_Nhdr().  And unless I'm missing something,
I don't believe it's even possible because a 32-bit ELF header
cannot contain the virtual address values of 64-bit kernels.

And even if it were possible, the patch to dump_Elf32_Nhdr() references
"nd->elf64", which is only initialized when the vmcore is 64-bit:  

@@ -1418,6 +1511,19 @@
         netdump_print("                 n_type: %lx ", note->n_type);
        switch (note->n_type)
        {
+       case 0: /* unknown, used for VMCOREINFO */
+
+               if (strncmp(VMCOREINFO_NOTE_NAME, (char *)note+sizeof(Elf64_Nhdr),
+                               VMCOREINFO_NOTE_NAME_BYTES) == 0) {
+
+                       /* we have VMCOREINFO */
+                       nd->vmcoreinfo = (char *)nd->elf64 + offset +
+                               (sizeof(Elf64_Nhdr) + ((note->n_namesz + 3) & ~3));
+                       nd->size_vmcoreinfo = note->n_descsz;
+                       nd->page_size = vmcoreinfo_read_integer("PAGESIZE", 0);
+               }
+               break;
+

So unless you can convince me otherwise, I'll just drop this patch
segment.

Thanks,
  Dave




More information about the Crash-utility mailing list