Commit Graph

281 Commits

Author SHA1 Message Date
Dmitry Vyukov
3e1f67583e dashboard/config: update upstream KASAN config
Update config to latest linux-next kernel.
2019-05-07 18:01:24 +02:00
Dmitry Vyukov
8095117313 all: fix some static analysis warnings
Fix warnings produced by golangci-lint.

Update #977
2019-04-23 17:58:54 +03:00
Andrey Konovalov
2e55509e43 config: enable CONFIG_PRINTK_CALLER for usb 2019-04-22 12:20:42 +03:00
Greg Steuck
505ab413c7 Revert "dashboard/config: enable POOL_DEBUG on OpenBSD (#1113)"
This reverts commit 2fbd3aa904.
2019-04-14 10:44:34 +02:00
Dmitry Vyukov
57a8554e1a dashboard/app: fix cookie caching and redirects
Set expiration date for the cookie,
otherwise it should be dropped on browser restart.

Use http.StatusFound(302) instead of http.StatusMovedPermanently(301)
for redirects. Browsers can cache 301 redirects, which we don't want.
2019-04-12 14:42:17 +02:00
Dmitry Vyukov
13030ef80c dashboard/config: update usb config 2019-04-11 16:29:46 +02:00
Dmitry Vyukov
31e097a19f dashboard/app: stricter check on namespace names
Check that namespaces don't contain bad chars.
2019-04-10 15:07:22 +02:00
Dmitry Vyukov
e39dbde1da dashboard/app: fix login redirects
Login redirects broke because we failed to generate common header.
This wasn't noticed because we use client redirects
and there is no easy way to test them.
Fix redirects and use server redirect and test this behavior.
2019-04-10 15:06:59 +02:00
Andrey Konovalov
65b612b7c3 dashboard: disable CONFIG_DEBUG_WX in USB config
Otherwise we get "Found insecure W+X mapping" due to rodata=n in cmdline.
2019-04-09 19:15:49 +02:00
Andrey Konovalov
4e3011def6 dashboard: add USB cmdline and config 2019-04-09 18:37:45 +02:00
Dmitry Vyukov
91d50a67cc dashboard/app: add new favicon
Add syzbot favicon and log.
Authored by Tetsuo Handa.
2019-04-09 11:15:16 +02:00
Dmitry Vyukov
3ef496b7ba dashboard/app: split dashboard per-namespace
We now have too many namespaces and bugs.
Main page takes infinity to load.
Also almost nobody is interested in more than 1 namespace.
So split main page per-namespaces.
2019-04-08 14:32:32 +02:00
Anton Lindqvist
2fbd3aa904 dashboard/config: enable POOL_DEBUG on OpenBSD (#1113)
POOL_DEBUG is disabled during release, but we want it unconditionally
enabled.
2019-04-05 16:44:34 -07:00
Dmitry Vyukov
fa763482c3 dashboard/app: add admin page
Add /admin page and move logs, jobs, manager onto it.
The main page is too overloaded and takes too long to load.
We need to start splitting it. This is a first step.
2019-04-05 17:56:42 +02:00
Dmitry Vyukov
698a192c6d dashboard/app: don't error on invalid emails
Malformed emails constantly appear from spammers.
But we have not seen errors parsing legit emails.
These errors are annoying. Warn and ignore them.
2019-03-29 08:56:02 +01:00
Dmitry Vyukov
52a20ba400 dashboard/app: properly handle build failures
Separate kernel and syzkaller build failures.
Fix logic to understand when a build is fixed:
look if kernel/syzkaller commit changes to understand
if it's a new good build or re-upload of an old build.

Fixes #1014
2019-03-25 17:00:25 +01:00
Dmitry Vyukov
8e1b6f6446 dashboard/app: fix infinite emails
We override crash with the crash used for bisection
to make the information more consistent.
However if bisection crash only have syz repro
and there is now another crash with C repro,
then we always think that we have not reported C repro
and continue sending the same report again and again.
Don't override the crash with bisection crash in such case.
2019-03-24 12:52:30 +01:00
Dmitry Vyukov
3361bde577 dashboard/app: import datastore as db
datastore is too long name for such widely used packages.
Import it as db throughout. Nicely reduces line lengths.
2019-03-22 15:11:26 +01:00
Dmitry Vyukov
6155cc0988 dashboard/app: mark managers as bad after 6 hours of inactivity
It should not take more than 6 hours to rebuild all kernels.
So it's better to highlight bad managers earlier.
2019-03-22 15:05:45 +01:00
Dmitry Vyukov
9ad9ef29ca dashboard/app: slightly relax command parsing
Users have misspelled test: multiple times.
Accept commands without the colon.
2019-03-22 12:00:50 +01:00
Dmitry Vyukov
4d9d915eae syz-ci: fix filling of kernel commit in bisection jobs
There is a bit of a mess: dashboard expects the start commit
in build info, but syz-ci sends the resulting cause commit.
Moreover for inconclusive bisection the commit is not filled at all.
Fill start commit in build info on start.

Update #501
2019-03-22 12:00:50 +01:00
Dmitry Vyukov
ca3ffbc9f3 dashboard/app: add uncc command
Add "#syz uncc" command as a safety handle.
The command allows sender to unsubscribe from all future communication on the bug.

Linus mentioned possibility of saying "I'm not the right person for this report"
in the context of bug reminders:
https://groups.google.com/d/msg/syzkaller/zYlQ-b-QPHQ/AJzpeObcBAAJ
2019-03-22 12:00:50 +01:00
Dmitry Vyukov
40fdabdc24 dashboard/app: add bisection link to emails
Add link to more information about bisection process
to emails that contain bisection results.
This seems to be a hot topic for questions.

Update #501
2019-03-22 12:00:50 +01:00
Dmitry Vyukov
f6094a8c64 dashboard/app: use 12-char hash in Fixes tags
@ebiggers pointed out that Fixes tags should use 12-char hash:
https://groups.google.com/d/msg/syzkaller-bugs/yUhRrLD6T6A/3TMwOWvWAgAJ
I can't find any documentation on this, but it looks like most
existing tags follow this convention so use 12-char hashes.
2019-03-21 09:32:46 +01:00
Dmitry Vyukov
142c38ee4d dashboard/app: request test/bisect jobs separately
Allow separate sets of managers for patch testing and for bisection.
This makes things more flexible on syz-ci deployment side.
Remove previous hacks for bisection deployment.

Update #501
2019-03-20 12:00:34 +01:00
Dmitry Vyukov
3f1c29d938 dashboard/app: report bisection results to external reporting
Update #501
2019-03-19 16:37:21 +01:00
Dmitry Vyukov
46264c3259 dashboard/app: fix a typo in comment 2019-03-18 13:39:52 +01:00
Dmitry Vyukov
13026d10f0 dashboard/config: add freebsd service script 2019-03-18 12:41:16 +01:00
Dmitry Vyukov
08db11409e dashboard/app: make email tests more interesting
1. Mail bugs for second and third reportings to different emails
   so that it's possible to distinguish where they are actually mailed.
2. Add bisection test where we skip bug in the second reporting.
   Bisection results should go straigth to third as well.
2019-03-18 09:51:33 +01:00
Dmitry Vyukov
bcbe71c80a dashboard/app, syz-ci: bisection support
This adds bulk of support for bisection to dashboard/app and syz-ci:
- APIs to send bisection jobs and accept results
- syz-ci logic to execute bisection jobs
- formatting of emails with results
- showing of results on dashboard

Some difficulties we have to overcome:
- since linux is frequently build/boot broken, lots of bisections are inconclusive,
  need to present such results too
- git bisect is poorly suitable for automation, have to resort to output parsing (is output stable?)
- git bisect turns out to fail (exit with non-0 status) when bisection is inconclusive
  (multiple potential cause commits)
- older syzkaller revisions can't be built with newer (broken) kernel header, e.g.:
  ebtables.h:197:19: error: invalid conversion from ‘void*’ to ‘ebt_entry_target*’
- newer compilers produce more warnings and break old syzkaller builds, e.g.:
  kvm.S.h:6:12: error: ‘kvm_asm64_vm86’ defined but not used [-Werror=unused-const-variable=]
- figuring relevant emails to CC from a commit is non-trivial:
  besides commit author, there can be some emails in commit tags, or not,
  which tags to use is an interesting question (some may include irrelevant emails)
  we can also run get_maintainers.pl on the commit, but this can produce too wide
  list if commit touches lots of files, it can also produce too small list,
  and then we need to resort to blame
- for inconclusive bisection we probably don't need to include emails referenced
  in the commits (there can be too many of these commits)
- need to be careful to exclude own syzbot email from commit CC list,
  now syzbot emails are referenced in some commits (Reported-by/Tested-by/etc)
  (can cause some kind of infinite recursion)
- lots of commits reference stable mailing list,
  we should not include it in CC because it's referenced for backports rather then bug reports
- since we add new Bug entity fields which we use in queries,
  whole datastore need to be upgrades to add the new field to index
- we must not discard the crash that was used for bisection
  (treat it as a reported crash)
- bisection results need 2 forms of reports:
  one when we add bisection results to already reported bug
  another when we report a bug first time with bisection results
- when reporting a bug with bisection results we need to use the crash
  that was used for bisection
- some fraction of bisections will probably fail with various errors
  and we will need some mechanism to retry bisection after the root cause is resolved
  this is not implemented yet
- linux-next is problematic for 2 reasons:
  fix bisection can't possibly run on linux-next as commits are not reachable from HEAD
  lots of commits are missing in linux-next (even in linux-next-history)
  e.g. we have some c63e9e91a254a52 which is now missing in linux-next/linux-next-history
- older kernels can't be build with fresh gcc/binutils/perl/make/glibc
  for now we have to stop at v3.9 (this only requires switching gcc several times along the way)
- kernels past v4.11 do not build with gcc 7 and 8 (undefined reference to `____ilog2_NaN')
- v4.1 and back have only compiler-gcc5.h
- v3.17 and back have only compiler-gcc4.h
- v3.6 and back do not have make olddefconfig
- compat socket calls can't be bisected past "x86/entry/syscalls: Wire up 32-bit
  direct socket calls" (v4.10) because of
  https://syzkaller.appspot.com/bug?id=b5b150e322d5f48c869bcf1528cdbee08d1421cb
- v2.6.28 and below does not work with modern make:
  *** mixed implicit and normal rules: deprecated syntax
- v3.8 build fails:
  Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at kernel/timeconst.pl line 373.
  kernel/Makefile:134: recipe for target 'kernel/timeconst.h' failed
- make 3.81 works for v2.6.28.
  3.81 almost works with current HEAD, you need to run make twice because first run spuriously fails with:
- v2.6.28 with gcc-4.9.4 broken with:
  include/linux/kvm.h:240:9: error: duplicate member ‘padding’
- but even defconfig fails:
  VDSO    arch/x86/vdso/vdso.so.dbg
  gcc: error: elf_x86_64: No such file or directory
  gcc: error: unrecognized command line option ‘-m’
  It seems that we also need old binutils.
- for v3.8 and below we need perl-5.14.4.
  Unfortunately this or any manually built perl doesn't work for later kernels:
  Can't locate strict.pm in @INC
- kernels starting from 4.14 and older are boot broken:
  https://lkml.org/lkml/2018/9/7/648
- kernels older than 4.12 are broken during netdev setup
  (fixed by commit 675c8da049fd6556eb2d6cdd745fe812752f07a8)

Update #501
2019-03-17 18:06:44 +01:00
Dmitry Vyukov
03efedc6d1 dashboard/app: add handler for config migration
updateBugReporting adds missing reporting stages to bugs in a single namespace.
Use with care. There is no undo.
This can be used to migrate datastore to a new config with more reporting stages.
This functionality is intentionally not connected to any handler.
Before invoking it is recommented to stop all connected instances just in case.
2019-03-17 18:06:44 +01:00
Dmitry Vyukov
5900c53a4d dashboard/app: make dashapi.BugReport more self-contained
Extend BugReport with few fields that are needed by all reportings anyway.
This allows to not create and fill an almost identical object to pass to template.

Update #501
2019-03-17 18:06:44 +01:00
Dmitry Vyukov
ded8ff151d dashboard/app: load crash in loadJob test helper
Will be useful for bisection testing.

Update #501
2019-03-17 18:06:44 +01:00
Dmitry Vyukov
d7e03ecccc dashboard/app: use pkg/html to format text emails
Use pkg/html helpers to format text emails.
Shorten short hashes to 8 char while we are here,
the length used by git log --oneline.
Tidy up tests a bit.

Update #501
2019-03-17 18:06:44 +01:00
Dmitry Vyukov
5cf6e34d9e dashboard/app: add markCrashReported helper
Factor out markCrashReported out of incomingCommandTx.
Use it when creating patch testing jobs.
Will be needed for bisection jobs as well.

Update #501
2019-03-17 18:06:44 +01:00
Dmitry Vyukov
d543ef9137 dashboard/app: add Log text entity
To store bisection logs.

Update #501
2019-03-17 18:06:44 +01:00
Dmitry Vyukov
c871758a71 dashboard/app: rename CommitInfo to Commit
Because why?
2019-03-17 18:06:44 +01:00
Dmitry Vyukov
5958caeafc dashboard/app: modernize tests
Use expectOK for checking errors more.
Use pollEmailBug helper more.
Add expectNE and use it.
2019-03-17 18:06:44 +01:00
Dmitry Vyukov
8c085c5e4a
dashboard/app: add README.md
Update #1043
2019-03-07 09:27:51 +01:00
Greg Steuck
16559f86f5
ci-openbsd-multicore: enable PF (#1033)
* pkg/build/openbsd: copy overlay files from userspaceDir into image

Fixes #1030
2019-03-05 09:08:17 -08:00
Dmitry Vyukov
2e1b81398b dashboard/app: extend email reply when bug is not found
We currently reply with a very minimalistic reply that is not too actionable.
Explain what exactly happened and how to fix it.
2019-02-26 16:27:33 +01:00
Dmitry Vyukov
7a06e79212 dashboard/app: don't show empty compiler/CC
Compiler and CC can be empty, don't show them if they are empty.
2019-02-23 19:22:17 +01:00
Dmitry Vyukov
6a5fcca423 dashboard/app: implement bug notifications/actions
Currently dashboard can only report new bugs and add reproducers
to already reported bugs.
This change adds infrastructure for the dashboard to actively act
on existing bugs in different ways. 4 new notifications (actions) added:
 - dashboard can auto-upstream bugs from moderation after an embargo period
 - dashboard can auto-upstream bugs if reporting criteria changes
   (e.g. it reported a bug into moderation because there was no repro,
   but then repro appears and the bug is automatically sent upstream)
 - dashboard detects when a fixing commit does not appear in any tested trees
   for too long and sends a notification about this
 - dashboard detects stale bugs (last happened monts ago, no repro, no activity)
   and auto-invalidates them
This will also be useful to send pings for old bugs and do other automation.
2019-02-22 11:42:54 +01:00
Dmitry Vyukov
4df543c9ab dashboard/app: remove ReportingType.NeedMaintainers
Instead require DefaultMaintainers if MailMaintainers is set.
This makes logic in needReport a bit simpler.
2019-02-19 15:23:49 +01:00
Dmitry Vyukov
6a4471c2e5 dashboard/app: fix unused variable warning
isAppEngineTest is meant to be used in prod configs.
2019-02-17 15:44:21 +01:00
Dmitry Vyukov
3e98cc3080 dashboard/app: poll commits info
This implements 2 features:
 - syz-ci polls a set of additional repos to discover fixing commits sooner
   (e.g. it can now discover a fixing commit in netfilter tree before
   it reaches any of the tested trees).
 - syz-ci uploads info about commits to dashboard.
   For example, a user marks a bug as fixed by commit "foo: bar".
   syz-ci will find this commit in the main namespace repo
   and upload commmit hash/date/author to dashboard. This in turn
   allows to show links to fixing commits.

Fixes #691
Fixes #610
2019-02-17 15:08:45 +01:00
Dmitry Vyukov
76dd003f1b dashboard/dashapi: remove unused type
Stray change in the previous commit.
This unbreaks CI build.
2019-02-14 10:36:24 +01:00
Dmitry Vyukov
6a46f448c4 dashboard/app: remove unused function 2019-02-13 16:41:04 +01:00
Dmitry Vyukov
0f51729bc4 dashboard/app: record last activity and fix times
It would be useful to record last activity time for bugs
(e.g. for pings) and when a fix is provided for statistics purposes.

Fixes #673
2019-02-13 15:58:42 +01:00
Anton Lindqvist
d75f7686f1 dashboard/config: enable WITNESS_LOCKTRACE on OpenBSD (#987)
This option will print all lock acquisition paths once a lock violation
is identified by witness[1].

[1] https://marc.info/?l=openbsd-cvs&m=154955230813384&w=2
2019-02-09 07:27:06 -08:00