aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vmimpl
Commit message (Collapse)AuthorAgeFilesLines
* vm/adb: support both old and new device formatHuizi Yang2021-09-101-1/+3
|
* vm/vmimpl/console: tail to kernel log to get serial outputHuizi Yang2021-09-101-0/+27
|
* vm/adb: add startup_script configJoey Jiao2021-04-141-0/+41
|
* vm/qemu: provide info about qemu version/argsDmitry Vyukov2021-03-181-0/+6
|
* vm/qemu: restrict network accessDmitry Vyukov2021-02-081-3/+11
| | | | | | | Restrict access to the external network from within the VM and access to VM SSH to local interface only. Fixes #332
* vm/qemu: scale ssh timeoutDmitry Vyukov2020-12-291-9/+11
| | | | Increase ssh wait timeout according to the target slowdown.
* vm/qemu, vm/gce: dump LOCKDEP state in DiagnoseDmitry Vyukov2020-11-211-0/+26
| | | | | For context see the discussion at: https://groups.google.com/g/syzkaller/c/ruwaYUvwHTw/m/E9Cg9OfvAgAJ
* vm: pass Report to DiagnoseDmitry Vyukov2020-11-211-6/+8
| | | | | | | | | The way to diagnose generally depends on the issue. E.g. do we need register dump to debug this issue? Do we need host dmesg dump? Some diagnosis may be directly specific to a particular problem (e.g. dumping a particular debugfs/procfs file). Pass Report to Diagnose to make this possible.
* sys/targets: add OS/Arch name constsDmitry Vyukov2020-10-261-1/+2
| | | | | | | | | | | | We use strings to identify OS/Arch. These strings are duplicated throughout the code base massively. golangci-lint points to possiblity of typos and duplication. We already had to define these names in pkg/csource and disable checking for prog package. A future change triggers such warnings in another package. Add OS/Arch name consts to sys/targets so that they can be used to refer to OS/Arch. Use the consts everywhere.
* vm/vmimpl/merger: remove all CRs from outputAlexander Egorenkov2020-10-022-3/+8
| | | | | | | Get rid of all places stripping \r in pkg/report. And adapt all tests. Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
* vm/vmimpl: update console code for the new unix packageDmitry Vyukov2020-09-151-8/+5
| | | | | | | | The current code is now broken on darwin: syzkaller$ GOOS=darwin go install ./vm/... vm/vmimpl/console.go:30:33: undefined: unix.SYS_IOCTL vm/vmimpl/console.go:45:32: undefined: unix.SYS_IOCTL
* Revert "vm/vmimpl: disallow ssh authentication agent"Dmitry Vyukov2020-08-181-1/+0
| | | | | | | | | | This reverts commit b9683dbdfdbea5815c2cf48b20aada181dca1be3. Majority of syzbot instances started failing with: failed to run ["ssh" "-p" "22" "-F" "/dev/null" "-o" "UserKnownHostsFile=/dev/null" "-o" "BatchMode=yes" "-o" "IdentitiesOnly=yes" "-o" "IdentityAgent=none" "-o" "StrictHostKeyChecking=no" "-o" "ConnectTimeout=10" "-i" "/syzkaller/managers/upstream-bpf-next-kasan-gce/latest.tmp/key" "root@10.128.15.195" "pwd"]: exit status 255 command-line: line 0: Bad configuration option: identityagent command-line: line 0: Bad configuration option: identityagent
* vm/vmimpl: disallow ssh authentication agentMarco Vanotti2020-08-181-0/+1
| | | | | | | This commit adds a new option to SSH options, disallowing the authentication agent. This is specially useful when you are testing in a machine that sets the `SSH_AUTH_SOCK` environment variable, as ssh will try to use that authentication agent on each ssh connection.
* all: fix comments formatDmitry Vyukov2020-07-123-9/+9
| | | | | | | Fix capitalization, dots at the end and two spaces after a period. Update #1876
* vm/vmimpl: add support for linux/riscv64Tobias Klauser2020-06-261-0/+15
| | | | Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
* sys/linux: first 64bit big-endian architecture s390xAlexander Egorenkov2020-06-251-0/+15
| | | | | | | | | | | | | | | * mmap syscall is special on Linux s390x because the parameters for this syscall are passed as a struct on user stack instead of registers. * Introduce the SyscallTrampolines table into targets.Target to address the above problem. * There is a bug in Linux kernel s390x which causes QEMU TCG to hang when KASAN is enabled. The bug has been fixed in the forthcoming Linux 5.8 version. Until then do not enable KASAN when using QEMU TCG, QEMU KVM shall have no problems with KASAN. Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
* .golangci.yml: enable godot checkerDmitry Vyukov2020-06-051-1/+1
| | | | | A good one. Lots of fixed comments are contributed by episodic contributors. So it's good to catch these earlier.
* vm/vmimpl: Don't show ktr, but uma on FreeBSDMichael Tuexen2020-05-121-1/+1
| | | | | | Right now, kernels are not build with KTR support, so don't run show ktr. Add showing information about zones like vmstat -z would show.
* vm/.../openbsd: get back traces of the first two cpus. (#1705)Greg Steuck2020-04-291-0/+4
|
* vm/vmimpl: refactor DiagnoseFree/OpenBSDDmitry Vyukov2020-03-212-4/+4
| | | | | Make signatures of these functions match vm.Diagnose. Both more flexible, less code, more reasonable.
* vm: Get debug information when FreeBSD on panics (#1470)Andrew Turner2019-10-211-0/+32
| | | | The FreeBSD kernel debugger can provide more information when the kernel panics. Add support to bhybe and gce to print this information.
* all: fix some static analysis warningsDmitry Vyukov2019-04-231-1/+1
| | | | | | Fix warnings produced by golangci-lint. Update #977
* vm/qemu: detect boot errors fasterDmitry Vyukov2019-03-171-2/+6
| | | | | | | | | Currently we try to ssh into the machine for 10 minutes even if it crashed right away. Make qemu exit on kernel panic and stop ssh'ing when qemu exits. Handling bad kernels fast is actually important for bisection. Update #501
* vm/vmimpl: don't pass ssh key twiceDmitry Vyukov2019-02-221-1/+3
|
* openbsd: remove shorten report logic (#986)Anton Lindqvist2019-02-091-1/+2
| | | | | | | | | | | A line length of 79 in the ddb output does not necessarily imply that the following line is a continuation of the current line. Since there's no way to distinguish between ordinary and continuation lines, it could end up corrupting the report by joining two lines that are disjoint[1]. Instead, disable line wrapping in ddb. If we want some kind of wrapping in the future it's easier done by pkg/report. [1] https://syzkaller.appspot.com/bug?extid=03f7377a9848d7d008c9
* openbsd: more witness handlingAnton Lindqvist2019-01-261-0/+3
| | | | | | | | | | * pkg/report: symbolize witness trace on OpenBSD * vm/vmimpl: show witness locks on panic * vm/vmimpl: show memory stats on panic * fixup! pkg/report: symbolize witness trace on OpenBSD
* vm/vmimpl: fix vet warning about unkeyed structDmitry Vyukov2019-01-251-1/+1
|
* vm/vmimpl: produce better error in WaitForSSHDmitry Vyukov2019-01-242-1/+11
| | | | | Currently we squash VerboseError which leads to too lengthy build error titles. Handle verbose error more carefully.
* vm: allow Diagnose to directly return diagnosisMichael Pratt2018-12-211-4/+7
| | | | | | Rather than writing the diagnosis to the kernel console, Diagnose can now directly return the extra debugging info, which will be appended ot the kernel console log.
* vm/gce: close old consolew in RunDmitry Vyukov2018-12-021-0/+3
| | | | Run can be executed several times on a VM.
* vm/gce: use openbsd console diagnostic code for both vmm and gceGreg Steuck2018-12-021-0/+27
| | | | | | | | * openbsd: use console diagnostic code for both vmm and gce. * gometalinter wants less indentation and more stuff in scope * Comment no longer applies
* openbsd: run on gceGreg Steuck2018-11-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build/openbsd: minor cleanup (use tuples instead of maps) * Grammar nits in comments. * Simplify openbsd.Create, will defer when there's more than one error exit. * pkg/build: Support copying kernel into GCE image * Simple test for openbsd image copy build. * Cleanup in case something failed before. * Support multi-processor VMs on GCE. * More debug * Reformat * OpenBSD gce image needs to be raw. * GC * Force format to GNU directly on Go 1.10 or newer. * Use vmType passed as a parameter inside openbsd.go * gofmt * more fmt * Can't use GENERIC.mp just yet. * capitalize * Copyright
* syz-ci: de-hardcode list of VMs that support overcommitDmitry Vyukov2018-09-111-12/+11
| | | | | | | | We currently have this list in multiple places (somewhat diverged). Specify this "overcommit" property in VM implementations. In particular, we also want to allow overcommit for "vmm" type. Update #712
* vm/vmm: support for vmm found on OpenBSD (#678)Anton Lindqvist2018-08-181-0/+12
| | | vm/vmm: add vmm implementation found on OpenBSD
* vm/vmimpl: factor out common code for ssh args and waiting for sshDmitry Vyukov2018-07-061-0/+57
| | | | Move common code from 4 vm implementations to vmimpl.
* vm/vmimpl: add vm.Diagnose methodDmitry Vyukov2018-06-221-0/+5
| | | | | | Diagnose is called on machine hang to try to get some additional diagnostic information from it. For now it's all stubs.
* vm/adb: don't fail if port 35099 is busyDmitry Vyukov2018-06-111-0/+17
|
* all: get rid of underscores in identifiersDmitry Vyukov2018-05-079-35/+35
| | | | | | Underscores are against Go coding style. Update #538
* vm/{adb,isolated}: dudup common codeDmitry Vyukov2018-05-061-0/+44
| | | | | | Found with gometalinter/dupl. Update #538
* all: fix too long linesDmitry Vyukov2018-05-051-3/+6
| | | | | Not sure why I have not seen warnings about these lines on another machine...
* all: fix gometalinter warningsDmitry Vyukov2018-03-082-5/+5
| | | | Fix typos, non-canonical code, remove dead code, etc.
* vm/vmimpl: unbreak freebsd buildDmitry Vyukov2018-01-161-0/+12
| | | | Also add freebsd/netbsd host build to presubmit.
* vm/gce: always ignore serial relay errorsDmitry Vyukov2017-12-052-3/+16
| | | | | | | GCE serial reply seems to be buggy, we see lots of "serialport: VM disconnected" and "packet_write_wait: Connection to 1.2.3.4 port 9600: Broken pipe" errors, which do not have any explanation. Ignore all serial relay errors.
* dashboard/app: add manager monitoringDmitry Vyukov2017-12-011-0/+4
| | | | | | | | Make it possible to monitor health and operation of all managers from dashboard. 1. Notify dashboard about internal syz-ci errors (currently we don't know when/if they happen). 2. Send statistics from managers to dashboard.
* syz-ci: test images before using themDmitry Vyukov2017-11-301-0/+10
| | | | | | | Boot and minimally test images before declaring them as good and switching to using them. If image build/boot/test fails, upload report about this to dashboard.
* pkg/osutil: don't leace runaway processesDmitry Vyukov2017-11-161-1/+1
| | | | | | When manager is stopped there are sometimes runaway qemu processes still running. Set PDEATHSIG for all subprocesses. We never need child processes outliving parents.
* vm/vmimpl: add netbsd console stubDmitry Vyukov2017-10-261-0/+12
|
* pkg/kd: add KD protocol decoderDmitry Vyukov2017-09-281-0/+14
| | | | | | | | | | | | | | | | | | Very primitive decoder that only decodes amd64 exceptions. Use it in vm/gce. Now crashes contain something more or less reasonable which is caught by manager as crash: BUG: first chance exception 0x80000003 &kd.stateChange64{state:0x3030, processorLevel:0x6, processor:0x0, numProcessors:0x2, thread:0xffff9c0bd015e080, pc:0xfffff8017615c380, exception:kd.exception64{code:0x80000003, flags:0x0, record:0x0, address:0xfffff8017615c380, numParams:0x1, unused:0x0, params:[15]uint64{ 0x0, 0x40, 0xfffff801768699e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, firstChance:0x1}, report:kd.controlReport{ dr6:0xffff0ff0, dr7:0x400, eflags:0x86, numInstr:0x10, reportFlags:0x3, instr:[16]uint8{0xcc, 0xc3, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xf, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0}, cs:0x10, ds:0x2b, es:0x2b, fs:0x53}}
* vm/gce: windows supportDmitry Vyukov2017-09-271-1/+2
| | | | | | | Support custom pre-created images. Support non-root user. Use dir instead of pwd on windows. Don't use sudo on windows.
* vm/vmimpl: add target OS/arch to envDmitry Vyukov2017-09-151-0/+2
| | | | Allows future VM tuning based on target OS/arch.