Commit Graph

471 Commits

Author SHA1 Message Date
Anton Lindqvist
5b2ca5dad8 dashboard/config: enable KQUEUE_DEBUG on OpenBSD
Recently introduced used to validate correctness of kqueue event lists.
2019-12-13 20:25:07 +01:00
Dmitry Vyukov
0d368675f8 dashboard/app: report newer crashes in the next reporting
We used to report the newest crash long time ago.
Then we switched to preserving the crash across reporting
stages b/c what reaches next stage may be not what was
sent upstream in the previous one.
However, it seems to cause more problems now than it solves.
Crash classification become much better + some backlog
of bugs was clearer, so we don't have that may glued bugs.
However, in some cases we report notoriously old crashes
which is bad. Switch to the newest crash agian.
Let's see how this works now.
2019-12-11 11:05:32 +01:00
Andrey Konovalov
5a5826a14e sys/linux, dashboard: update USB config and IDs 2019-12-10 12:45:34 +01:00
Dmitry Vyukov
43c501b983 dashboard/config: enable few more linux configs
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_NFSD_V4_2_INTER_SSC=y
2019-12-07 18:45:07 +01:00
Dmitry Vyukov
85f267515d dashboard/config: fix netbsd kmsan config 2019-12-06 16:55:10 +01:00
Siddharth M
12c3b6cd9a pkg/build: add support to build the NetBSD kernel with KMSan
* Initial KMSan commit
* pkg/buil: kmsan cleanup
* pkg/build: Modify the logic slightly
2019-12-06 11:28:19 +01:00
Dmitry Vyukov
799e6ffbbe dashboard/app: enable few more tty/console-related configs for linux 2019-12-03 18:48:14 +01:00
Dmitry Vyukov
b5e3232432 dashboard/config: enable more configs
Enable some input configs that may be reachable in qemu.
+NVMEM: reachable in qemu
+BINDERFS
2019-12-02 17:58:15 +01:00
Dmitry Vyukov
6e4aeffeda dashboard/config: enable CIFS and OCFS2_FS
We have some descriptions for them and enabled in debian.
2019-11-29 15:02:42 +01:00
Dmitry Vyukov
6239d724ad dashboard/config: update linux/kasan config
1. Update to latest linux-next (next-20191129).
2. Enable NVMEM/PMEM.
3. Enable new crypto algs.
4. Enable VMAP stacks (yay!).
2019-11-29 10:46:26 +01:00
Dmitry Vyukov
861a5980df dashboard/config: disable CONFIG_DEBUG_INFO_BTF
CONFIG_DEBUG_INFO_BTF started breaking build,
see details in add comments.
2019-11-28 09:32:06 +01:00
Dmitry Vyukov
0d63f89cab syz-ci: allow enabling bisect cause and fix jobs separately
Some backport-only kernels may only be interested in fix bisections.
Allow enabling these separately.
2019-11-27 16:40:04 +01:00
Dmitry Vyukov
6f7be11fa1 dashboard/app: don't report bisections pointing to release commits
They should have been detected by "same binary" logic.
But the problem is that we may use different compilers
for different commits and they switch exactly at release commits.
So we can build the release with a differnet compiler than the
rest of commits and then obviously it won't be "same binary".
Detect release commits separately.

Update #1271
2019-11-27 14:05:14 +01:00
Dmitry Vyukov
be8c51d3d9 dashboard/app: fix creation of bisection jobs
We limited the bugs query for bisection jobs at 300 bugs,
but that's not enough in presence of multiple namespaces.
Some namespaces did not get any bisections because all
bugs belonged to other namespaces/managers.
Fetch all bugs to fix this.

