Re: [PATCH] [kdump] Find the PAGESIZE from VMCOREINFO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dave Anderson wrote:

I'd prefer to use the pre-existing page-size-from-vmcoreinfo algorithm
by applying it to PPC and 32-bit ELF kdumps.  Can you try the attached
patch?

--- crash-6.0.2/netdump.c.orig
+++ crash-6.0.2/netdump.c
@@ -52,7 +52,7 @@ static void kdump_get_osrelease(void);
  * which can differ from the host machine's page size.
  */
 #define READ_PAGESIZE_FROM_VMCOREINFO() \
-	(machine_type("IA64") || machine_type("PPC64"))
+	(machine_type("IA64") || machine_type("PPC64") || machine_type("PPC"))

 /*
  * kdump installs NT_PRSTATUS elf notes only to the cpus
@@ -1740,6 +1740,9 @@ dump_Elf32_Nhdr(Elf32_Off offset, int st
 			netdump_print("(unused)\n");
 			nd->vmcoreinfo = (char *)(ptr + note->n_namesz + 1);
 			nd->size_vmcoreinfo = note->n_descsz;
+			if (READ_PAGESIZE_FROM_VMCOREINFO() && store)
+				nd->page_size = (uint)
+					vmcoreinfo_read_integer("PAGESIZE", 0);
 		} else if (eraseinfo) {
 			netdump_print("(unused)\n");
 			if (note->n_descsz)



I tested the above patch and it works fine. You may push this in.

Thanks
Suzuki

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility


[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux