aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/osutil
Commit message (Collapse)AuthorAgeFilesLines
* pkg/report: handle syzkaller binariesDmitry Vyukov2017-12-121-0/+1
| | | | syzkallerNNN binaries are coming from pkg/repro.
* pkg/osutil: properly set gid for sandboxingDmitry Vyukov2017-11-171-11/+25
|
* pkg/kernel: sandbox make invocationDmitry Vyukov2017-11-177-2/+110
|
* pkg/osutil: don't leace runaway processesDmitry Vyukov2017-11-168-17/+66
| | | | | | When manager is stopped there are sometimes runaway qemu processes still running. Set PDEATHSIG for all subprocesses. We never need child processes outliving parents.
* all: basic building on netbsdDmitry Vyukov2017-10-232-1/+3
| | | | | This just makes make TARGETOS=netbsd succeed. We don't yet have prog target for netbsd.
* executor, pkg/ipc: unify ipc protocol between linux and other OSesDmitry Vyukov2017-10-168-28/+170
| | | | | | | | | | | | | | | | | We currently use more complex and functional protocol on linux, and a simple ad-hoc protocol on other OSes. This leads to code duplication in both ipc and executor. Linux supports coverage, shared memory communication and fork server, which would also be useful for most other OSes. Unify communication protocol and parametrize it by (1) use of shmem or only pipes, (2) use of fork server. This reduces duplication in ipc and executor and will allow to support the useful features for other OSes easily. Finally, this fixes akaros support as it currently uses syz-stress running on host (linux) and executor running on akaros.
* pkg/ipc, pkg/osutil: remove filepath.Abs fuchsia workaroundsDmitry Vyukov2017-10-121-8/+0
| | | | | This claimed to be fixed: https://fuchsia.atlassian.net/browse/DNO-158
* all: basic freebsd supportDmitry Vyukov2017-10-021-1/+1
| | | | For now we just make Go part build for freebsd.
* syz-fuzzer: use osutil.HandleInterrupts instead of custom codeDmitry Vyukov2017-10-021-1/+1
| | | | | We already have osutil.HandleInterrupts for this. Simplifies porting to new OSes.
* pkg/osutil: windows portDmitry Vyukov2017-09-254-28/+35
|
* all: more assorted fuchsia supportDmitry Vyukov2017-09-223-20/+37
|
* syz-manager, syz-hub: share repros between managers via hubDmitry Vyukov2017-08-071-0/+10
| | | | | | | | | | | | | | | | | Currently hub allows managers to exchange programs from corpus. But reproducers are not exchanged and we don't know if a crash happens on other managers as well or not. Allow hub to exchange reproducers. Reproducers are stored in a separate db file with own sequence numbers. This allows to throttle distribution of reproducers to managers, so that they are not overloaded with reproducers and don't lose them on restarts. Based on patch by Andrey Konovalov: https://github.com/google/syzkaller/pull/325 Fixes #282
* pkg/kernel: actually pass cmdline/sysctl files to the build scriptDmitry Vyukov2017-07-171-0/+11
|
* pkg/osutil: don't depend on syscall in appengine buildDmitry Vyukov2017-07-035-81/+96
| | | | | | Dashboard app now depends on osutil through config package. Reshuffle functions so that the package does not depend on syscall in appengine build.
* all: use consistent file permissionsDmitry Vyukov2017-07-034-7/+215
| | | | | | | | | | | | | | | | Currently we have unix permissions for new files/dirs hardcoded throughout the code base. Some places use 0644, some - 0640, some - 0600 and a variety of other constants. Introduce osutil.MkdirAll/WriteFile that use the default permissions and use them throughout the code base. This makes permissions consistent and also allows to easily change the permissions later if we change our minds. Also merge pkg/fileutil into pkg/osutil as they become dependent on each other. The line between them was poorly defined anyway as both operate on files.
* pkg/osutil: port to darwinDmitry Vyukov2017-06-263-3/+29
|
* pkg/osutil: add FilesExist/CopyFiles/LinkFiles functionsDmitry Vyukov2017-06-201-0/+70
| | | | Will be required by the new build system.
* pkg/osutil: fix IsExistDmitry Vyukov2017-06-191-1/+1
| | | | | Currently it returns true for "/some/existing/file/foo" because that returns ENOTDIR.
* pkg/osutil: add helper function for SIGINT handlingDmitry Vyukov2017-06-191-0/+19
|
* pkg/osutil: add IsExist helper functionDmitry Vyukov2017-06-172-0/+24
|
* vm: overhaulDmitry Vyukov2017-06-031-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VM infrastructure currently has several problems: - Config struct is complete mess with a superset of params for all VM types - verification of Config is mess spread across several places - there is no place where VM code could do global initialization like creating GCE connection, uploading GCE image to GCS, matching adb devices with consoles, etc - it hard to add private VM implementations such impl would need to add code to config package which would lead to constant merge conflicts - interface for VM implementation is mixed with interface for VM users this does not allow to provide best interface for both of them - there is no way to add common code for all VM implementations This change solves these problems by: - splitting VM interface for users (vm package) and VM interface for VM implementations (vmimpl pacakge), this in turn allows to add common code - adding Pool concept that allows to do global initialization and config checking at the right time - decoupling manager config from VM-specific config each VM type now defines own config Note: manager configs need to be changed after this change: VM-specific parts are moved to own "vm" subobject. Note: this change also drops "local" VM type. Its story was long unclear and there is now syz-stress which solves the same problem.
* pkg/kernel: add new packageDmitry Vyukov2017-06-031-0/+36
Move functionality to build kernel/image from syz-gce to a separate package.