Home
last modified time | relevance | path

Searched refs:osutil (Results 1 – 25 of 69) sorted by relevance

123

/external/syzkaller/pkg/build/
Dlinux.go40 if err := osutil.WriteFile(configFile, config); err != nil {
43 if err := osutil.SandboxChown(configFile); err != nil {
49 cmd := osutil.Command("make", "oldconfig", "CC="+compiler)
50 if err := osutil.Sandbox(cmd, true, true); err != nil {
54 if _, err := osutil.Run(10*time.Minute, cmd); err != nil {
59 if err := osutil.CopyFile(configFile, outputConfig); err != nil {
64 cmd = osutil.Command("make", "bzImage", "-j", cpu, "CC="+compiler)
65 if err := osutil.Sandbox(cmd, true, true); err != nil {
69 if _, err := osutil.Run(time.Hour, cmd); err != nil {
87 if err := osutil.WriteExecFile(scriptFile, []byte(createImageScript)); err != nil {
[all …]
Dakaros.go22 if err := osutil.WriteFile(configFile, config); err != nil {
25 if err := osutil.SandboxChown(configFile); err != nil {
32 if _, err := osutil.RunCmd(10*time.Minute, "", "ssh-keygen", "-t", "rsa", "-b", "2048",
36 if err := osutil.SandboxChown(sshkeyPub); err != nil {
64 if err := osutil.WriteFile(initFile, []byte(init)); err != nil {
67 if err := osutil.SandboxChown(initFile); err != nil {
85 if err := osutil.WriteFile(filepath.Join(outputDir, "image"), nil); err != nil {
96 if err := osutil.CopyFile(fullSrc, fullDst); err != nil {
114 cmd := osutil.Command(bin, args...)
115 if err := osutil.Sandbox(cmd, true, false); err != nil {
[all …]
Dgvisor.go24 if _, err := osutil.RunCmd(20*time.Minute, kernelDir, compiler, args...); err != nil {
31 if err := osutil.WriteFile(filepath.Join(outputDir, "kernel.config"), config); err != nil {
35 osutil.RunCmd(10*time.Minute, kernelDir, compiler, "shutdown")
47 if !osutil.IsExist(runsc) {
50 return osutil.CopyFile(runsc, filepath.Join(outputDir, "image"))
Dbuild.go33 if err := osutil.MkdirAll(filepath.Join(outputDir, "obj")); err != nil {
38 if err := osutil.WriteFile(filepath.Join(outputDir, "kernel.config"), config); err != nil {
54 *osutil.VerboseError
86 output, err := osutil.RunCmd(time.Minute, "", compiler, arg)
Dfuchsia.go24 if _, err := osutil.RunCmd(time.Hour, kernelDir, "scripts/fx", "clean-build", arch,
37 if err := osutil.CopyFile(fullSrc, fullDst); err != nil {
/external/syzkaller/syz-ci/
Dsyzupdater.go67 osutil.MkdirAll(syzkallerDir)
116 if err := osutil.LinkFiles(upd.latestDir, upd.currentDir, upd.syzFiles); err != nil {
137 if err := osutil.LinkFiles(upd.latestDir, upd.currentDir, upd.syzFiles); err != nil {
178 if err := osutil.CopyFile(latestBin, upd.exe); err != nil {
181 if err := osutil.CopyFile(latestTag, upd.exe+".tag"); err != nil {
216 if err := osutil.CopyFile(src, dst); err != nil {
221 cmd := osutil.Command("make", "generate")
224 if _, err := osutil.Run(time.Hour, cmd); err != nil {
227 cmd = osutil.Command("make", "host", "ci")
230 if _, err := osutil.Run(time.Hour, cmd); err != nil {
[all …]
Dmanager.go70 dir := osutil.Abs(filepath.Join("managers", mgrcfg.Name))
71 if err := osutil.MkdirAll(dir); err != nil {
244 if !osutil.FilesExist(mgr.latestDir, imageFiles) {
274 if err := osutil.MkdirAll(tmpDir); err != nil {
307 if !osutil.FilesExist(mgr.latestDir, imageFiles) {
315 if err := osutil.LinkFiles(mgr.latestDir, mgr.currentDir, imageFiles); err != nil {
500 if kernelConfigFile := filepath.Join(imageDir, "kernel.config"); osutil.IsExist(kernelConfigFile) {
/external/syzkaller/pkg/vcs/
Dvcs.go94 cmd := osutil.Command("patch", "-p1", "--force", "--ignore-whitespace", "--dry-run")
95 if err := osutil.Sandbox(cmd, true, true); err != nil {
103 cmd = osutil.Command("patch", "-p1", "--force", "--ignore-whitespace", "--reverse", "--dry-run")
104 if err := osutil.Sandbox(cmd, true, true); err != nil {
115 cmd = osutil.Command("patch", "-p1", "--force", "--ignore-whitespace")
116 if err := osutil.Sandbox(cmd, true, true); err != nil {
146 cmd := osutil.Command(command, args...)
148 if err := osutil.Sandbox(cmd, true, false); err != nil {
151 return osutil.Run(time.Hour, cmd)
/external/syzkaller/sys/syz-extract/
Dlinux.go27 if osutil.IsExist(filepath.Join(sourcedir, ".config")) ||
28 osutil.IsExist(filepath.Join(sourcedir, "init/main.o")) ||
29 osutil.IsExist(filepath.Join(sourcedir, "include/generated/compile.h")) {
31 out, err := osutil.RunCmd(time.Hour, sourcedir, "make", "mrproper",
59 out, err := osutil.RunCmd(time.Hour, kernelDir, "make", append(makeArgs, "defconfig")...)
64 out, err = osutil.RunCmd(time.Minute, buildDir, "sed", "-i",
69 out, err = osutil.RunCmd(time.Hour, kernelDir, "make", append(makeArgs, "olddefconfig")...)
73 out, err = osutil.RunCmd(time.Hour, kernelDir, "make", append(makeArgs, "init/main.o")...)
Dfetch.go67 out, err = osutil.Command(bin).CombinedOutput()
104 binFile, err := osutil.TempFile("syz-extract-bin")
113 cmd := osutil.Command(cc, args...)
/external/syzkaller/vm/gvisor/
Dgvisor.go64 if !osutil.IsExist(env.Image) {
82 osutil.MkdirAll(rootDir)
83 osutil.MkdirAll(bundleDir)
84 osutil.MkdirAll(imageDir)
94 if err := osutil.WriteFile(filepath.Join(bundleDir, "config.json"), []byte(vmConfig)); err != nil {
101 if err := osutil.CopyFile(bin, filepath.Join(imageDir, "init")); err != nil {
105 rpipe, wpipe, err := osutil.LongPipe()
127 osutil.Run(time.Minute, inst.runscCmd("delete", "-force", inst.name))
197 cmd := osutil.Command(inst.image, args...)
207 osutil.Run(time.Minute, inst.runscCmd("delete", "-force", inst.name))
[all …]
/external/syzkaller/pkg/host/
Dhost_linux.go84 cmd := osutil.Command(os.Args[0])
86 _, err := osutil.Run(10*time.Second, cmd)
145 return osutil.IsExist(dev)
282 if err := osutil.IsAccessible("/dev/fuse"); err != nil {
335 if !osutil.IsExist("/sys/kernel/debug/kcov") {
338 if err := osutil.IsAccessible("/sys/kernel/debug/kcov"); err != nil {
395 if err := osutil.IsAccessible("/proc/self/make-it-fail"); err != nil {
398 if err := osutil.IsAccessible("/proc/thread-self/fail-nth"); err != nil {
404 if err := osutil.IsAccessible("/sys/kernel/debug/failslab/ignore-gfp-wait"); err != nil {
411 if err := osutil.WriteFile("/sys/kernel/debug/failslab/ignore-gfp-wait", []byte("N")); err != nil {
[all …]
/external/syzkaller/vm/kvm/
Dkvm.go79 if !osutil.IsExist(cfg.Kernel) {
88 cfg.Kernel = osutil.Abs(cfg.Kernel)
117 out, err := osutil.Command(inst.cfg.Lkvm, "setup", sandbox).CombinedOutput()
122 if err := osutil.WriteExecFile(scriptPath, []byte(script)); err != nil {
126 rpipe, wpipe, err := osutil.LongPipe()
131 inst.lkvm = osutil.Command("taskset", "-c", strconv.Itoa(index%runtime.NumCPU()),
219 if err := osutil.CopyFile(hostSrc, dst); err != nil {
239 if err := osutil.WriteExecFile(tmpFile, []byte(command)); err != nil {
270 if !osutil.IsExist(cmdFile) {
/external/syzkaller/pkg/mgrconfig/
Dmgrconfig.go162 cfg.Workdir = osutil.Abs(cfg.Workdir)
187 cfg.KernelObj = osutil.Abs(cfg.KernelObj)
191 cfg.KernelSrc = osutil.Abs(cfg.KernelSrc)
226 cfg.Syzkaller = osutil.Abs(cfg.Syzkaller)
234 if !osutil.IsExist(cfg.SyzFuzzerBin) {
237 if !osutil.IsExist(cfg.SyzExecprogBin) {
240 if !osutil.IsExist(cfg.SyzExecutorBin) {
/external/syzkaller/syz-manager/
Dmanager.go154 osutil.MkdirAll(crashdir)
236 f, err := os.OpenFile(*flagBench, os.O_WRONLY|os.O_CREATE|os.O_EXCL, osutil.DefaultFilePerm)
278 osutil.HandleInterrupts(vm.Shutdown)
591 if _, err := osutil.Run(10*time.Minute, cmd); err != nil {
641 osutil.MkdirAll(dir)
642 …if err := osutil.WriteFile(filepath.Join(dir, "description"), []byte(crash.Title+"\n")); err != ni…
664 osutil.WriteFile(filepath.Join(dir, fmt.Sprintf("log%v", oldestI)), crash.Output)
666 osutil.WriteFile(filepath.Join(dir, fmt.Sprintf("tag%v", oldestI)), []byte(mgr.cfg.Tag))
669 osutil.WriteFile(filepath.Join(dir, fmt.Sprintf("report%v", oldestI)), crash.Report.Report)
683 if osutil.IsExist(filepath.Join(dir, "repro.prog")) {
[all …]
/external/syzkaller/vm/qemu/
Dqemu.go187 if !osutil.IsExist(env.Image) {
197 cfg.Kernel = osutil.Abs(cfg.Kernel)
198 cfg.Initrd = osutil.Abs(cfg.Initrd)
217 if _, err := osutil.RunCmd(10*time.Minute, "", "ssh-keygen", "-t", "rsa", "-b", "2048",
222 …if err := osutil.WriteExecFile(initFile, []byte(strings.Replace(initScript, "{{KEY}}", sshkey, -1)…
266 inst.rpipe, inst.wpipe, err = osutil.LongPipe()
346 qemu := osutil.Command(inst.cfg.Qemu, args...)
422 _, err := osutil.RunCmd(3*time.Minute, "", "scp", args...)
431 rpipe, wpipe, err := osutil.LongPipe()
461 cmd := osutil.Command(args[0], args[1:]...)
/external/syzkaller/pkg/ipc/
Dipc.go128 inf, inmem, err = osutil.CreateMemMappedFile(prog.ExecBufferSize)
134 osutil.CloseMemMappedFile(inf, inmem)
137 outf, outmem, err = osutil.CreateMemMappedFile(outputSize)
143 osutil.CloseMemMappedFile(outf, outmem)
162 env.bin[0] = osutil.Abs(env.bin[0]) // we are going to chdir
193 err1 = osutil.CloseMemMappedFile(env.inFile, env.in)
196 err2 = osutil.CloseMemMappedFile(env.outFile, env.out)
468 dir = osutil.Abs(dir)
515 cmd := osutil.Command(bin[0], bin[1:]...)
576 osutil.RemoveAll(c.dir)
[all …]
/external/syzkaller/vm/gce/
Dgce.go131 …keygen := osutil.Command("ssh-keygen", "-t", "rsa", "-b", "2048", "-N", "", "-C", "syzkaller", "-f…
208 conRpipe, conWpipe, err := osutil.LongPipe()
216 con := osutil.Command("ssh", conArgs...)
248 sshRpipe, sshWpipe, err := osutil.LongPipe()
261 ssh := osutil.Command("ssh", args...)
364 conRpipe, conWpipe, err := osutil.LongPipe()
373 con := osutil.Command("ssh", conArgs...)
470 output, err := osutil.RunCmd(time.Minute, "", bin, args...)
/external/syzkaller/pkg/instance/
Dinstance.go48 if err := osutil.MkdirAll(cfg.Workdir); err != nil {
66 cmd := osutil.Command("make", "target")
75 if _, err := osutil.Run(time.Hour, cmd); err != nil {
95 if keyFile := filepath.Join(imageDir, "key"); osutil.IsExist(keyFile) {
100 if !osutil.IsExist(kernel) {
104 if !osutil.IsExist(initrd) {
305 if err := osutil.WriteFile(progFile, inst.reproSyz); err != nil {
/external/syzkaller/pkg/csource/
Dbuild.go36 bin, err := osutil.TempFile("syz-executor")
56 cmd := osutil.Command(compiler, flags...)
75 cmd := osutil.Command("clang-format", "-assume-filename=/src.c", "-style", style)
/external/syzkaller/vm/odroid/
Dodroid.go80 if !osutil.IxExist(cfg.Console) {
131 rpipe, wpipe, err := osutil.LongPipe()
140 cmd := osutil.Command("ssh", args...)
286 cmd := osutil.Command("scp", args...)
318 rpipe, wpipe, err := osutil.LongPipe()
329 cmd := osutil.Command("ssh", args...)
/external/syzkaller/vm/isolated/
Disolated.go127 rpipe, wpipe, err := osutil.LongPipe()
138 cmd := osutil.Command("ssh", args...)
233 cmd := osutil.Command("scp", args...)
266 rpipe, wpipe, err := osutil.LongPipe()
283 cmd := osutil.Command("ssh", args...)
/external/syzkaller/vm/adb/
Dadb.go159 if osutil.IsExist(exactCon) {
197 cmd := osutil.Command(adb, "-s", dev, "shell", "echo", "\"<1>", unique, "\"", ">", "/dev/kmsg")
249 out, err := osutil.RunCmd(time.Minute, "", inst.adbBin, args...)
378 adbRpipe, adbWpipe, err := osutil.LongPipe()
386 adb := osutil.Command(inst.adbBin, "-s", inst.device, "shell", "cd /data; "+command)
/external/syzkaller/syz-fuzzer/
Dtesting.go81 bin, err := osutil.TempFile("syz-runtest")
86 if err := osutil.WriteExecFile(bin, req.Bin); err != nil {
183 cmd := osutil.Command(executorArgs[0], executorArgs[1:]...)
188 out, err := osutil.Run(time.Minute, cmd)
/external/syzkaller/vm/vmimpl/
Dmerger_test.go19 rp1, wp1, err := osutil.LongPipe()
26 rp2, wp2, err := osutil.LongPipe()

123