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

prog: better call-to-call priority calculation #1380

Open
dvyukov opened this issue Sep 4, 2019 · 1 comment
Open

prog: better call-to-call priority calculation #1380

dvyukov opened this issue Sep 4, 2019 · 1 comment

Comments

@dvyukov
Copy link
Collaborator

dvyukov commented Sep 4, 2019

The call priorities calculation is quite basic:
https://github.com/google/syzkaller/blob/master/prog/prio.go
Some things to improve:

  • Static priorities for call pairs should account for resource direction. For example, open produces an fd, write uses an fd, so it makes sense to add write after open, but not the other way around.
  • Dynamic priorities for call pairs should account for before/after. For example, setsockopt is only interesting after socket, but not the other way around.
  • The weights for resource usage may need tuning.
  • When we insert a call, we choose a "base" call to use in priority selection of the new call:
    call = p.Calls[r.Intn(len(p.Calls))].Meta.ID
    . If we insert a call into the middle of the program during mutation, we should choose the "base" call only from the call before the insertion program (not all calls in the program).
@dvyukov
Copy link
Collaborator Author

dvyukov commented Sep 4, 2019

Moved out of #534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants