aboutsummaryrefslogtreecommitdiffstats
path: root/vm/starnix
Commit message (Collapse)AuthorAgeFilesLines
* vm/starnix: update syntax for ffx target listLaura Peskin2026-01-071-2/+1
|
* vm: add context to Pool.Create()Aleksandr Nogikh2025-10-011-1/+1
| | | | | | | | | | Enable external abortion of the instance creation process. This is especially useful for the qemu case where we retry the creation/boot up to 1000 times, which can take significant time (e.g. it timeouts syz-cluster pods on unstable kernels). The context can be further propagated to WaitForSSH, but that requires another quite significant vm/ refactoring.
* vm/starnix: switch to new ffx command for vm ssh addressLaura Peskin2025-08-281-1/+6
| | | | | | | | Instead of: ffx --target <target> target get-ssh-address Use: ffx --target <target> target list --format addresses
* vm/starnix: get path for ffx log binaryLaura Peskin2025-07-221-24/+36
| | | | | ffx log is now built separately from the main ffx binary.
* vm/starnix: copy sdk overrides to isolated ffx configLaura Peskin2025-07-221-27/+74
| | | | | | | ffx emu now needs to know the locations of some host tools. Copy these paths from the default ffx config into the configuration for the isolated ffx instance that syzkaller uses for most tasks.
* vm: func Run accepts contextTaras Madan2025-05-191-3/+3
| | | | It allows to use context as a single termination signal source.
* pkg/build: add build command for starnixLaura Peskin2024-10-301-2/+2
| | | | Co-authored-by: eep@google.com
* vm/starnix: exclude netlink logsCameron Finucane2024-10-071-1/+2
| | | | | They are very noisy and can cause important crash information to run off the end of the buffer; this is a temporary fix to avoid that.
* vm/starnix: avoid hang on vm shutdownCameron Finucane2024-10-071-35/+16
| | | | | | | | | - Extraneous references to the `ffx log` pipe are closed, allowing the EOF from the subprocess to be propagated properly. - The SSH bridge into the Starnix sshd is now properly shut down when the instance is closed, avoiding a zombie process. - Some of the starnix code has been updated to be in line with a refactor that took place in other VM types.
* vm/starnix: isolate ffx per starnix vm poolCameron Finucane2024-10-071-65/+107
| | | | | This allows for multiple starnix VM pools to exist simultaneously without conflict, and avoids any unintential global state.
* all: follow new linter recommendationsTaras Madan2024-09-101-1/+1
|
* vmimpl: refactor VM type registrationDmitry Vyukov2024-07-231-1/+4
| | | | | | | | | Pass Type struct directly during registration. This allows to add additional optional parameters to VM types without changing all VM implementations. We we will need to add SupportsSnapshots flag and one flag to resolve #5028. With this change it will be possible to add "SupportsSnapshots: true" to just one VM type implemenetation.
* vm: make Instance implement io.CloserAleksandr Nogikh2024-07-111-1/+2
| | | | It's better to follow standard interfaces.
* vm/starnix: `-debug` sends kernel and syzkaller logs to stdoutLaura Peskin2024-06-181-1/+5
| | | | | Now these logs go to stdout when syz-manager runs with the `-debug` flag.
* vm/starnix: run without host fuzzer modeLaura Peskin2024-06-181-32/+14
| | | | | | | Removes the SYZ_STARNIX_HACK envvar and runs syz-fuzzer on the VM. Co-authored-by: mvanotti@google.com
* vm/starnix: fuzz over ssh instead of adbLaura Peskin2024-06-181-155/+125
| | | | | | | | | | | fuchsia build instructions: fx set workbench_eng.x64 --with-base \ //src/testing/fuzzing/syzkaller/starnix:syzkaller_starnix \ && fx build Co-authored-by: eep@google.com Co-authored-by: mvanotti@google.com
* sys/targets: add consts for gvisor/starnixDmitry Vyukov2024-05-271-1/+2
| | | | | Lint started warning about duplicate "gvisor" const in pkg/cover. Add gvisor/starnix consts to sys/targets package to avoid duplication.
* pkg/rpctype: prepare for not using for target communicationDmitry Vyukov2024-05-031-1/+1
| | | | | | Remove things that are only needed for target VM communication: conditional compression, timeout scaling, traffic stats. To minimize diffs when we switch target VM communication to flatrpc.
* vm/starnix: run chmod +x on executor binary after adb pushLaura Peskin2024-04-151-3/+45
| | | | | The x bit seems to get dropped now, at least when adbd is running as root. Thanks @eepeep for investigating!
* vm/starnix: change target dir from /data to /tmpLaura Peskin2024-04-151-1/+1
| | | | | Since /data is not always mounted by default, push the executor binary to /tmp instead.
* pkg/rpctype: make RPC compression optionalDmitry Vyukov2024-04-031-1/+1
| | | | | | | | RPC compression take up to 10% of CPU time in profiles, but it's unlikely to be beneficial for local VM runs (we are mostly copying memory in this case). Enable RPC compression based on the VM type (local VM don't use it, remove machines use it).
* vm/starnix: add instance name to log linesLaura Peskin2024-02-031-21/+21
|
* vm/starnix: improve fuchsia log outputLaura Peskin2024-02-031-1/+2
| | | | | | | | | Adds 3 flags to ffx log: --no-color skips colorizing logs, making them easier to parse --show-metadata includes pids and thread ids in logs --show-full-moniker adds full component monikers instead of abbreviated monikers
* vm/starnix: retry adb commands during syz-manager startupLaura Peskin2024-02-031-31/+69
| | | | | | | | | | adb commands often fail on the first try due to connection problems, but succeed within a few retries. Rather than restarting the vm boot process on every failure, retry each command up to a timeout. Also adjusts some log levels so that individual retries are logged at level 1 instead of 0.
* vm/starnix: always start emulator with userspace networkingLaura Peskin2024-02-031-1/+1
| | | | | | | eepeep@ notes that ffx emu currently doesn't support multiple vms with tun/tap networking, so the second+ instance will fall back to userspace networking. For consistency across instances, make this the standard.
* vm/starnix: run adbd as rootLaura Peskin2024-02-031-0/+14
| | | | | This is the simplest way to push binaries and scripts to /data on target, now that permissions are implemented.
* vm/starnix: prevent hangs during instance shutdownCameron Finucane2023-11-091-8/+68
| | | | | | | Two fixes for issues that were causing hangs during Close(): - Close our copy of the pipe end we pass to `ffx log`. - Call `ffx` directly, not through the bash script trampoline that doesn't propagate kill signals to its children.
* vm/starnix: don't block on syz-fuzzer commandLaura Peskin2023-10-311-2/+5
| | | | | | | | | | After this change, the instance's `MonitorExecution` method runs concurrently with test program execution, as intended. Basic crash detection is working. TODOs for follow-ups include: - testing that crashes are repro'd and reports are generated - restarting the vm after a crash
* all: use special placeholder for errorsTaras Madan2023-07-241-6/+6
|
* vm/starnix: add support for fuzzing starnix (#3624)juanPabloMiceli2023-01-191-0/+361
This commit adds a new VM for fuzzing starnix. The VM will boot a fuchsia image using the `ffx` tool and will connect to an adb server inside it. Fuzzing will be done using HostFuzzer mode due to some features not being implemented yet in starnix. Once this is possible, fuzzing will be performed without HostFuzzer mode. Co-authored-by: Juampi Miceli <jpmiceli@google.com>