Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly improve parsing OSRELEASE, etc #34

Open
lathiat opened this issue Feb 9, 2024 · 2 comments
Open

Possibly improve parsing OSRELEASE, etc #34

lathiat opened this issue Feb 9, 2024 · 2 comments

Comments

@lathiat
Copy link

lathiat commented Feb 9, 2024

I noticed today that you can use eu-readelf to parse the vmcoreinfo (OSRELEASE, BUILD-ID, PAGESIZE, etc) from this article:
https://blogs.oracle.com/linux/post/whats-inside-a-linux-kernel-core-dump

So we may be able to use either that or a python wrapper for elfutils etc to parse this data better than we currently do

@xmkg
Copy link
Contributor

xmkg commented May 7, 2024

So I tried this eu-readelf thing, and it looks like it works on pure core files instead of kdump/compressed kdump core files, which means we'll need to locate the offset before calling the tool. I might be missing something, so please feel free to fill me in on how we can utilize this command on a raw kdump dump file.

The current implementation works exactly like the file command so I think it's reliable and fast enough for our purposes, but I would be eager to consider an alternative if it's more straightforward than what we currently have.

@xmkg
Copy link
Contributor

xmkg commented Aug 20, 2024

Now, with #68 and #72 in place, the parser no longer relies on guesswork, and it properly parses the header, and the VMCOREINFO when it is present.

@lathiat do these two address the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants