3779 Commits

Author SHA1 Message Date
Dmitry Vyukov
30e50d7959 sys/akaros: rename syscall argument
In preparation for making syscall a reserved name.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
cd3454ba97 sys/linux: improve btf descriptions
Now that we have the len path expressions we can fix the TODO
in btf descriptions to properly specify offsets of btf sections.

Also add proper descriptions for btf type section
and few other minor things around.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
93dcf0adc8 prog: implement complex len target support
This actually implements support for complex len targets
during program generation and mutation.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
16c881ad85 pkg/compiler: generate complex len targets
Change the generated format for len type to support multiple path elements.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
eea28fee30 pkg/compiler: support complex len targets
This change adds compiler support for complex path
expressions in len targets. E.g. it allows to refer
to a sibling field as len[parent_struct:field:another_field].
See the docs change for details.

This is just a compiler change.
The feature is not yet supported by the prog package.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
1886b2a481 pkg/ast: refactor COLON handling
This prepared for handling of bytesize[parent:foo:bar] expressions
by allowing multiple identifiers after colon.
No functional changes for now, just preparation for storing more
than one identifier after colon.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
354b388e08 sys/test: remove a leftover file 2019-05-14 19:28:01 +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
9251289f14
Update README.md 2019-05-14 14:31:21 +02:00
Anton Lindqvist
ada3c44cd1 sys/openbsd: prevent changing mutability flags on files (#1174)
This is especially problematic for file descriptors referring to tty/pty
devices since it can cause the SSH connection to the VM to die.

The ambition here is reduce the number of "lost connection/no output" failures
at the cost of limiting the coverage of chflags(2).
2019-05-13 18:14:26 -07:00
Mark Johnston
658d756383 vm/bhyve: ensure the VM is destroyed after closing 2019-05-13 20:23:56 -04: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
69423a1d41 pkg/email: allow commands in subject
Several users attempted this and there does not seem
to be any reason to not allow this.
So parse out command from subject as well.
2019-05-13 14:15:14 +02:00
Dmitry Vyukov
92d5fb8ed3 tools/syz-bisect: add usage docs 2019-05-13 13:04:01 +02:00
Dmitry Vyukov
000f08bb18 sys/linux: switch ppc64le to little-endian
make extract recently broke for powerpc on linux-next with:

include/uapi/linux/byteorder/big_endian.h:6:2: error: #error "Unsupported endianness, check your toolchain"
 #error "Unsupported endianness, check your toolchain"

Turns out we always built ppc64le headers as big-endian.
First, kernel was configured as BE.
Then, we used gcc to build an executable program for host
and on x86 gcc does not define __LITTLE_ENDIAN__ so kernel
thought that the toolchain is BE too.

Configure kernel as LE and define __LITTLE_ENDIAN__.

This actually changes values of some consts,
but fortunately just few of them.
2019-05-13 10:26:57 +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
Greg Steuck
ddba9a616e
pkg/instance: break the line to appease linter (#1173)
* pkg/instance: break the line to appease linter

* fix up format
2019-05-12 23:38:17 -07:00
Anton Lindqvist
16ab1e89e3 docs/openbsd: update found_bugs.md (#1172) 2019-05-12 12:32:12 -07:00
Anton Lindqvist
5f302c04a2 sys/openbsd: add missing padding arguments
Due to missing padding arguments, stack garbage could end up being used as
actual arguments. More reading for the curious[1].

While here, add missing descriptions for pread and pwrite.

[1] https://flak.tedunangst.com/post/syzkaller-found-a-bug
2019-05-12 14:03:04 +02:00
Dmitry Vyukov
45065351dd syz-ci: fix variable shadowing
gometalinter says:
syz-ci/jobs.go:516:⚠️ declaration of "rep" shadows declaration at syz-ci/jobs.go:505 (vetshadow)
2019-05-12 11:42:33 +02:00
Dmitry Vyukov
39449875b6 syz-ci: don't assume kernel config is called .config
.config is linux-ism. We have a convention that kernel config
is copied to kernel.config file. Use it.
2019-05-12 11:38:18 +02:00
Anton Lindqvist
c017728b48 sys/openbsd: avoid raw root disk node creation (#1171)
Writing to the raw root disk could lead to all kinds of corruptions[1].

[1] https://flak.tedunangst.com/post/syzkaller-found-a-bug
2019-05-11 13:10:47 -07:00
Mark Johnston
0637a7f088 Add a bhyve VM backend (#1150)
* vm: add bhyve support

bhyve is FreeBSD's native hypervisor.  Because it is missing snapshot
support and user networking, some additional configuration on the host
is required.  However, unlike QEMU on FreeBSD, bhyve can make use of
hardware virtualization features and is thus faster.

* docs/freebsd: document bhyve support
2019-05-11 19:38:53 +02:00
Dmitry Vyukov
46caad9460 sys/linux: add few new bpf consts 2019-05-10 15:39:27 +02:00
Dmitry Vyukov
16c44697b5 sys/linux: add definitions of fsopen, fspick, fsconfig, fsmount, move_mount syscalls 2019-05-10 15:21:16 +02:00
Dmitry Vyukov
cfeec85937 sys/linux: add new consts/flags/fields here and there
Add a bunch of new small interfaces in 5.2: new consts, flags, fields, etc.
2019-05-10 14:31:20 +02:00
Dmitry Vyukov
f5cecf2e32 sys/linux: add new fou attributes 2019-05-10 13:18:51 +02:00
Dmitry Vyukov
0a05e35530 sys/linux: add description of open_tree syscall 2019-05-10 13:13:46 +02:00
Dmitry Vyukov
4af714615a sys/linux: regenerate consts on the latest linux-next tree
Fuse version was bumped.
2019-05-10 13:06:50 +02:00
Dmitry Vyukov
c1718ecf4e sys/linux: fix alignment of cmsghdr_sock
All cmsg's must be intptr aligned within the array.
2019-05-10 13:05:04 +02:00
Dmitry Vyukov
da22883527 prog: fix TestTransitivelyEnabledCalls
We now have io_uring on all arches so remove the hack.
2019-05-10 13:04:27 +02:00
Kaipeng Zeng
c2aed7c7e3 sys/linux: update descriptions of sendmsg/sendmmsg
Fix the descriptions of cmsghdr.
Add sendmsg$sock and sendmmsg$sock for __sock_cmsg_send.
2019-05-10 13:00:44 +02:00
Dmitry Vyukov
8f24b7d63e syz-ci: always use 10 VMs for bisection
If a manager has less then 10 VMs override it to 10 for bisection.
If a manager has only 1 VM, bisection won't end well.
2019-05-10 11:06:17 +02:00
Dmitry Vyukov
4e7ecf0713 pkg/report: preserve trackback from other CPUs
For some bug types kernel produces traceback of all CPUs
(which is presumably useful for these crashes).
However, we currently throw it away because it has context
different from the oops context.
Detect such traceback and preserve output.
2019-05-10 10:31:07 +02:00
Dmitry Vyukov
e551e0ce0d pkg/report: remove debugging leftover 2019-05-10 10:31:07 +02:00
Dmitry Vyukov
7143d0bc86 syz-ci: improve test result aggregation
If there is a crash with a report, prefer it to crashes without report.
2019-05-10 10:31:07 +02:00
Dmitry Vyukov
364acbc23b syz-ci: add tests for test result aggregation
Factor out patch testing result aggregation and add tests.
2019-05-10 10:31:07 +02:00
Greg Steuck
018207ef2f
tools/create-openbsd-vmm-worker.sh: set location to cd0 for consistency (and speed) (#1168) 2019-05-09 12:46:24 -07:00
Greg Steuck
a7aeccd44b
tools/create-openbsd-gce-ci.sh: explicitly specify sets location (#1167)
The previous default must have changed resulting in apparent failure
to install siteXX.tgz. The observable symptom was:
`Package installation failed. Inspect install_log.`
2019-05-09 10:40:00 -07:00
Dmitry Vyukov
214bf476d3 pkg/report: improve format of "locking bug" reports 2019-05-09 15:04:17 +02:00
Dmitry Vyukov
6fc130d361 pkg/report: add new format of kernel page faults 2019-05-09 14:33:39 +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
Andrew Donnellan
98ec0fac71 pkg/host: Add test for kallsymsRenameMap
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
2019-05-08 16:52:55 +02:00
Andrew Donnellan
2697cc88bb pkg/host: Add stat to kallsyms rename map
On powerpc, the "stat" syscall is implemented by "sys_newstat" entry point.
This causes a test failure as we can't find "sys_stat" in kallsyms.

Add "stat" -> "newstat" to the kallsyms rename map to work around this.

Closes: #1083 ("pkg/host: TestSupportedSyscalls fails on ppc64le")
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
2019-05-08 16:52:55 +02:00
Andrey Konovalov
f8f0147ff7 pkg/report: don't mark unknown oopses as corrupted 2019-05-08 16:50:27 +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 9ad9ef29caa52714dd5faff167e4b61643e40a7e
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
a7383bfac1 Makefile: enable 386 executor build in presubmit
This hacky way to install 386 packages seems to unbreak executor build.
2019-05-07 18:01:24 +02:00
Dmitry Vyukov
04165d8f66 Makefile: enable arm executor build in presubmit
arm build seems to work now on Travis since we switched to xenial.
2019-05-07 18:01:24 +02:00
Dmitry Vyukov
84fd26e585 executor: fix 32-bit build
Syscall args can't be printed with %lx now.
Cast them to uint64 for now since we have only 2 such places.
2019-05-07 18:01:24 +02:00