1
0

Allow to force some qemu settings from .out-of-tree.toml

This commit is contained in:
2019-08-19 18:34:13 +00:00
parent 338300eeec
commit 282d99f511
3 changed files with 44 additions and 0 deletions

14
pew.go
View File

@@ -304,6 +304,20 @@ func whatever(swg *sizedwaitgroup.SizedWaitGroup, ka config.Artifact,
}
q.Timeout = qemuTimeout
if ka.Qemu.Timeout.Duration != 0 {
q.Timeout = ka.Qemu.Timeout.Duration
}
if ka.Qemu.CPUs != 0 {
q.Cpus = ka.Qemu.CPUs
}
if ka.Qemu.Memory != 0 {
q.Memory = ka.Qemu.Memory
}
q.SetKASLR(!ka.Mitigations.DisableKASLR)
q.SetSMEP(!ka.Mitigations.DisableSMEP)
q.SetSMAP(!ka.Mitigations.DisableSMAP)
err = q.Start()
if err != nil {
log.Println("Qemu start error:", err)