Commit Graph

4287 Commits

Author SHA1 Message Date
Dmitry Vyukov
5bc702124e pkg/bisect: add more logging for build signatures
It seems that some signatures that should be equal are not
(or something else is going on). Add some logging for transparency.
2019-11-18 18:23:01 +01:00
Dmitry Vyukov
b436ffb77d pkg/build: produce more deterministic linux binaries
There are few more dynamic variables related to kernel release tagging.
Set these to known deterministic values.
2019-11-18 17:39:09 +01:00
Shiyu Sun
1daed50ac3 docs: update syscall_descriptions.md
Clarify that 'make generate' should update syscall description
revision.
2019-11-18 09:15:26 +01:00
Dmitry Vyukov
d5696d5192 pkg/ipc: always chmod the work dir
There is little reason in not doing the chown for sandbox=none.
Simpler and can actually increase coverage if the test program
setuid's itself (since it's root under sandbox=none).
2019-11-16 09:58:54 +01:00
Dmitry Vyukov
8825ff8ff2 pkg/runtest: shrink if condition 2019-11-16 09:58:54 +01:00
Dmitry Vyukov
587cec15e2 pkg/host: add Features.Supported
To reduce diff in future changes. Currently no-op.
2019-11-16 09:58:54 +01:00
Dmitry Vyukov
a129861adb pkg/ipc: move target characteristics out of config flags
They don't belong there, executor does not know about them.
In preparation for future changes.
2019-11-16 09:58:54 +01:00
Dmitry Vyukov
aa27601f9e pkg/host: rename some features
Rename some features in preparation for subsequent changes
which will align names across the code base.
2019-11-16 09:58:54 +01:00
Dmitry Vyukov
157653cfe7 pkg/csource: rename some options
Rename some options in preparation for subsequent changes
which will align names across the code base.
2019-11-16 09:58:54 +01:00
Dmitry Vyukov
690740b4a4 executor: refactor sandbox flags
In preparation for future changes.
2019-11-16 09:58:54 +01:00
Dmitry Vyukov
a6e3054436 executor: rename some macros
Rename some macros in preparation for subsequent changes
which will align names across the code base.
2019-11-16 09:58:54 +01:00
Dmitry Vyukov
ca13dd2ab5 pkg/csoruce: test that executor does not mis-spell any of the SYZ_* macros 2019-11-16 09:58:54 +01:00
Dmitry Vyukov
2ac1d00f55 executor: rename some flags
Rename some flags in preparation for subsequent changes
which will align names across the code base.
2019-11-16 09:58:54 +01:00
Dmitry Vyukov
531b5368e2 executor: remove pointless macro checks
common_bsd.h is used for 3 OSes, so checking if it's
any of these 3 OSes is pointless. Remove these checks.
2019-11-16 09:58:54 +01:00
Dmitry Vyukov
8d85129b3c pkg/host: split files into syscalls/features
pkg/host does 2 things: detects supported syscalls and supported features.
There is enough code for each for a separate file.
2019-11-16 09:58:54 +01:00
Dmitry Vyukov
b5c36524a2 sys/targets: add HostFuzzer flag
Move HostFuzzer from vm/qemu.
It's needed in a number of other packages
and strictly saying is not specific to qemu
(it just happened that both fuchsia and akaros only support qemu).
2019-11-16 09:58:54 +01:00
Jiri Pirko
cdac920beb executor: consider NLMSG_DONE type in netlink_send_ext()
In case the dump is empty, NLMSG_DONE type message is received from
kernel right away. Count with this and return 0. Set the reply_len to 0.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Fixes: f350e2dc1f ("executor: rename devlink port netdevices to defined names")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-15 15:58:48 +01:00
Andrey Konovalov
90f3b019e4 executor, pkg/host: update usb raw-gadget interface
The patches are being upstreamed and the interface has changed.
2019-11-15 14:53:30 +01:00
Andrey Konovalov
be7a4ab6d8 tools/syz-usbgen: update patch to dump usb ids
The patch doesn't properly work on some kernels, some ids might not be printed.
2019-11-15 14:45:46 +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
David Pursell
79248ee88b sys/fuchsia: remove deprecated exception APIs
The port-based exception APIs have been deprecated on Fuchsia and will
be removed shortly. Delete them from the syscall definitions and
modify the Fuchsia executor to use the new channel-based APIs instead.
2019-11-14 16:21:01 -08:00
David Pursell
a3f5ce76b1 sys/fuchsia: fix Fuchsia extract/generate
Updates some paths and add zx_eventpair type definition to fix
`make extract` and `make generate`.
2019-11-14 16:21:01 -08:00
Kamil Rytarowski
a24fe792a6 Correct parsing of Kernel ASan reports
Handle __asan strings in backtraces.
2019-11-14 18:48:40 +01:00
Jiri Pirko
5d15a96786 sys/linux/socket.txt: add devlink pci related netdev
Add netdev name related to pci netdev and fix comment for netdevsim0.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-14 09:21:37 +01:00
Jiri Pirko
f350e2dc1f executor: rename devlink port netdevices to defined names
Devlink port netdevices stay in the form of eth%d. Rename then to
defined names so they could be used for system calls.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-14 09:21:37 +01:00
Jiri Pirko
7209952f67 executor: pass struct nlmsg to netlink_* helpers
Don't rely on global "nlmsg" struct and rather pass the structure to
netlink_* helpers. That allows to possibly work with multiple netlink
messages (sending while receiving for example) at the same time.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-14 09:21:37 +01:00
Jiri Pirko
2b6d94ac9b executor: extend netlink_device_change() to allow name changes
Extend existing helper netlink_device_change() in order to allow to
change netdevice names.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-14 09:21:37 +01:00
Jiri Pirko
966d14f910 executor: identify netdev by ifindex in netlink_device_change()
IFLA_NAME is going to be used to set the name of the netdevice, so
change the handle to be ifindex.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-14 09:21:37 +01:00
Jiri Pirko
d5f798b079 executor: push out devlink generic netlink id getter into a separate function
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-14 09:21:37 +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
31b7aac462 pkg/report: ignore boot warning that always happens
Happens on every boot and prevents detection of other bugs.
The warning was already reported upstream:
https://groups.google.com/forum/#!msg/syzkaller-bugs/8HZdIbi8sdE/Niu4qijeAAAJ
https://syzkaller.appspot.com/bug?extid=4d497898effeb1936245
2019-11-08 13:38:31 +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
Mark Johnston
5e1ad02b17 pkg/csource: Force promotion of 64-bit constant values
Constant 64-bit arguments to the variadic syscall(2) must have their
width specified explicitly.  In practice this is not necessary most of
the time, but on amd64/freebsd with clang the compiler can and does
store the constant 32-bit value to the stack, leaving garbage in the
upper 32 bits.

