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/repro/repro.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pkg/repro') diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go index 2525198bf..3003d99aa 100644 --- a/pkg/repro/repro.go +++ b/pkg/repro/repro.go @@ -199,6 +199,9 @@ func createStartOptions(cfg *mgrconfig.Config, features *host.Features, crashTyp if !features[host.FeatureUSBEmulation].Enabled { opts.USB = false } + if !features[host.FeatureVhciInjection].Enabled { + opts.VhciInjection = false + } } return opts } @@ -862,6 +865,7 @@ var cSimplifies = append(progSimplifies, []Simplify{ opts.CloseFDs = false opts.DevlinkPCI = false opts.USB = false + opts.VhciInjection = false return true }, func(opts *csource.Options) bool { @@ -922,6 +926,13 @@ var cSimplifies = append(progSimplifies, []Simplify{ opts.USB = false return true }, + func(opts *csource.Options) bool { + if !opts.VhciInjection { + return false + } + opts.VhciInjection = false + return true + }, func(opts *csource.Options) bool { if !opts.UseTmpDir || opts.Sandbox == "namespace" || opts.Cgroups { return false -- cgit mrf-deployment