| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
It allows to use context as a single termination signal source.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
It's better to follow standard interfaces.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Most of the VM types tightly manage the target they SSH into and can
safely assume that system wide SSH configuration would mess with the SSH
flags provided by syzkaller. However, in the "isolate" VM type, one can
connect to a host that is not at all managed by syzkaller. In this case,
it can be useful to leverage system wide SSH config, maybe provided by a
corporate environment.
This adds an option to the isolated config to skip some of the SSH and
SCP flags that would drop system wide config.
|
| | |
|
| |
|
|
|
|
| |
Cuttlefish instances are running out of memory;
increased size to allow for a margin on
running processes.
|
| |
|
|
|
|
|
| |
The current refactor does not return vmimpl.ErrTimeout()
when a timeout occurs.
The error handling has been changed to parse the return
string for the "timedout after" from osutil.RunCmd().
|
| |
|
|
|
|
|
|
|
|
|
| |
For Cuttlefish we want to read the console from the emulated device
instead of the "host" GCE instance. This allows us to pass a custom
command through to gce.Pool (and then to gce.instance) which is used
instead.
We also need to update runOnHost() to use osutil directly instead of
delegating to gceInst.Run(), since it's called during VM creation. When
setting up the VM the kernel logs don't exist yet.
|
| |
|
|
|
|
|
|
| |
The Cuttlefish sandbox uses SecComp to filter crosvm signals,
resulting in crosvm being killed during running.
Disabling this option allows Cuttlefish to run successfully.
Additionally, the report_anonymous_usage_stats flag is disabled to
prevent hanging when Cuttlefish is run from the daemon
|
| |
|
|
|
|
|
|
| |
Create the the deviceRoot directory, then
run adb commands from deviceRoot (data/fuzz).
Additionally, added quotes in adb shell mounting
command; commands should be run inside shell.
|
| |
|
|
|
|
| |
Mounting debugfs to sys/kernel/debug.
Fixing error that /sys/kernel/debug/kcov
does not exist.
|
| |
|
|
|
| |
The artifacts are copied in by the build() function in pkg/build/android.go. If we don't pass these
flags, Cuttlefish will start with the normal kernel, not the KASan-instrumented one we've built.
|
| | |
|
| |
|
|
|
|
|
|
| |
'nohup' allows us to let the process run after a timeout. We can check
the error message we get back from the command to see if it was
vmimpl.ErrTimeout and ignore it for commands we expect to continue
running in the background. We have to remove the wrapping of the error
with fmt.Errorf to do this comparison.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to tunnel ports from the Manager instance all the way through to the virtual device. We do
this by tunneling from the Manager to the worker GCE instance using 'socat' on the worker instance
and 'adb reverse' to forward the port on the device.
We need the 'socat' process to keep running for the tunnel to stay open. We can check for an error
on launch, but to check if the process is still running we send it a zero signal after waiting an
appropriate amount of time.
The 'adb reverse' command, by comparison returns immediately after the connection is established and
keeps the tunnel open. We loop until we find a valid/available port, similar to what is done in
vm/adb/adb.go. In practice, this nearly always finds a valid port on the first attempt.
|
| |
|
|
|
|
|
|
|
|
| |
To copy files onto the virutal device, we first copy them to the host
GCE instance using the 'gce.Copy()' function and then push it to the
device using 'adb push <src> <dst>'.
Running commands on the device is also simple and merely prepends "adb
shell" to the command run on the GCE instance. This results in an
overall command along the lines of "ssh adb shell <command>".
|
|
|
* vm/cuttlefish: add vm type for cuttlefish on gce
This new VM type embeds the existing 'gce' type to start an instance and
then run a Cuttlefish Android VM on it using the 'launch_cvd' binary
installed on it.
This requires us to make a few fields on the 'gce' type visible so that
'cuttlefish' can set them when starting the instance.
The remaining functionality (SSH forwarding, file copying, and running
commands on the nested Android VM will be in following changes.
For more information on Cuttlefish, see:
https://source.android.com/setup/create/cuttlefish
https://android.googlesource.com/device/google/cuttlefish/
* vm/cuttlefish: add vm type for cuttlefish on gce
This new VM type embeds the existing 'gce' type to start an instance and
then run a Cuttlefish Android VM on it using the 'launch_cvd' binary
installed on it.
This requires us to make a few fields on the 'gce' type visible so that
'cuttlefish' can set them when starting the instance.
The remaining functionality (SSH forwarding, file copying, and running
commands on the nested Android VM will be in following changes.
For more information on Cuttlefish, see:
https://source.android.com/setup/create/cuttlefish
https://android.googlesource.com/device/google/cuttlefish/
* vm/cuttlefish: add vm type for cuttlefish on gce
This new VM type embeds the existing 'gce' type to start an instance and
then run a Cuttlefish Android VM on it using the 'launch_cvd' binary
installed on it.
This requires us to make a few fields on the 'gce' type visible so that
'cuttlefish' can set them when starting the instance.
The remaining functionality (SSH forwarding, file copying, and running
commands on the nested Android VM will be in following changes.
For more information on Cuttlefish, see:
https://source.android.com/setup/create/cuttlefish
https://android.googlesource.com/device/google/cuttlefish/
* vm/cuttlefish: fix missed log.Logf(0 call to log.Logf(1
* vm/cuttlefish: remove unneeded log.Logf() calls
These logging for Count() isn't terribly useful since it's a single-line
call with very simple logic.
For the unimplemented methods the log lines have limited utility since
they're already returning error messages which will get logged.
|