aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/host/syscalls_linux_test.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/vminfo: move feature checking to hostDmitry Vyukov2024-05-151-307/+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: go fix everythingDmitry Vyukov2024-04-261-1/+0
|
* pkg/host: don't expect open and stat syscalls to be always presentAleksandr Nogikh2023-01-181-2/+0
| | | | They do not exist on ARM64 Linux and break syzkaller tests on them.
* pkg/host: only try enabled syscalls when starting syz-fuzzerKris Alder2022-03-081-6/+10
| | | | | | | | | | | When syz-fuzzer starts, it tries all syscalls to filter out any that are not supported. This process should include only the syscalls that are enabled using the 'enable_syscalls' and 'disable_syscalls' fields in syz-manager's config. This is useful for fuzzing Cuttlefish devices, for example, where the 'vhost_vsock' syscall needs to be excluded from fuzzing and from this test.
* pkg: update generated files to go 1.17Alexey Kardashevskiy2021-07-071-0/+1
| | | | | | | | | | | "make generate" produces this diff when go 1.17 (go1.17-c95464f0ea3f==upstream) is used. Seems compatible with >=1.16. https://github.com/golang/go/commit/4d2d89ff42ca documents the syntax. https://github.com/golang/go/commit/eeadce2d8713 enforces "ignore" for unsatisfiable tags hence the pkg/csource/gen.go change. Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
* pkg/host: make wifi check more preciseDmitry Vyukov2020-11-281-0/+118
| | | | | | | | | WiFi setup fails on 4.4 kernel with: 2020/11/28 12:22:49 BUG: program execution failed: executor 0: exit status 67 initialize_wifi_devices: failed to create device #0 (errno 19) There is at least HWSIM_ATTR_PERM_ADDR not support, but maybe something else. The setup seems to work at least on 4.17 where HWSIM_ATTR_PERM_ADDR was added. So require at least 4.17 for WiFi testing.
* sys/targets: add OS/Arch name constsDmitry Vyukov2020-10-261-8/+9
| | | | | | | | | | | | We use strings to identify OS/Arch. These strings are duplicated throughout the code base massively. golangci-lint points to possiblity of typos and duplication. We already had to define these names in pkg/csource and disable checking for prog package. A future change triggers such warnings in another package. Add OS/Arch name consts to sys/targets so that they can be used to refer to OS/Arch. Use the consts everywhere.
* all: fix comments formatDmitry Vyukov2020-07-121-1/+1
| | | | | | | Fix capitalization, dots at the end and two spaces after a period. Update #1876
* pkg/host: add support for linux/riscv64Tobias Klauser2020-06-261-0/+16
| | | | Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
* sys/linux: first 64bit big-endian architecture s390xAlexander Egorenkov2020-06-251-0/+19
| | | | | | | | | | | | | | | * mmap syscall is special on Linux s390x because the parameters for this syscall are passed as a struct on user stack instead of registers. * Introduce the SyscallTrampolines table into targets.Target to address the above problem. * There is a bug in Linux kernel s390x which causes QEMU TCG to hang when KASAN is enabled. The bug has been fixed in the forthcoming Linux 5.8 version. Until then do not enable KASAN when using QEMU TCG, QEMU KVM shall have no problems with KASAN. Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
* pkg/host: split files into syscalls/featuresDmitry Vyukov2019-11-161-0/+151
pkg/host does 2 things: detects supported syscalls and supported features. There is enough code for each for a separate file.