-
-
Notifications
You must be signed in to change notification settings - Fork 434
docs(qemu):EmulatorHooks as the safe alternative for QEMUhooks #3651
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
base: main
Are you sure you want to change the base?
docs(qemu):EmulatorHooks as the safe alternative for QEMUhooks #3651
Conversation
crates/libafl_qemu/src/emu/hooks.rs
Outdated
|
|
||
| /// Hook collection, | ||
| /// | ||
| /// `EmulatorHooks` is the supported interface for registering QEMU-based |
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.
'supported' is not the right word, we support low level hooks as well.
it's more like the standard way to use hooks from a high level perspective.
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.
Good point, I’ve updated the wording to describe EmulatorHooks as the 'standard' interface to use hooks from a high level perspective.
Thanks!
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.
Are there any changes to improve ?
crates/libafl_qemu/src/qemu/hooks.rs
Outdated
| /// The thin wrapper around QEMU hooks. | ||
| /// It is considered unsafe to use it directly. | ||
| /// | ||
| /// It is recommended to use `EmulatorHooks`, which provides a safe, structured |
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.
These should be links
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.
Fixed — switched to rustdoc links ([EmulatorHooks], [QemuHooks]), visible in generated docs.
Description
This PR clarifies the supported way to register QEMU-based hooks in LibAFL.
These docs now explicitly points users from the low-level
QemuHooksto
EmulatorHooksas the recommended and safe abstraction, and clarifiesthe role of emulator modules in hook registration.
Fixes #3228
Checklist
./scripts/precommit.shand addressed all comments