Skip to content

Qemu tmin #3118

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Qemu tmin #3118

wants to merge 16 commits into from

Conversation

forky2
Copy link
Contributor

@forky2 forky2 commented Apr 2, 2025

Description

Single-threaded version of a QEMU testcase minizer. Submitting for interested parties.

Possibly working on a multi-threaded modification, but I would like to propose that both single-threaded and multi-threaded version could be kept in the codebase as a tutorial to others. I've tried to be quite detailed in my comments.

Checklist

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

@tokatoka
Copy link
Member

tokatoka commented Apr 2, 2025

@tokatoka
Copy link
Member

tokatoka commented Apr 2, 2025

Should this supercede your pending PR? @WorksButNotTested

});

// The executor. Nothing exciting here.
#[cfg(feature = "fork")]
Copy link
Member

Choose a reason for hiding this comment

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

As I said this should not be run with a normal executor
Romain will replace forkexecutor with forkserver in #3114
I think we should wait it to be merged

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, happy to wait for that to be merged. I'll keep going with this as best I can until that PR is merged and then deal with replacing it. Presumably the same will need to be done for other fuzzers I'm not touching, like qemu_cmin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The fork version of my code doesn't work anyway, so rather than fix it, I'll wait for this new ForkServer to drop and refactor against that.

@WorksButNotTested
Copy link
Collaborator

Check out this for an example of how you can have a single crate create multiple binaries. Then you can put any common code in a single file and reference it from either fuzzer. Alternatively, you can just add a command line argument for '--cores' like the other qemu fuzzers.

@WorksButNotTested
Copy link
Collaborator

Should this supercede your pending PR? @WorksButNotTested

Absolutely. I didn't get time to finish it. I hope it was a useful starting point though.

@WorksButNotTested
Copy link
Collaborator

@forky2
Copy link
Contributor Author

forky2 commented Apr 4, 2025

Thanks all; I've got more pressing things to do today but I'll take all comments on board on Monday. Yes @WorksButNotTested it was useful thanks!

@forky2
Copy link
Contributor Author

forky2 commented Apr 7, 2025

Looks like a little format error here... https://github.com/AFLplusplus/LibAFL/actions/runs/14216906751/job/39835637242?pr=3118 Running this guy should fix it... https://github.com/AFLplusplus/LibAFL/blob/main/scripts/fmt_all.sh

Whatever that thing toplo is whinging about, neither ./scripts/precommit.sh nor ./scripts/fmt_all.sh report. I did a costly container rebuild to see if it was a new nightly feature but no change.

@domenukk
Copy link
Member

domenukk commented Apr 7, 2025

Looks like a little format error here... https://github.com/AFLplusplus/LibAFL/actions/runs/14216906751/job/39835637242?pr=3118 Running this guy should fix it... https://github.com/AFLplusplus/LibAFL/blob/main/scripts/fmt_all.sh

Whatever that thing toplo is whinging about, neither ./scripts/precommit.sh nor ./scripts/fmt_all.sh report. I did a costly container rebuild to see if it was a new nightly feature but no change.

install taplo, then run taplo format.
This is added to fmt_all in #3099 but it hasn't landed yet

@forky2
Copy link
Contributor Author

forky2 commented Apr 7, 2025

install taplo, then run taplo format.

How does one install taplo? I've tried:

  • cargo install taplo ("there is nothing to install in taplo v0.13.2, because it has no binaries")
  • cargo add taplo (no error, but still no taplo binary in path), apt install taplo (doesn't exist)
  • rustup component add taplo ("toolchain 'nightly-x86_64-unknown-linux-gnu' does not contain component 'taplo' for target 'x86_64-unknown-linux-gnu'; did you mean 'cargo'?")

Never mind; I found the crate: taplo-cli

@forky2
Copy link
Contributor Author

forky2 commented Apr 8, 2025

I've done the parallel version as best I can. Waiting on ForkServer completion before finishing the "fork" version. Then I'll look at merging the single and multiple core versions as @WorksButNotTested suggested.

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.

4 participants