Skip to content

Conversation

@kzys
Copy link
Member

@kzys kzys commented Jun 21, 2022

This PR is removing some hacks from contrib/fuzz/oss_fuzz_build.sh. Rewriting Go source code with regex is too error-prone.

@k8s-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kzys kzys force-pushed the fuzz-less-hacks branch 7 times, most recently from dcdd645 to 5f7f75e Compare June 21, 2022 18:01
@kzys kzys marked this pull request as ready for review June 21, 2022 19:29
@kzys kzys force-pushed the fuzz-less-hacks branch from bb666b4 to d18b3ad Compare June 21, 2022 20:58
@kzys kzys marked this pull request as draft June 21, 2022 21:53
@kzys kzys force-pushed the fuzz-less-hacks branch 3 times, most recently from 33a97ca to f11d284 Compare June 21, 2022 22:29
kzys pushed a commit to kzys/cncf-fuzzing that referenced this pull request Jun 21, 2022
containerd/containerd#7087 will move the fuzzer
to the upstream.

Signed-off-by: Kazuyoshi Kato <[email protected]>
@AdamKorcz
Copy link
Contributor

Really nice work @kzys! Let me know if I should review anything.

@kzys kzys marked this pull request as ready for review June 23, 2022 00:38
)

func startDaemonForFuzzing(arguments []string) {
app := command.App()
Copy link
Member Author

Choose a reason for hiding this comment

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

Note to reviewers: This fuzzer is starting containerd by instantiating command.App directly. To have all containerd's plugins, it has to have all of _ "github.com/containerd/containerd/.../plugin" import and that's why we need builtins package.

Copy link
Member Author

Choose a reason for hiding this comment

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

@AdamKorcz Regarding directly instantiating fuzzers, does it help coverage-guided fuzzers to know more about containerd, compared to launching containerd as an external process?

Copy link
Contributor

@AdamKorcz AdamKorcz Jun 25, 2022

Choose a reason for hiding this comment

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

Regarding directly instantiating fuzzers, does it help coverage-guided fuzzers to know more about containerd, compared to launching containerd as an external process?

Yes. Interacting with an executable is less effective than the approach of launcing command.App

"github.com/containerd/containerd/pkg/registrar"

"github.com/containerd/containerd"
_ "github.com/containerd/containerd/cmd/containerd/builtins"
Copy link
Member Author

Choose a reason for hiding this comment

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

Because this is using builtins package, adding CRI into builtins makes a circular dependency between builtins and CRI, hence avoided.

@estesp
Copy link
Member

estesp commented Jun 27, 2022

needs rebase due to conflict

@kzys kzys force-pushed the fuzz-less-hacks branch from f11d284 to aefb08a Compare June 27, 2022 16:33
@mikebrow
Copy link
Member

one more rebase to pick up the fix for windows integration #7106

@kzys kzys force-pushed the fuzz-less-hacks branch from aefb08a to f7de1c8 Compare June 27, 2022 22:54
Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

I think we can init plugins and test it in out of cri package in the future.

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.

7 participants