While we are here also simplify check for bisection crashes:
now we have FixBisectionDisabled as a property of manager,
so we don't need to fetch the crash build to check it.
2019-11-15 09:48:06 +01:00
Dmitry Vyukov
048f2d494e dashboard/app: close bugs that we won't fix bisect sooner
Add logic to do the subj.
But it's not enabled yet b/c we need to figure out what to do with KMSAN.
It's different from, say, linux-next.
2019-11-11 17:03:41 +01:00
Marco Elver
377d77fa57 dashboard/config: Update KCSAN config to be more conservative 2019-11-11 16:23:03 +01:00
Dmitry Vyukov
dc438b91de dashboard/app: enable fix bisection to external reporting
Update #1371
2019-11-08 13:40:46 +01:00
Dmitry Vyukov
560ebad5b0 dashboard/app: move FixBisectionDisabled from repo to manager
We have manager in more places (bug, job, etc),
but usually we don't have repo directly (this
always requires loading build). Move FixBisectionDisabled
to manager for easier access, e.g. we will be able to easily
check if a bug happened only on managers with fix bisection
disables, which is currently quite problematic.
2019-11-08 13:38:31 +01:00
Dmitry Vyukov
f39aff9e4a dashboard/app: auto-close bugs after successful fix bisection
Add an optional feature for subj.
Should be useful for unmaintained namespaces like Linux LTS.
2019-11-07 16:08:26 +01:00
Dmitry Vyukov
d5bc68123a dashboard/app: enable mailing results of fix bisection
All prerequisites are done now.
I've cleaned the datastore and did some manual testing as well.

Fixes #1371
2019-11-07 14:45:13 +01:00
Dmitry Vyukov
461291eaaf dashboard/app: show what fix bisections we will mail
Show [report pending] for fix bisections that we will send.
Help to analyze what will happen when we enable mailing of fix bisections.

Update #1271
2019-11-07 14:27:46 +01:00
Dmitry Vyukov
9cf4d4ed2e dashboard/app: few more cosmetic UI changes
Don't add <br> before bisection, if bisection does not exist.
Rename fix bisections table to make it clearer that they failed.
2019-11-07 12:37:52 +01:00
Dmitry Vyukov
efb49b4d0b dashboard/app: slightly tidy up bisection results
Add new lines around bisection block as it was before.
Remove kernel tree, does not seem to be critical.
Make it clear what is cause bisection and what is fix bisection
(currently we have 2 "Bisection" which is not very helpful).
2019-11-07 11:07:08 +01:00
Dmitry Vyukov
30cb7f98cd pkg/bisect: detect wrong bisections
Detect bisection to merge commits and to commits that don't affect
kernel binary (comments, other arches, whitespaces, etc).
Such bisections are not reported in emails (but shown on web).

Update #1271
2019-11-07 11:07:03 +01:00
Zubin Mithra
0f3ec414b9 dashboard/app: add support for disabling fix bisection
* Allow fix bisection to be disabled on kernel repos to which force-pushes
occur.
* Pending fix bisection jobs for KernelRepo with FixBisectionDisabled will have
to be deleted manually.
* Add TestFixBisectionsDisabled.

Closes #1365
2019-11-05 09:17:27 +01:00
Zubin Mithra
a77e6539d9 syz-ci: send build info for failed bisections
* When fix bisections fails due to a crash on HEAD, the dashboard needs to
keep track of which commit the crash occured at. In order to do this,
send correct commit information to the dashboard.
* Modify mail_bisect_result.txt to be clearer on what
BisectResult.KernelCommit represents. Modify test in bisect_test.go to
accommodate the changes in templates.
2019-11-05 09:15:56 +01:00
Andrey Konovalov
76630fc947 executor, pkg/host, dashboard/config: rename usb-fuzzer to usb raw-gadget
The interface is being upstreamed and the name has changed.
2019-11-04 15:43:43 +01:00
Dmitry Vyukov
841212d4cc sys/linux: extend CAN descriptions 2019-11-02 21:31:45 +01:00
Dmitry Vyukov
018e59bad0 dashboard/app: add link to bug to reproducers
As requested by users.
Fixes #1396
2019-10-25 18:02:24 +02:00
Dmitry Vyukov
c2e837da36 dashboard/app: flexible rules for bug obsoleting
Implement logic described in #1054:
 - close bugs that happened a lot and then stopped faster
 - close bugs in non-final reporting with different period
 - allow closing bugs that happened only on 1 manager with different period

Fixes #1054
2019-10-25 15:56:00 +02:00
Dmitry Vyukov
2d4fab5ed1 dashboard/app: reduce auto-closing timeout to 120 days
See #1054

First simple step.
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
ffff482138 dashboard/app: don't log user errors in checkCrashTextAccess too
This pollutes error logs too.
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
e1b158574e datastore/app: switch more bug queries to paged queries
Update #1448
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
44e9a18ae7 dashboard/app: switch foreachBug to using cursors
Cursors seem to be more efficient than Offset-based queries:
https://cloud.google.com/datastore/docs/concepts/queries#datastore-datastore-cursor-paging-go

