aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/host/host_openbsd.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/vminfo: move feature checking to hostDmitry Vyukov2024-05-151-38/+0
| | | | | | | | | | | | | | | | | Feature checking procedure is split into 2 phases: 1. syz-fuzzer invokes "syz-executor setup feature" for each feature one-by-one, and checks if executor does not fail. Executor can also return a special "this feature does not need custom setup", this allows to not call setup of these features in each new VM. 2. pkg/vminfo runs a simple program with ipc.ExecOpts specific for a concrete feature, e.g. for wifi injection it will try to run a program with wifi feature enabled, if setup of the feature fails, executor should also exit with an error. For coverage features we also additionally check that we actually got coverage. Then pkg/vminfo combines results of these 2 checks into final result. syz-execprog now also uses vminfo package and mimics the same checking procedure. Update #1541
* all: adapt to how mmapping a kcov instance works in LinuxAleksandr Nogikh2021-12-091-0/+1
| | | | | | | | | | | | | | | | | | | | It turns out that the current Linux implementation of KCOV does not properly handle multiple mmap invocations on the same instance. The first one succeedes, but the subsequent ones do not actually mmap anything, yet returning no error at all. The ability to mmap that memory multiple times allows us to increase syz-executor performance and it would be a pity to completely lose it (especially given that mmapping kcov works fine on *BSD). In some time a patch will be prepared, but still we will have to support both versions at the same time - the buggy one and the correct one. Detect whether the bug is present by writing a value at the pointer returned by mmap. If it is present, disable dynamic kcov mmapping and pre-mmap 5 instances in the main() function - it should be enough for all reasonable uses. Otherwise, pre-mmap 3 and let syz-executor mmap them as needed.
* executor: enable extra coverage on OpenBSDAnton Lindqvist2020-08-111-0/+1
| | | | This reverts commit 63a7334112fa63edb0c0a3f317d3d92135a6ead9.
* Revert "executor: enable extra coverage on OpenBSD"Anton Lindqvist2020-08-021-1/+0
| | | | | | | Forgot that the build machine must be updated with a newer OpenBSD snapshot first in order to make the new kcov stuff available. This reverts commit 96dd36234d97bbf6b403f3a7f03cfc0296422879.
* executor: enable extra coverage on OpenBSDAnton Lindqvist2020-08-021-0/+1
| | | | | | Recently added[1] to the kcov implementation on OpenBSD. [1] https://github.com/openbsd/src/commit/8430bc4bce9f93dce843b53971377b7afd96cdb1
* pkg/host: rename some featuresDmitry Vyukov2019-11-161-1/+1
| | | | | Rename some features in preparation for subsequent changes which will align names across the code base.
* sys/openbsd: add vmm descriptions (#1152)Anton Lindqvist2019-05-011-0/+17
| | | | | | | Most probably limited to input validation for now. In the future, it could be extended to provide a bootable kernel during vm create (/bsd) and turn vmid into a proper resource. The OpenBSD VMs on GCE does support vmm(4).
* pkg/host: enable FeatureComparisons on OpenBSDAnton Lindqvist2019-01-211-0/+1
|
* fuzzer: speed up syscall support detectionAndrey Konovalov2019-01-081-1/+1
| | | | | | | Right now syz-fuzzer does a search through /proc/kallsyms for each syscall to check whether it's supported. Do one search instead and save the results to a map. This speeds up syscall detection ~60 times when testing arm64 kernel on x86. Also add another search pattern for arm64 and add some logging.
* executor: reapply setuid sandbox for bsdGreg Steuck2018-12-111-0/+1
| | | | | | | | | | * Revert "Revert "executor: add setuid sandbox for openbsd"" The problem is the low file descriptor limit. This reverts commit 4093e33b1338f274ae0062f555de9d6af8640d61. * executor/executor make sure the file descriptor limit is sufficient
* Revert "executor: add setuid sandbox for openbsd"Greg Steuck2018-12-101-1/+0
| | | | This reverts commit 6565f24da9f4eb36702339ba290213995fcc902f.
* executor: add setuid sandbox for openbsdGreg Steuck2018-12-101-0/+1
| | | | | | | | | | * executor/common_bsd: add setuid sandbox Fixes #833 cc @mptre * Reduced duplications, resolved TODO.
* openbsd: enable packet injectionGreg Steuck2018-11-191-0/+1
|
* Add mandatory OpenBSD bits (#689)Anton Lindqvist2018-08-281-0/+16
all: add openbsd support squash of the following commits: * openbsd: add mandatory bits * report: add OpenBSD support * executor: skip building kvm on OpenBSD * executor: add OpenBSD support Linking against libutil is necessary due to usage of openpty(3). * executor: fix typo in fail() message * fixup! report: add OpenBSD support * fixup! openbsd: add mandatory bits * fixup! openbsd: add mandatory bits * fixup! openbsd: add mandatory bits * fixup! report: add OpenBSD support * gometalinter: skip sys/openbsd