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

Split win_injector.c into separate files for each injection method #936

Closed
tklengyel opened this issue Aug 9, 2020 · 1 comment · Fixed by #1370
Closed

Split win_injector.c into separate files for each injection method #936

tklengyel opened this issue Aug 9, 2020 · 1 comment · Fixed by #1370

Comments

@tklengyel
Copy link
Owner

tklengyel commented Aug 9, 2020

Currently the injector code is extremely hard to follow with multiple injection methods all being jammed into injector_int3_cb for Windows. Splitting each injection method into its own file and own callback function would make the various paths a lot easier to follow. An attempt at this has been already made in https://github.com/tklengyel/drakvuf/tree/injector but it needs to be dusted off and restarted on the latest libinjector.

@icedevml
Copy link
Contributor

icedevml commented Aug 9, 2020

Btw. we also have a lot of continations in this code. I.e. the situations where you need to return from the function and it would re-enter shortly. This is the common problem in the whole JavaScript world and they've solved it with async/await.

I think the coroutine paradigim would be super helpful in the injector and also in a few other places where continuations are used. Unfortunately this is yet to come with C++20 :(

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

Successfully merging a pull request may close this issue.

2 participants