Update #1448
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
93b35d600e dashboard/app: use paged query to load bugs on the main page
The bugs query periodically times out. Try to use a paged query.

Update #1448
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
3a0514fbbf dashboard/app: remove duplicate error log
The returned error is logged by caller.
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
639a1e6606 dashboard/app: don't log errors that can be caused by bad user requests 2019-10-25 13:28:42 +02:00
Dmitry Vyukov
b602d64b59 dashboard/config: disable /dev/{mem,kmem,ioport} in syzbot bits
If syzkaller gets to /dev/{mem,kmem,ioport}, it will destroy the machine.
It managed to do so with some mount's, chdir's and bogus file names.
These are not needed for fuzzing, so completely disabling them is
the simplest and the most reliable option.
2019-10-23 15:57:13 +02:00
Andrey Konovalov
a970258ea5 dashboard/config: better extract usb configs
When generating a USB config, disable USB symbols that are disabled in the
base config, as they might have been enabled when some of the dependecies
got enabled.
2019-10-23 10:13:19 +02:00
Dmitry Vyukov
ef4a2149fe dashboard/config: update linux/kasan config
- update to latest linux-next
- disable /dev/{mem,kmem,ioport}
- enable lockdown (but it's not actually turned on)
- enable /dev/device_notify
- enable exfat
- enable virtio_fs
- enable few other things that look reachable in VMs

Fixes #1436
2019-10-15 13:50:06 +02:00
Andrey Konovalov
05ad729222 dashboard/config: update USB config 2019-10-14 14:14:06 +02:00
Dmitry Vyukov
64612bfd3c tools/syz-reprolist: add utility to extract list of reproducers 2019-10-08 12:39:23 +02:00
Dmitry Vyukov
3e1e84d48e dashboard/app: refactor few things related to fix bisections 2019-10-04 18:02:27 +02:00
zsm-oss
671dd8203a Merge pull request #1383 from zsm-oss/show-bisections
dashboard/app: show fix bisections on bug web UI
2019-10-04 17:51:16 +02:00
Andrey Konovalov
b7a87a83f8 dashboard, sys/linux: update USB configs 2019-10-01 14:00:17 +02:00
Zubin Mithra
f8368f999a dashboard/app: no reporting fix bisection results for already fixed bugs
* Modify pollCompletedJobs(); for bugs that are already marked as fixed,
invalid or duplicate do not report bisection results.
* Add TestNotReportingAlreadyFixed() to test that reporting does not
occur for already fixed bugs.
2019-09-24 10:48:29 +02:00
Marco Elver
c68252d224 dashboard/config: Add KCSAN config generator and config 2019-09-23 18:02:39 +02:00
Dmitry Vyukov
b4680d8341 dashboard/app: fix error wrapping
The current code does not do what it's supposed to do.
Converting error to error is always true.
Properly wrap errors.
2019-09-19 16:47:24 +02:00
Siddharth Muralee
1037b42440 dashboard/config: Add netbsd kernel configs 2019-09-18 15:00:55 +02:00
Andrey Konovalov
669cade06a dashboard/config: add debian stretch options
See #760 for details.
2019-09-17 14:42:25 +02:00
Andrey Konovalov
d994512dff sys/linux, dashboard: update USB config 2019-09-04 13:09:49 +02:00
Andrey Konovalov
6c19c36919 dashboard/config: improve config generation scripts
1. Use MAKE_ARGS var to pass arguments to make.
2. Pass -m to merge_config.sh to avoid calling make without CC.
3. Make util_add_syzbot_extra_bits() operate on .config.
2019-09-04 13:09:49 +02:00
Zubin Mithra
05c2dc45fb dashboard/app: fix typo and change reporting description
* Fix a typo in mail_bisect_result.txt related to the "syz fix:" line.
* Improve the description to make it clearer why sending a "syz fix:" is
important.
2019-09-04 11:01:18 +02:00
Dmitry Vyukov
584f940baf dashboard/app: fix fix bisection tests
Currently TestBisectFixRetry  fails because it assumes emails
about crash on ToT are not sent. But we currently send them
in tests. Make the behavior consistent between tests and prod.

Update #1371
2019-09-01 20:42:31 -07:00
Dmitry Vyukov
9a1a17ad11 dashboard/app: temporary disable fix bisection reporting
Update #1371
2019-09-01 20:42:20 -07:00
Zubin Mithra
bad3cce26c dashboard/app: allow reporting of BisectFix results
* Modify mail_bisect_result.txt to allow for sending fix bisection
results.
* Modify BisectResult to have a Fix field; introduce selectBisect for
use within the template for choosing between BisectCause/BisectFix
fields.
* Modify bisectFromJob() to return BisectResult with Fix field set if
relevant.
* Modify the tests inside bisect_test.go to account for bisect fix
related reporting emails.
* Modify incomingMail() to ignore any emails from syzbot itself.
2019-08-30 19:50:12 -07:00
Zubin Mithra
cd626f3ba9 dashboard/app: retry BisectFix if crash still occurs on ToT
If a crash occurs on ToT when doing fix bisection, retry the job after
30 days. Add TestBisectFixRetry() to ensure that jobs are retried after
30 days if bisection results in crash on ToT.
2019-08-28 15:34:44 -07:00
Andrey Konovalov
d21c5d9de0 dashboard/app: include dashboard link in job reports 2019-08-24 13:42:14 -07:00
Andrey Konovalov
74d61399c2
dashboard: allow to view bugs happened on a particular manager (#1331)
As a result all bugs from the ci2-upstream-usb instance can be viewed here:

https://syzkaller.appspot.com/upstream?manager=ci2-upstream-usb
2019-08-13 14:11:21 +02:00
Zubin Mithra
ede31a9b51 dashboard/app: fix UI typo and formatting error
There is a typo and a formatting bug that can be viewed at bugs such as
    https://syzkaller.appspot.com/bug?id=f007ef1d7a31a469e3be7aeb0fde0769b18585db

Also cleanup the formatting in surrounding areas so that it is much
clearer.
2019-08-08 19:05:56 +02:00
Zubin Mithra
a02b5bcae2 dashboard/app: allow main UI to show bisect results
* Modify uiBug type. Rename BisectCause to BisectCauseDone. Introduce
BisectFixDone.
* Modify createUIBug() and MergeUIBug() to set the above fields
appropriately.
* Modify bug_list to display the bisection status; remove yesSort() as
it is not used anymore. Adjust ".list_table .stat" to appropriate width.
* Add TestBugBisectionStatus() to check bisection status on main page.
* Add file from running "make generate": pkg/html/generated.go
2019-08-08 15:58:57 +02:00
Zubin Mithra
1bd538f42c dashboard/app: remove duplicate code inside bug.html template
* Introduce "bisect_results" inside templates.html to take in a uiJob
and shows its contents.
* Modify bug.html to use "bisect_results" to show BisectCause and
BisectFix uiJob.
2019-08-08 15:22:19 +02:00
Anton Lindqvist
c6f01e54b0 dashboard/config: enable VFSLCKDEBUG on OpenBSD
In order to assert that vnodes are locked when needed.
2019-08-06 16:35:28 +02:00
Andrey Konovalov
3faab80738
dashboard, sys/linux: extract more HID USB configs (#1310)
Some USB drivers don't depend on core USB symbols, but rather depend on a
generic symbol for some input subsystem (e.g. HID). Account for that when
extracting USB configs.
2019-08-02 18:26:44 +02:00
Zubin Mithra
835dffe7e5 dashboard/app: allow fix bisection results to be visible on web UI
* Modify the dashboard/app/bug.html template to show fix bisection
results.
* Modify handleBug() to fetch and create a uiJob for fix bisection
results.
* Modify loadBisectJob() to fetch jobs based on a specified jobType.
Change all callers to pass in jobType info into loadBisectJob().
* Add TestBugBisectionResults() to ensure bisection results show up as
expected.
2019-08-01 13:43:22 +02:00
Zubin Mithra
c692b5bdab dashboard/app: clean up query inside findBugsForBisection 2019-07-31 13:51:17 +02:00
Dmitry Vyukov
6b499767f1 dashboard/app: add index for fix bisection 2019-07-30 16:54:57 +02:00
Zubin Mithra
5894f4562d dashboard/app: allow the dashboard to create BisectFix jobs
* Modify createBisectJob() to retrieve bugs that are potential candidates for both
BisectCause and BisectFix.
* Modify TestBisectCause() to account for BisectFix jobs that are
returned when polling.
* Add TestBisectFixJob() to check that BisectFix jobs are returned only
after 30 days of reporting.
* pollCompletedJobs() is currently called to fetch finished bisection
jobs for reporting purposes. Modify it to not return BisectFix jobs so
that they are not reported.
2019-07-30 16:35:15 +02:00
Dmitry Vyukov
732bc5a0a4 dashboard/app: ensure that tests consume all external reports
Ensure that tests consume all external reports as we already do for emails.
Reports is the most important thing because they involve people,
so tests need to be explicit and we want to notice changes in any reporting.
2019-07-25 16:31:25 +02:00
Dmitry Vyukov
8821159f77 dashboard/config: update upstream-kasan.config
Update config to 5.3.0-rc1.
Enable some new networking configs which should be able to reach.
Enable CONFIG_USB_DUMMY_HCD for /dev/usbmon testing.
2019-07-25 15:11:30 +02:00
Dmitry Vyukov
b858e6fb5f
dashboard/app: add test instructions 2019-07-23 08:56:16 +02:00
Andrey Konovalov
e2b11c0ada dashboard: fix usb config extraction script
Fix extracting more configs that are actually enabled.
Regenerate upsteam-usb.config and sys/linux/init_vusb_ids.go.
2019-07-16 15:02:36 +02:00
Dmitry Vyukov
db842eb61c dashboard/app: add ConstFilter helper
Handy to use in configs if lots of filter just need to return a const.
2019-07-16 14:18:35 +02:00
Dmitry Vyukov
7e921b852d dashboard/app: add an empty test file
blaze+tricoder fail when all test files are excluded by tags.
Work around the bug by adding an empty test file.
2019-07-16 12:44:02 +02:00
Dmitry Vyukov
f62e1e85cf dashboard/config: update linux configs
Update configs to the current linux-next (16c474c9ba39ede5fd1cd835ac52b3760d7820b7).
Enable CONFIG_GVE=y, we may be able to reach it on GCE.
2019-07-05 11:51:08 +02:00
Andrey Konovalov
c87d57e3e0 dashboard: update USB configs to the latest usb-linus
Also clean up config generation scripts a bit.
2019-05-29 15:56:43 +02:00
Dmitry Vyukov
d8aa8b73f5 dashboard/app: add invalid bugs page
Currently it's not possible to list all invalid bugs.
Add a page that does this.
It's not referenced from anywhere as it's unclear who/when
needs it on periodic basis. But if the list is needed
for something one-off, we have it.
2019-05-27 11:28:02 +02:00
Dmitry Vyukov
cddddce85a dashboard/config: update kmemleak config
Update to latest linux.
Enable configs enabled in the kasan config.
2019-05-20 19:40:20 +02:00
Dmitry Vyukov
40046286a4 dashboard/config: disable CONFIG_RETPOLINE
It slows down execution without any benefit for testing.
Who needs security anyways?
2019-05-17 13:21:31 +02:00
Dmitry Vyukov
c4a2377034 dashboard/config: disable binder debug
Binder is too noisy with debug output.
Still noisy, but this at least removes part of constant output.
2019-05-16 18:56:49 +02:00
Alexander Potapenko
f59a9cb554 Rebuild upstream-kmsan.config
Turns out I was using a stale KASAN config which didn't include TOMOYO
bits.
2019-05-16 11:10:34 +02:00
Alexander Potapenko
27b25dbc1d util.sh: factor out util_add_extra_syzbot_configs 2019-05-15 16:23:44 +02:00
Alexander Potapenko
692754f1a7 Enable USB fuzzing in KMSAN configs.
This moves the USB-related parts of generate-config-usb.sh to util.sh
and reuses them in generate-config-kmsan-from-kasan.sh.

It also updates upstream-kmsan.config
2019-05-15 16:23:44 +02:00
Dmitry Vyukov
3345130d0f dashboard/config: fix up TOMOYO configs
See https://groups.google.com/d/msg/syzkaller/mODXmnauUZM/nIuyd2M0AAAJ for context.
2019-05-15 11:57:17 +02:00
Andrey Konovalov
99688eaaba dashboard: remove COMPILE_TEST from USB config
It forces DEBUG_INFO to be disabled.
2019-05-14 14:36:57 +02:00
Andrey Konovalov
7c305b440c dashboard: add scripts for generating USB kernel configs
This is done via a custom Kconfiglib based script, that allows to merge
in all USB configs from a provided one into the current. The script finds
and enabled all USB configs and their dependencies.
2019-05-13 17:10:34 +02:00
Dmitry Vyukov
aa8482aa8a dashboard/config: enable CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING
This allows to enable and test TOMOYO without an external policy (which we don't have).
2019-05-13 09:31:11 +02:00
Anton Lindqvist
1ab4c99920 dashboard/config: enable SPLASSERT_WATCH on OpenBSD
Makes interrupt priority level assertions fatal.
2019-05-08 19:51:17 +02:00
Dmitry Vyukov
1bb034d089 dashboard/app: fix too long line warning 2019-05-08 16:30:46 +02:00
Dmitry Vyukov
b12c1ab14c dashboard/app: restore printing of email commands
After commit 9ad9ef29ca
we started saying "your command '3' is accepted"
because we use numbers now. Keep string representation
of the command when parsing and use it in reply emails.
2019-05-08 16:29:04 +02:00
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
Dmitry Vyukov
ffec3d1894 dashboard/config: add lsm= cmdline arg for stacked modules
It won't take effect right now as security= has precedence over lsm=.
But it won't harm too and later we will only need to remove security=.
Also it will work with this custom patch for syzbot:
https://groups.google.com/d/msg/syzkaller/BSgVCTSShRQ/E6lFuiDpFwAJ

Update #973
2019-02-01 19:43:52 +01:00
Dmitry Vyukov
aa53be276d dashboard/config: prepare for stacked security modules
In linux-next security modules can be stacked.
TOMOYO is compatible with other modules and SAFESETID
module is added. But this is not yet in mainline.

Enable TOMOYO and SAFESETID.
There is no way to enable stacked modules in linux-next
while preserving the current behavior in mainline.
Once these changes reach mainline, we will need to replace
security cmdline arguments with lsm as follows:

lsm=yama,safesetid,integrity,selinux,tomoyo
lsm=yama,safesetid,integrity,smack,tomoyo
lsm=yama,safesetid,integrity,tomoyo,apparmor
2019-02-01 11:00:59 +01:00
Anton Lindqvist
ce1ccf9723 dashboard/config: enable witness on OpenBSD
Lets give this another try now that larger kernels can boot.
2019-01-24 07:38:43 +01:00
Dmitry Vyukov
7da2392541 pkg/report: support CONFIG_PRINTK_CALLER
CONFIG_PRINTK_CALLER has reached linux-next:
https://groups.google.com/d/msg/syzkaller/xEDUgkgFvL8/d5bBS3BJBwAJ

Enable CONFIG_PRINTK_CALLER and support parsing of its output format.

This gives us several advantages:
 - output from different contexts don't intermix
 - intermixed output doesn't cause corrupted reports
 - we can keep larger prefix since we know it comes from the same task

Credit for the kernel part goes to Tetsuo Handa.
Also Sergey Senozhatsky and Petr Mladek for reviews of the kernel part.

Fixes #596
Fixes #600
2019-01-03 19:23:07 +01:00
Anton Lindqvist
752613e615 dashboard/config: enable LOCKF_DIAGNOSTIC on OpenBSD 2019-01-03 09:29:12 +01:00
Eric Biggers
f0491811f9 dashboard/config: enable more linux crypto configs 2019-01-02 11:24:46 +01:00
Dmitry Vyukov
6b761be059 dashboard/config: enable more linux net configs
Enable some BT/RXRPC/MAC80211/ISDN configs.
2018-12-29 19:22:34 +01:00
Dmitry Vyukov
c87e9eb9bd dashboard/config: enable HSR and NUMA_EMU 2018-12-26 18:24:53 +01:00
Dmitry Vyukov
309bb18442 dashboard/config: moar networking configs
Add more x25 drivers, wlan, slip, caif and other stuff that I don't understand,
but syzkaller can potentially reach.
2018-12-24 18:56:06 +01:00
Dmitry Vyukov
dd61e58d94 sys/linux: extend AX25/ROSE/NETROM descriptions 2018-12-24 18:56:06 +01:00