Skip to content

Conversation

@Tanmay140906
Copy link
Contributor

Description

This PR clarifies the supported way to register QEMU-based hooks in LibAFL.

These docs now explicitly points users from the low-level QemuHooks
to EmulatorHooks as the recommended and safe abstraction, and clarifies
the role of emulator modules in hook registration.

Fixes #3228

Checklist

  • I have run ./scripts/precommit.sh and addressed all comments

@domenukk domenukk requested a review from rmalmain January 6, 2026 10:28

/// Hook collection,
///
/// `EmulatorHooks` is the supported interface for registering QEMU-based
Copy link
Member

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.

Copy link
Contributor Author

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!

Copy link
Contributor Author

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 ?

/// 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be links

Copy link
Contributor Author

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.

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.

qemu: Document how to use EmulatorHooks

3 participants