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

VM core dump support #3213

Closed
liuw opened this issue Oct 6, 2021 · 7 comments
Closed

VM core dump support #3213

liuw opened this issue Oct 6, 2021 · 7 comments

Comments

@liuw
Copy link
Member

liuw commented Oct 6, 2021

Implement VM core dump support to so that guest crashes can be analysed with crash.

Split out from #3002.

See also https://wiki.ubuntu.com/DebuggingKernelWithQEMU

@rbradford
Copy link
Member

You can use the existing snaphot code to dump the guest memory. Is there anything more than that needed?

@liuw
Copy link
Member Author

liuw commented Nov 2, 2021

The image needs to be analysed by tools like crash. I have not checked if the snapshot can be analysed by it.

If the snapshot's format is not what those tools expect, development work is needed.

@mkbhanda
Copy link

How would this feature work in the context of TD, where all memory and CPU state is encrypted. An encrypted dump? To make any sense of it need the encryption key. An attack would be to request/cause a core dump ....

@liuw
Copy link
Member Author

liuw commented Dec 15, 2021

How would this feature work in the context of TD, where all memory and CPU state is encrypted. An encrypted dump? To make any sense of it need the encryption key. An attack would be to request/cause a core dump ....

It won't work with encrypted memory and states.

@leahneukirchen
Copy link

For the record, a raw memory dump seems to work with crash, using crash $vmlinux $snap/memory-ranges@0. But many tools expect a ELF-style vmcore file, so that could be a reasonable addition. This does not seem incredibly hard to add: https://github.com/qemu/qemu/blob/master/dump/dump.c#L515

@rbradford
Copy link
Member

@leahneukirchen Thank you for sharing that. We also now have gdb support which might already usable for dumping an ELF style coredump already.

@liuw Perhaps you could decide if the gdb core dump and the syntax @leahneukirchen has suggested are sufficient for your request?

@rbradford
Copy link
Member

Fixed by #4012

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

4 participants