syzkaller icon indicating copy to clipboard operation
syzkaller copied to clipboard

dashboard: support LKML patches in `#syz test`

Open a-nogikh opened this issue 2 years ago • 2 comments

(*) Related discussion: https://lore.kernel.org/all/[email protected]/T/#e9b2fc3253f78c190257c377e72e910e62d2e42dc

At the moment, #syz test can be run either without any patch, or with a patch pasted right after the command, or with the patch sent as an email attachment. It could be convenient to be able to also ask syzbot to test an LKML-sent patch.

We need to figure out the right query syntax. Even when we're given an LKML link to the patch, we also need to be able to figure out the tree on which to apply the patch before testing.

Some of the options.

  • Apply such patches only on top of the branch where we found the bug. In this case, the command can be simple
  • Still support repo/branch arguments. If no patch is attached and a lore link follows a #syz test, take it.
    #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
    https://lore.kernel.org/all/[email protected]/
    
    Though it becomes already quite complicated :(

a-nogikh avatar Sep 01 '23 11:09 a-nogikh

The task to solve the branch is easy. Git already has --base parameter. So, just parse an email for it. Then you have the following possibilities:

  1. The base is found in your cache of known trees / branches (note that git.kernel.org tracks global SHA IDs, means that doesn't matter if you look for something in the repo that doesn't has it, you can always check if it's present somewhere there, but this might get fixed in the future, that said your local cache may be organized same or similar way).
  2. The base is not provided, use the branch where the problem was found.
  3. The base wasn't found, we can't do much, but try it as it was the case 2 above and test in case it can be cleanly applied.

In all cases the format for syzbot stays the same.

andy-shev avatar Sep 01 '23 12:09 andy-shev

One more thing is to make possible to mark dup with patch present:

#syz dup [patch available: $MESSAGE_ID] blablabla

square brackets for the solely purpose to filter them out for the existing logic.

ashevche avatar Sep 04 '23 09:09 ashevche