-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
WIP Add Intel PT tracing support #2471
base: main
Are you sure you want to change the base?
Conversation
615b87b
to
b4ae309
Compare
I'll rebase on this before making libafl_qemu changes in #2438. |
138002d
to
121d6ca
Compare
What's the benefit of the perf-event-open-sys crate thingy over bindgen? Just double checking / asking stupid questions :) |
No worries :)
It has a couple of syscall/ioctl wrappers already available and it
addresses an issue I had with Bindgen and `#define`s. They solved it
already in their `wrapper.h` adding an enum.
Let me know if you want me to go deeper than this answer :D
|
Nah sounds good, it's just always good to double-check if new crates are necessary. If it solves issues let's gooo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i propose to start building the Module that would go on top of it once the inte_pt low-level functions look good enough to you.
even if some hooks are missing atm, it may be useful to start building the skeleton to help familiarize with the module system.
} | ||
|
||
#[inline] | ||
const fn next_page_aligned_addr(address: usize) -> usize { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should avoid writing this kind of function here i think, we already have libafl_page_from_addr
in the qemu repo in C. we should maybe start gathering these utils functions at the same place either in a c (so that it's usable in QEMU as well) or a rs file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're linking them together, anyway, right? So you can write it in rust and still use them from C
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you guys know if we lose inlining this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from rust to rust? No. From C to rust, probably not? maybe?
e65ba68
to
0a8d8ba
Compare
30489e9
to
354ad86
Compare
a2990ad
to
8d72014
Compare
d26447d
to
736ac50
Compare
1d1104f
to
40d434d
Compare
Hello @rmalmain @domenukk, if you wish you could start to have a look at the new code in libafl_bolts (interface to intelPT usable in both libafl and libafl_qemu) and at the IntelPT executor hook. I'm still working on cleaning the commandExecutor (and the fuzzer built on top of it), it might be removed from this PR depending on the 0.14 cutoff date |
WIP, any feedback is welcome