Commit Graph

4446 Commits

Author SHA1 Message Date
Denis Efremov
e89749efe8 sys/linux: run "make generate" for smack
Signed-off-by: Denis Efremov <efremov@linux.com>
2019-11-22 09:14:41 +01:00
Denis Efremov
dd653133d5 sys/linux: extract constants for smack.txt
Signed-off-by: Denis Efremov <efremov@linux.com>
2019-11-22 09:14:41 +01:00
Denis Efremov
159175a74a sys/linux: update smack descriptions
Add descriptions for /sys/fs/smackfs/* interfaces.

Signed-off-by: Denis Efremov <efremov@linux.com>
2019-11-22 09:14:41 +01:00
Shiyu Sun
8098ea0f33 docs: update syscall_descriptions.md and contributing.md
Add suggestions for running make install_prerequisites.
2019-11-20 09:54:55 +01:00
Dmitry Vyukov
12be8ffc87
docs: clarify what tree should be used for make extract
Clarify what tree should be used for make extract for Linux.
2019-11-20 09:41:50 +01:00
Matthew Dempsky
f4b7ed0781 tools/fuchsia: remove custom Go toolchain scripts
These used to be required to build Fuchsia's Go toolchain to build
syz-fuzzer to run on Fuchsia. However, Fuchsia now uses HostFuzzer
mode, so only syz-executor (written in C) needs to run on Fuchsia; all
Go code runs on the Host OS (currently Linux).
2019-11-19 17:20:14 -08:00
Andrey Konovalov
b7a277d2ba executor: extend USB debug messages
When USB_DEBUG is enabled, syzkaller crashes on unknown USB requests.
This helps to find missing descriptions for particular USB classes.
2019-11-19 15:33:25 +01:00
Denis Efremov
e9c47538a4 executor: add missing includes
stdbool.h is required by initialize_devlink_ports(): true define.
fcntl.h is required by initialize_devlink_pci(): O_RDONLY define.

Signed-off-by: Denis Efremov <efremov@linux.com>
2019-11-19 11:38:19 +01:00
Jann Horn
432c7650d5 pkg/report: generalize general protection fault pattern
An upcoming patch for Linux will change the error reporting pattern for
general protection faults such that the colon doesn't necessarily come
immediately after the string "general protection fault" (see
https://lore.kernel.org/lkml/20191118142144.GC6363@zn.tnic/).
Change the pattern in syzkaller before that happens.

Note that this is not necessarily the final format; in particular, the
ordering of the KASAN note and the "general protection fault" line might
swap.
2019-11-19 08:07:30 +01:00
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