Re: [PATCH kdumpid 0/3] Prevent segfault on missing disassembler
Stephen Brennan <[email protected]>
| Newsgroups | org.kernel.vger.linux-debuggers |
|---|---|
| Message-ID | <[email protected]> |
Sorry, I forgot to add one thing! Stephen Brennan <[email protected]> writes: > Hi Petr, > > I didn't know quite where to send patches for kdumpid, so I elected to > send direct to you, and CC the linux-debuggers list. Hope that's ok! > > I encountered a segmentation fault of kdumpid (master branch): > > #0 0x0000000000000000 in ?? () > #1 0x0000000000406aa9 in disas_at (dd=0x7fffffffde70, info=0x7fffffffdc80, pc=0) at ppc64.c:112 > #2 0x0000000000406d42 in looks_like_kcode_ppc64 (dd=0x7fffffffde70, addr=0) at ppc64.c:174 > #3 0x0000000000405616 in explore_kernel (dd=0x7fffffffde70, fn=0x405880 <explore_utsname>) at util.c:269 > #4 0x0000000000405d3f in explore_raw_data (dd=0x7fffffffde70) at util.c:465 As you can see by the fact that the code fell into the need_explore() / explore_kernel() path... this vmcore was missing much of the important metadata, since it was generated by qemu without a vmcoreinfo device. I think I shared before, but I have a small piece of code [1] which can locate the vmcoreinfo note reasonably quickly by iterating over pages and simply testing the first bytes against "OSRELEASE=", since the vmcoreinfo can only occur on a page boundary. If you'd like, I could send a patch with some sort of "explore_vmcoreinfo()" function to do this? I know it's not necessarily the most efficient, but I believe that it would be valuable when all other heuristics fail. Thanks, Stephen [1] https://github.com/brenns10/kernel_stuff/blob/master/vmcoreinfo/dumpphys.c