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

Add Mutator Plugins as a Strategy #286

Merged
merged 34 commits into from Mar 27, 2019

Conversation

@jonathanmetzman
Copy link
Collaborator

commented Mar 20, 2019

No description provided.

jonathanmetzman added some commits Mar 19, 2019

fmt
lnt

@googlebot googlebot added the cla: yes label Mar 20, 2019

@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 20, 2019

/gcbrun

@mhlakhani

This comment has been minimized.

Copy link

commented Mar 20, 2019

Will we add usage documentation for this after we've verified the feature works well? Really excited to see this idea land and be usable.

@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 20, 2019

Will we add usage documentation for this after we've verified the feature works well? Really excited to see this idea land and be usable.

Sure. I plan on first seeing if this feature is useful. If it is and we decide to make the feature permanent, I'll add documentation and make it "supported" for other users.

@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 20, 2019

/gcbrun

@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 20, 2019

/gcbrun

@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 20, 2019

/gcbrun

jonathanmetzman added some commits Mar 20, 2019

@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 20, 2019

/gcbrun

configs/test/project.yaml Show resolved Hide resolved
@@ -61,6 +61,11 @@ class FuzzerTest(builtin_test.BaseEngineFuzzerTest):
def test_run(self):
"""Test running libFuzzer fuzzer."""
libfuzzer = fuzzer.LibFuzzer()

# Don't test mutator_plugins here.

This comment has been minimized.

Copy link
@jonathanmetzman

jonathanmetzman Mar 20, 2019

Author Collaborator

I test it elsewhere so it isn't needed here. But when the test ran before it would spend a really long time and then error out when talking to GCS. Maybe we should get this working?

fmt
@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 20, 2019

/gcbrun

@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 20, 2019

Sorry for the spam folks, my local tests weren't quite working so I was using the upload/gcbrun workflow a bit too aggressively.

@oliverchang

This comment has been minimized.

Copy link
Collaborator

commented Mar 20, 2019

for OSS-Fuzz, you'll need to add a line here: https://github.com/google/clusterfuzz/blob/master/src/appengine/handlers/cron/oss_fuzz_setup.py#L745

to give workers permissions to access the relevant buckets.

@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 20, 2019

@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 20, 2019

jonathanmetzman added some commits Mar 21, 2019

fmt
fmt
lnt
configs/test/project.yaml Show resolved Hide resolved
src/python/bot/fuzzers/libFuzzer/launcher.py Outdated Show resolved Hide resolved
src/python/bot/fuzzers/libFuzzer/launcher.py Outdated Show resolved Hide resolved
src/python/bot/fuzzers/libFuzzer/launcher.py Outdated Show resolved Hide resolved
src/python/bot/fuzzers/mutator_plugin.py Show resolved Hide resolved
src/python/bot/fuzzers/mutator_plugin.py Outdated Show resolved Hide resolved
src/python/bot/fuzzers/mutator_plugin.py Show resolved Hide resolved
src/python/bot/fuzzers/mutator_plugin.py Outdated Show resolved Hide resolved

jonathanmetzman added some commits Mar 22, 2019

fmt
@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 22, 2019

/gcbrun

jonathanmetzman added some commits Mar 22, 2019

@inferno-chromium

This comment has been minimized.

Copy link
Collaborator

commented Mar 22, 2019

This CL is getting huge, best to split into 2-3 parts for faster review and easier understanding.

  1. just plugin mutator strategy, buckets
  2. mutator strategy
  3. minijail support
  4. whatver, bug fixes, etc.

jonathanmetzman added some commits Mar 27, 2019

fmt
fix
@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 27, 2019

/gcbrun

@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 27, 2019

/gcbrun

@inferno-chromium
Copy link
Collaborator

left a comment

Looks great. Some questions and minor nits.

src/python/bot/fuzzers/libFuzzer/launcher.py Outdated Show resolved Hide resolved
src/python/bot/fuzzers/libfuzzer.py Outdated Show resolved Hide resolved
"""Creates directories needed to use mutator plugins."""

def recreate_directory(directory_path):
shell.create_directory_if_needed(

This comment has been minimized.

Copy link
@inferno-chromium

inferno-chromium Mar 27, 2019

Collaborator

This looks very hacky, to do create_directory_if_needed first and then remove_directory. Why do we need to remove and re-download plugin everytime ? Is this for every launcher instance ? We need to make sure we dont even unpack if it was unpacked once.

This comment has been minimized.

Copy link
@jonathanmetzman

jonathanmetzman Mar 27, 2019

Author Collaborator

This looks very hacky, to do create_directory_if_needed first and then remove_directory. Why do we need to remove and re-download plugin everytime ?

What if the plugin gets updated?

Is this for every launcher instance ?

Yes.

We need to make sure we dont even unpack if it was unpacked once.

I intentionally do this. I agree it would be less wasteful to unpack once for every 5 runs of launcher.py. I believe the code did this initially, but it was suggested that I change this so that mutator plugins would more easily work on OSS-Fuzz.

src/python/bot/fuzzers/mutator_plugin.py Show resolved Hide resolved

jonathanmetzman added some commits Mar 27, 2019

fmt
@jonathanmetzman

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 27, 2019

/gcbrun

@jonathanmetzman jonathanmetzman merged commit 27d0dcb into master Mar 27, 2019

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
cla/google All necessary CLAs are signed

@jonathanmetzman jonathanmetzman deleted the plugin3 branch Mar 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.