aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_kvm.h
Commit message (Collapse)AuthorAgeFilesLines
* executor: fix TestGenerate errorsAleksandr Nogikh2026-02-111-1/+1
| | | | | | These pseudo syscalls implementation was not previously tested in pkg/csource, so let's first fix the bugs before enabling tests for them.
* executor: print is_write in syz_kvm_assert_syzos_kvm_exitAlexander Potapenko2026-02-111-0/+1
| | | | No functional change for syz-executor.
* executor: fix ifdefs for executor_fn_guest_addr()Alexander Potapenko2026-02-091-1/+1
| | | | | Make sure executor_fn_guest_addr() is defined when __NR_syz_kvm_assert_syzos_uexit is.
* executor: introduce force_inlineAlexander Potapenko2026-02-091-3/+3
| | | | | Turned out executor_fn_guest_addr() was not inlined when building the reproducers with -O0, so the guest code crashed.
* executor: added SYZOS-DEBUG logging to syz_kvm_assert_syzos_kvm_exitAlexander Potapenko2026-01-261-0/+8
| | | | | Provide visibility into expected vs. actual KVM exit reasons during assertion failures.
* executor: add include guards to KVM headersAlexander Potapenko2025-10-271-0/+5
| | | | | Not having these results in three copies of every KVM-related #define in each reproducer.
* executor: common_kvm.h: fix compilationAlexander Potapenko2025-10-171-1/+1
| | | | | | Add #if checks to define executor_fn_guest_addr() for __NR_syz_kvm_setup_cpu and __NR_syz_kvm_setup_syzos_vm. This fixes a compilation error spotted by csource_test.go
* executor: introduce __addrspace_guestAlexander Potapenko2025-10-171-17/+28
| | | | | | | | | | | | Apply __addrspace_guest to every guest function and use a C++ template to statically validate that host functions are not passed to executor_fn_guest_addr(). This only works in Clang builds of syz-executor, because GCC does not support address spaces, and C reproducers cannot use templates. The static check allows us to drop the dynamic checks in DEFINE_GUEST_FN_TO_GPA_FN(). While at it, replace DEFINE_GUEST_FN_TO_GPA_FN() with explicit declarations of host_fn_guest_addr() and guest_fn_guest_addr().
* executor: introduce DEFINE_GUEST_FN_TO_GPA_FN()Alexander Potapenko2025-10-171-0/+18
| | | | | DEFINE_GUEST_FN_TO_GPA_FN() allows to define helper functions to calculate guest addresses in the host/guest code.
* executor: sys/linux/: pkg/runtest: pkg/vminfo: add syz_kvm_assert_syzos_kvm_exitAlexander Potapenko2025-09-191-0/+25
| | | | Implement a pseudo-syscall to check the value of kvm_run.exit_reason
* sys, executor: more kvm improvementsDmitry Vyukov2017-01-121-765/+0
| | | | | | | 1. Basic support for arm64 kvm testing. 2. Fix compiler warnings in x86 kvm code. 3. Test all pseudo syz calls in csource. 4. Fix handling of real code in x86.
* sys: extend kvm supportDmitry Vyukov2017-01-091-0/+765
Add new pseudo syscall syz_kvm_setup_cpu that setups VCPU into interesting states for execution. KVM is too difficult to setup otherwise. Lots of improvements possible, but this is a starting point.