This makes C reproducers somewhat uglier, but I see no other solution.
2019-11-08 10:51:32 +01:00
Dmitry Vyukov
1e35461e02 pkg/report: trim panic_on_warn set few lines earlier
The KCSAN reports can be quite short.
Now with task contexts we can hopefully reduce the threshold a bit.
2019-11-08 07:51:25 +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
Dmitry Vyukov
f158761183 pkg/csource: don't run tests if compiler is broken
Test presence of a working compiler before running any tests for a target.
This helps to make tests pass even if some cross-compilers are not installed properly.
2019-11-07 11:07:00 +01:00
Dmitry Vyukov
b17cbe9d11 sys/targets: don't run flag tests on non-build OS
We should not try to do any builds for such targets anyway.
And the compiler does not have to exist/work.
2019-11-07 11:06:56 +01:00
Dmitry Vyukov
0281aea335 sys/linux: fix up some int64 syscall args
See the discussion on #1493.
These args are actually intptr's.
2019-11-07 11:06:48 +01:00
Dmitry Vyukov
d797d2018f pkg/report: fix up panic handling
Obviously there is an exception to every exception in kernel output parsing...
2019-11-06 18:06:12 +01:00
Dmitry Vyukov
da505f84d3 pkg/report: detect syzkaller panics in lost connection bugs
Some syzkaller panics happen due to memory corruptions,
but it still would be useful at least to get some visibility into these crashes.
On some OSes we actualy already detect them as they have "panic:" oops pattern,
but not e.g. on linux.

Fixes #318
2019-11-06 11:41:05 +01:00
Dmitry Vyukov
424cf6e8a1 pkg/build: add build signatures
Add optional build signature for images, currently only implemented for linux.
This can be used in bisection process to detect changes that does not affect kernel.

Update #1271
2019-11-06 11:41:05 +01:00
Dmitry Vyukov
c487cd4633 pkg/build: refactor Image function arguments
Image takes too many arguments, so we need to do lots of forwarding,
adding new argumnets is painful and most OSes are not interested
in lots of arguments.
Combine all arguments into a params struct.
2019-11-06 11:41:05 +01:00
Andrey Konovalov
bc2c6e45b9 sys/linux: update usb runtests
Add a test that issues multiple syz_usb_ep_write calls.
Update hiddev test to use a wider used hid driver.
2019-11-05 16:45:35 +01:00