aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource
Commit message (Collapse)AuthorAgeFilesLines
...
* executor: tweaks for better 9p testingDmitry Vyukov2018-07-081-2/+8
| | | | See the added comments.
* prog, pkg/compiler: support fmt typeDmitry Vyukov2018-07-082-37/+67
| | | | | fmt type allows to convert intergers and resources to string representation.
* executor: executor fix fuchsia buildDmitry Vyukov2018-07-071-0/+1
|
* executor: repair akaros supportDmitry Vyukov2018-07-051-34/+89
|
* pkg/csource: disable most features on akarosDmitry Vyukov2018-07-051-8/+8
| | | | Akaros does not support tun, fault injections, sandboxes, etc.
* executor: remove unnecessary parensDmitry Vyukov2018-07-051-1/+1
|
* pkg/csource: prevent unused-result warningsDmitry Vyukov2018-07-021-2/+2
| | | | | | Warnings for write unused-result fire on travis, somehow I don't get them locally. Use the result in a fake way to prevent the warning.
* executor: include more headers on fuchsiaDmitry Vyukov2018-06-301-0/+2
| | | | | Since we are taking address of functions in syscall table, we need all headers even if we don't use them directly.
* pkg/csource: account for different types of syscalls on fuchsiaDmitry Vyukov2018-06-301-5/+10
|
* pkg/csource: don't use pthread_cond_timedwait for fuchsiaDmitry Vyukov2018-06-301-25/+8
| | | | We removed it in executor, do the same in csource.
* executor, pkg/ipc: support output over pipesDmitry Vyukov2018-06-291-1/+1
|
* executor: fix pid check after forkDmitry Vyukov2018-06-291-2/+2
|
* pkg/csource: support fuchsiaDmitry Vyukov2018-06-2911-124/+868
| | | | Lots of assorted heavylifting to support csource on fuchsia.
* executor: don't crash during tun setup if ipv6 is not enabledDmitry Vyukov2018-06-261-4/+4
| | | | | Some options that tun initialization sets up are optional. Don't fail if they are missing in kernel.
* executor: rework fallback coverageDmitry Vyukov2018-06-221-2/+2
| | | | | | | | | | We have fallback coverage implmentation for freebsd. 1. It's broken after some recent changes. 2. We need it for fuchsia, windows, akaros, linux too. 3. It's painful to work with C code. Move fallback coverage to ipc package, fix it and provide for all OSes.
* executor: handle case when AF_INET is not enabledDmitry Vyukov2018-06-221-4/+28
| | | | No AF_INET is somewhat crazy, but why not.
* executor: always use errors=continue when mounting ext2/3/4Dmitry Vyukov2018-06-111-5/+16
| | | | | | | For ext2/3/4 we have to have errors=continue because the image can contain errors=panic flag and can legally crash kernel. Fixes #599
* executor: make syscall table and number constantDmitry Vyukov2018-06-074-8/+0
| | | | | | | | | We see some crashes that suggest corruption of the syscall number: invalid command number 1296 (errno 11) invalid command number 107 (errno 110) Make the table and the number constant to prevent corruption.
* pkg/csource: allow to build source fom memoryDmitry Vyukov2018-06-062-16/+26
| | | | | | In most cases we have source in memory, so provide a function to build right from memory without creating temp files.
* Makefile, sys/targets: move all native compilation logic to sys/targetsDmitry Vyukov2018-06-063-9/+5
| | | | | | | | | | | | | | | We currently have native cross-compilation logic duplicated in Makefile and in sys/targets. Some pieces are missed in one place, some are in another. Only pkg/csource knows how to check for -static support. Move all CC/CFLAGS logic to sys/targets and pull results in Makefile. This should make Makefile work on distros that have broken x86_64-linux-gnu-gcc, now we will use just gcc. And this removes the need to define NOSTATIC, as it's always auto-detected. This also paves the way for making pkg/csource work on OSes other than Linux.
* pkg/csource: minimize netdevices and net resetDmitry Vyukov2018-05-174-20/+48
| | | | | | Add separate options to minimize netdevices setup and net namespace reset. Fixes #581
* pkg/csource: serialize options into jsonDmitry Vyukov2018-05-172-17/+43
| | | | | Current format is painful to parse after changes. Switch to json.
* pkg/osutil: introduce TempFile helperDmitry Vyukov2018-05-141-11/+9
| | | | Introduce TempFile helper and use it in several packages.
* executor: fix strncpy compile errorIoana Ciornei2018-05-131-1/+1
| | | | | | | | | gcc8 is stricter when dealing with strings and strncpy and demands that the size of the actual string to be copied to be explicitly smaller than the size of the destination, just to make sure the NULL terminator is taken into considerantion. This patch fixes the issue. Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
* pkg/csource: fix test exit codeDmitry Vyukov2018-05-071-1/+1
|
* pkg/csource: skip tests under race detectorDmitry Vyukov2018-05-071-0/+23
| | | | | csource tests consume too much memory under race detector (>1GB), and periodically timeout on Travis. So we skip them.
* pkg/csource: reduce test sizeDmitry Vyukov2018-05-071-4/+6
| | | | | | | The test times out on travis: https://travis-ci.org/google/syzkaller/jobs/375965899 https://travis-ci.org/google/syzkaller/jobs/375965900
* gometalinter: enable line length checkingDmitry Vyukov2018-05-042-16/+23
| | | | | | | 120 columns looks like a reasonable limit and requires few changes to existing code. Update #538
* gometalinter: enable package comment checkingDmitry Vyukov2018-05-035-4/+8
| | | | Update #538
* pkg/scource: rename compiled binary to syz-executorDmitry Vyukov2018-04-241-1/+3
| | | | | | We call the binary syz-executor because it sometimes shows in bug titles, and we don't want 2 different bugs for when a crash is triggered during fuzzing and during repro.
* executor: don't fail when ipv6 is not enabledDmitry Vyukov2018-04-201-1/+7
| | | | | | Check in checkpoint_iptables is not enough as reset_iptables will fail even if no tables enabled. Add similar check to reset_iptables.
* executor: increase max image size to 128MBDmitry Vyukov2018-04-191-3/+3
| | | | Images of some filesystems need to be that large (xfs, btrfs, f2fs).
* executor: don't fail if IPv6 is not enabledDmitry Vyukov2018-04-161-1/+7
|
* executor: add two slave interfaces for bridge,bond,teamHangbin Liu2018-04-131-4/+17
| | | | | | | | Bridge device is used for forwarding. Bond/team device is used for load balance and fail over. So it would make more sense to add two slave interfaces for these devices. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
* sys/linux: add veth devices to devnamesDmitry Vyukov2018-04-111-1/+0
| | | | Also comment new veth code for future me.
* executor: add salve interface for bond0/team0Hangbin Liu2018-04-111-2/+6
| | | | | | | | | | | | Add a veth pair with name bond/team_slave and set their master to bond0/team0. Remove veth from devtypes because the cmd `ip link add veth0 type veth` will actually failed with "RTNETLINK answers: File exists" and no veth interface created. When create veth device, kernel will create a pair of veth, so no need to create them one by one. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
* executor: create team deviceDmitry Vyukov2018-04-061-6/+8
|
* sys/linux: test various binfmt's in execveDmitry Vyukov2018-04-021-0/+13
|
* executor: fix unchecked result warningDmitry Vyukov2018-04-011-1/+3
|
* sys/linux: add support for reading partition tablesDmitry Vyukov2018-04-012-4/+94
|
* executor: fix compilation warningsDmitry Vyukov2018-03-302-15/+9
| | | | | | | | SYS_memfd_create define produces warning in scource if system headers already contain the definition (we strip all ifdefs!). The same is true for CLONE_NEWCGROUP but we just never hit it yet. Also fix format string for 32 bits. Also fix potential uninit var in csource, and a missing new line.
* sys/linux: add support for mounting filesystem imagesDmitry Vyukov2018-03-302-3/+137
|
* executor: rework cgroups supportDmitry Vyukov2018-03-271-32/+23
| | | | | | | | | | Turns out creating a cgroup per test is too expensive. Moreover, it leads to hanged tasks as cgroup destruction is asynchronous and overloads kernel work queues. Create only a single cgroup per proc, but restrict descriptions to mess with that single group, instead test processes create own nested cgroups for messing.
* executor: fix reset of bridge netfilterDmitry Vyukov2018-03-251-0/+2
| | | | We left entries non-zero, so memcmp always failed.
* sys/linux: add cgroup descriptionsDmitry Vyukov2018-03-259-92/+360
|
* sys/linux: add netlink fou descriptionsDmitry Vyukov2018-03-211-0/+54
|
* all: fix gometalinter warningsDmitry Vyukov2018-03-083-5/+5
| | | | Fix typos, non-canonical code, remove dead code, etc.
* executor: fix ifdef's for csourceDmitry Vyukov2018-03-074-5/+9
| | | | | | | There is test failure on travis: https://travis-ci.org/google/syzkaller/jobs/349948391 I can't reproduce it locally, and it only happened on 1.8, but not on 1.9? But this seems to be what could have provoked such failure.
* executor: fix includesDmitry Vyukov2018-03-054-4/+24
| | | | | | We use errno, vaargs, printf in all of fail/error/exitf, but we include the corresponding headers only when SYZ_USE_TMP_DIR. Include them whenever fail/error/exitf are used.
* sys/linux: add syz_init_net_socket syscallDmitry Vyukov2018-03-054-13/+60
| | | | | | | | | | | The new pseudo syscall allows opening sockets that can only be created in init net namespace (BLUETOOTH, NFC, LLC). Use it to open these sockets. Unfortunately this only works with sandbox none at the moment. The problem is that setns of a network namespace requires CAP_SYS_ADMIN in the target namespace, and we've lost all privs in the init namespace during creation of a user namespace.