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

[sw/silicon_creator] Add fuzzers for ROM bootstrap and ROM_EXT bootstrap #19194

Merged
merged 2 commits into from Aug 11, 2023

Conversation

dmcardle
Copy link
Contributor

@dmcardle dmcardle commented Jul 13, 2023

This PR depends on #18929. Ignore all but the last commit.

This commit adds fuzzers for ROM bootstrap and ROM_EXT bootstrap.

To run the fuzzers:

./bazelisk.sh run --config=asan-libfuzzer //sw/device/silicon_creator/rom_ext:bootstrap_fuzz_test_run
./bazelisk.sh run --config=asan-libfuzzer //sw/device/silicon_creator/rom:bootstrap_fuzz_test_run

@dmcardle dmcardle requested a review from alphan July 13, 2023 20:27
@dmcardle dmcardle marked this pull request as ready for review July 13, 2023 20:27
@dmcardle dmcardle requested review from cfrantz and a team as code owners July 13, 2023 20:27
@moidx moidx removed the request for review from a team July 18, 2023 14:05
Copy link
Contributor

@alphan alphan left a comment

Choose a reason for hiding this comment

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

This is pretty cool! Thanks @dmcardle !

sw/device/silicon_creator/lib/bootstrap_fuzz_test.cc Outdated Show resolved Hide resolved
@dmcardle dmcardle force-pushed the dmcardle/recovery-fuzzer branch 2 times, most recently from a680349 to 6e168d9 Compare August 1, 2023 19:21
@dmcardle
Copy link
Contributor Author

dmcardle commented Aug 1, 2023

I'm working on splitting this into two fuzzers: one for ROM bootstrap and one for ROM_EXT bootstrap.

I have a working proof of concept uploaded, but I want to clean it up a bit tomorrow.

@dmcardle dmcardle force-pushed the dmcardle/recovery-fuzzer branch 3 times, most recently from 006fc28 to 1647fb8 Compare August 2, 2023 15:28
@dmcardle
Copy link
Contributor Author

dmcardle commented Aug 2, 2023

@alphan This has changed enough that it probably needs another look :)

@dmcardle dmcardle changed the title [sw/silicon_creator] Add fuzzer for ROM_EXT bootstrap [sw/silicon_creator] Add fuzzers for ROM bootstrap and ROM_EXT bootstrap Aug 2, 2023
+ Adds @rules_fuzzing dependency to Bazel
+ Adds command-line flag --config=asan-libfuzzer to .bazelrc
+ Adds a fuzzer for ROM_EXT bootstrap that throws SPI commands at the
  event loop.

To run the fuzzer:

    ./bazelisk.sh run --config=asan-libfuzzer \
      //sw/device/silicon_creator/rom_ext:bootstrap_fuzz_test_run

Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
To run the fuzzer:

    ./bazelisk.sh run --config=asan-libfuzzer \
        //sw/device/silicon_creator/rom:bootstrap_fuzz_test_run

Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
Copy link
Contributor

@alphan alphan left a comment

Choose a reason for hiding this comment

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

Thanks @dmcardle !

@alphan alphan merged commit 75a49de into lowRISC:master Aug 11, 2023
25 checks passed
@dmcardle dmcardle deleted the dmcardle/recovery-fuzzer branch August 11, 2023 17:04
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.

None yet

2 participants