From b0947553167615d7bb1b67b22d2d080e5a5ab2cd Mon Sep 17 00:00:00 2001 From: TheOfficialFloW Date: Thu, 30 Jul 2020 11:33:48 +0200 Subject: all: initialize vhci in linux * all: initialize vhci in linux * executor/common_linux.h: improve vhci initialization * pkg/repro/repro.go: add missing vhci options * executor/common_linux.h: fix type and add missing header * executor, pkg: do it like NetInjection * pkg/csource/csource.go: do not emit syz_emit_vhci if vhci is not enabled * executor/common_linux.h: fix format string * executor/common_linux.h: initialize with memset For som reason {0} gets complains about missing braces... * executor/common_linux.h: simplify vhci init * executor/common_linux.h: try to bring all available hci devices up * executor/common_linux.h: find which hci device has been registered * executor/common_linux.h: use HCI_VENDOR_PKT response to retrieve device id * sys/linux/dev_vhci.txt: fix structs of inquiry and report packets * executor/common_linux.h: remove unnecessary return statement and check vendor_pkt read size * executor/common_linux.h: remove unnecessary return statement and check vendor_pkt read size * sys/linux/dev_vhci.txt: pack extended_inquiry_info_t * sys/linux/l2cap.txt: add l2cap_conf_opt struct * executor/common_linux.h: just fill bd addr will 0xaa * executor/common_linux.h: just fill bd addr will 0xaa --- pkg/ipc/ipc.go | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'pkg/ipc/ipc.go') diff --git a/pkg/ipc/ipc.go b/pkg/ipc/ipc.go index 11e73835b..5ae502e5d 100644 --- a/pkg/ipc/ipc.go +++ b/pkg/ipc/ipc.go @@ -28,18 +28,19 @@ type EnvFlags uint64 // Note: New / changed flags should be added to parse_env_flags in executor.cc. const ( - FlagDebug EnvFlags = 1 << iota // debug output from executor - FlagSignal // collect feedback signals (coverage) - FlagSandboxSetuid // impersonate nobody user - FlagSandboxNamespace // use namespaces for sandboxing - FlagSandboxAndroid // use Android sandboxing for the untrusted_app domain - FlagExtraCover // collect extra coverage - FlagEnableTun // setup and use /dev/tun for packet injection - FlagEnableNetDev // setup more network devices for testing - FlagEnableNetReset // reset network namespace between programs - FlagEnableCgroups // setup cgroups for testing - FlagEnableCloseFds // close fds after each program - FlagEnableDevlinkPCI // setup devlink PCI device + FlagDebug EnvFlags = 1 << iota // debug output from executor + FlagSignal // collect feedback signals (coverage) + FlagSandboxSetuid // impersonate nobody user + FlagSandboxNamespace // use namespaces for sandboxing + FlagSandboxAndroid // use Android sandboxing for the untrusted_app domain + FlagExtraCover // collect extra coverage + FlagEnableTun // setup and use /dev/tun for packet injection + FlagEnableNetDev // setup more network devices for testing + FlagEnableNetReset // reset network namespace between programs + FlagEnableCgroups // setup cgroups for testing + FlagEnableCloseFds // close fds after each program + FlagEnableDevlinkPCI // setup devlink PCI device + FlagEnableVhciInjection // setup and use /dev/vhci for hci packet injection ) // Per-exec flags for ExecOpts.Flags. -- cgit mrf-deployment