-
Notifications
You must be signed in to change notification settings - Fork 1.4k
tools/syz-aflow/aflow.go: Add CrashReport, KernelRepo and KernelCommit to inputs when downloading a bug #6705
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
base: master
Are you sure you want to change the base?
Conversation
…ded for assessment-kcsan workflow (KernelRepo, KernelCommit and CrashReport)
…ejuk/aflow-dev
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
57d4fea to
7cd685a
Compare
| repoURL, _ := crash["kernel-source-git"].(string) | ||
|
|
||
| // Clean the URL to end at .git | ||
| if dotGitIndex := strings.Index(repoURL, ".git"); dotGitIndex != -1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? Dashboard should have proper git repo addresses that are usable as is. There were used to fetch the tested kernel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The kernel-source-git field contains (as far as I have seen) a git.kernel.org URL with /log/ path.
E.g. https://syzkaller.appspot.com/bug?extid=f98189ed18c1f5f32e00&json=1 :
"crashes": [
{
"title": "kernel BUG in may_open",
"syz-reproducer": "/text?tag=ReproSyz\u0026x=14a7d19a580000",
"c-reproducer": "/text?tag=ReproC\u0026x=16a2f19a580000",
"kernel-config": "/text?tag=KernelConfig\u0026x=7b058fb1d7dbe6b1",
"kernel-source-git": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=b6151c4e60e5f695fac8b5c3e011cfcfd6e27cba",
"kernel-source-commit": "b6151c4e60e5f695fac8b5c3e011cfcfd6e27cba",
"syzkaller-git": "https://github.com/google/syzkaller/commits/d6526ea3e6ad9081c902859bbb80f9f840377cb4",
"syzkaller-commit": "d6526ea3e6ad9081c902859bbb80f9f840377cb4",
"crash-report-link": "/text?tag=CrashReport\u0026x=15abc5fa580000"
},
[...]
pkg/vcs/git.go: fetchRemote that pkg/aflow/action/kernel/checkout.go: checkout uses, throws an error if this URL is not trimmed to end before /log/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, damn.
IIRC we discussed that we need to export usable git repos in the API, but never actually did that. CC @tarasmadan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this won't handle all cases, kernel repos can live anywhere (github, git.cmpxchg.org, gerrit).
Then please add a comment for this.
Not sure what we should do if the repo does not contain "git.kernel.org".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is
- look for ".git" sequence in the URL (e.g. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux .git /log/?id=b6151c4e60e5f695fac8b5c3e011cfcfd6e27cba")
- Remove everything after .git
So it should work independently from where the code is (unless there is a host that has ".git" in the name - is that possible?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's try this.
dvyukov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good.
But CI need to pass. Please look for CI action errors.
|
You will need to sign CLA (the bot should give a link to instruction), and rebase changes (we don't do merge commits). |
tools/syz-aflow/aflow.go: Add CrashReport, KernelRepo and KernelCommit to inputs when downloading a bug
When using
tools/syz-aflowwith-download-bugflag, the tool creates an inputs json file with inputs necessary for patching workflow.This PR makes it download inputs needed for
assessment-kcsanworkflow as well.Quickrun
(assuming disk.raw is available and make commands are run)
Before:
After: