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

Adding support for "Live Kernel Memory" dump type (0x6) #30

Merged
merged 18 commits into from
Jun 24, 2024

Conversation

hugsy
Copy link
Contributor

@hugsy hugsy commented Jun 21, 2024

Description

This PR adds support for "Live Kernel Memory" dump type (0x6), including Python API, and tests.

As indicated here such dump can be generated as such:
image

But is actually processed the same way as regular bmp dump:
image

As a result, this PR only implements the type itself, and binds it to the "normal" BMP routine (i.e. BuildPhysmemBMPDump).

Fixes #26

@0vercl0k
Copy link
Owner

Hell yeah! I am guessing at least some of the tests are failing because the new dump isn't part of the testdatas? Send it my way and I'll add it up 🙏🏽

Thanks again man!

@0vercl0k
Copy link
Owner

All right, I added the file to the testdatas, re-running the tests to see what is left to address..

@0vercl0k
Copy link
Owner

Okay, most parsers get built properly now - just OSX to figure out. Not sure what's going on with the binding targets yet though 🤔

@0vercl0k
Copy link
Owner

Lol, while compiling with latest compiler 😅

(249c.599c): Access violation - code c0000005 (!!! second chance !!!)
c1xx!GetQualifiedIdForMember+0x1e:
00007fff`7623d4de f7421000000400  test    dword ptr [rdx+10h],40000h ds:00000000`00000010=????????

@0vercl0k
Copy link
Owner

All right, making progress - we just need to figure out what's the deal with OSX and how do we work around the MSVC bug on Windows 😅

@0vercl0k
Copy link
Owner

Okay so the osx-large is actually only usable for paying customers 🤦🏽‍♂️

@0vercl0k
Copy link
Owner

Okay - have a look whenever you have some time @hugsy and let me know what you think.

The OSX part is annoying as I don't know how easy it'd be to port / have all the bindings etc work properly on ARM64 🤷🏽‍♂️

For Windows, maybe you have a better idea; I can also file a bug to make sure to update the CI back to windows-latest when the frontend doesn't crash anymore 😔

Cheers

@hugsy
Copy link
Contributor Author

hugsy commented Jun 23, 2024

Regarding windows-2022, the bug is reported on both sides (vs & nb) and known:

I've also pinned the rest of runner images so that everything should keep working for future updates and we can introduce newer runner as they become more stable.

@0vercl0k
Copy link
Owner

Okay I think we're good to go, merging - thank you again @hugsy!

@0vercl0k 0vercl0k merged commit 1cc83d3 into 0vercl0k:master Jun 24, 2024
33 checks passed
@0vercl0k
Copy link
Owner

0vercl0k commented Jul 4, 2024

All right - this took a while but I finally fixed the way I was generating wheels for Linux so that it doesn't break anymore.

What happens for the 0.7.3 release is that we were generating them 'manually' and it turns out their names has meaning to pypi. I tried to upload them and the Linux ones were rejected. I decided to rename the package to make it happy and they did get uploaded, but the package were actually broken. Once downloaded a checksum wouldn't match and installation would fail. Note that this whole thing only affected Linux packages (as far as I know; at least Windows ones were fine).

To fix this, you are apparently to build wheels using the cibuildwheels project which I now use (see #32).

v.0.7.4 should now work on both Windows & Linux:

(base) c:\Users\over\Downloads>pip install --upgrade kdmp_parser
...
Installing collected packages: kdmp_parser
  Attempting uninstall: kdmp_parser
    Found existing installation: kdmp-parser 0.7.3
    Uninstalling kdmp-parser-0.7.3:
      Successfully uninstalled kdmp-parser-0.7.3
Successfully installed kdmp_parser-0.7.4

(base) c:\Users\over\Downloads>ipython3
...
In [1]: import kdmp_parser

In [2]: kdmp_parser.KernelDumpParser("fulllivekernelmemory.dmp")
Out[2]: KernelDumpParser(fulllivekernelmemory.dmp, 6)
over@panther:/mnt/c/Users/over/Downloads$ pip install --upgrade kdmp_parser
...
Installing collected packages: kdmp_parser
Successfully installed kdmp_parser-0.7.4

over@panther:/mnt/c/Users/over/Downloads$ ipython3
...
In [1]: import kdmp_parser

In [2]: kdmp_parser.KernelDumpParser("fulllivekernelmemory.dmp")
Out[2]: KernelDumpParser(fulllivekernelmemory.dmp, 6)

Sorry for the lag on this, and thank you again!

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

Successfully merging this pull request may close these issues.

Unknown Type 0x6
2 participants