diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-01-08 17:20:32 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-01-09 20:28:10 +0100 |
| commit | bbd4840872f70e3342308c6965ab196ed2606af1 (patch) | |
| tree | 519ebfa1fbd6cafadd2efd1038e0c8f869ff37eb /executor/common.h | |
| parent | c377a6514d9a4858e818e6d4637870bab2da6370 (diff) | |
sys: extend kvm support
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.
Diffstat (limited to 'executor/common.h')
| -rw-r--r-- | executor/common.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/executor/common.h b/executor/common.h index 3b6b27297..ba0303752 100644 --- a/executor/common.h +++ b/executor/common.h @@ -22,6 +22,7 @@ #include <linux/capability.h> #include <linux/if.h> #include <linux/if_tun.h> +#include <linux/kvm.h> #include <linux/sched.h> #include <net/if_arp.h> @@ -367,6 +368,10 @@ static uintptr_t syz_fuseblk_mount(uintptr_t a0, uintptr_t a1, uintptr_t a2, uin } #endif +#ifdef __NR_syz_kvm_setup_cpu +#include "common_kvm.h" +#endif // #ifdef __NR_syz_kvm_setup_cpu + static uintptr_t execute_syscall(int nr, uintptr_t a0, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8) { switch (nr) { @@ -396,6 +401,10 @@ static uintptr_t execute_syscall(int nr, uintptr_t a0, uintptr_t a1, uintptr_t a case __NR_syz_emit_ethernet: return syz_emit_ethernet(a0, a1); #endif +#ifdef __NR_syz_kvm_setup_cpu + case __NR_syz_kvm_setup_cpu: + return syz_kvm_setup_cpu(a0, a1, a2, a3, a4, a5, a6, a7); +#endif } } |
