diff options
author | Zach Reizner <zachr@google.com> | 2019-08-13 11:20:14 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-10 02:09:13 +0000 |
commit | a8adff0ff14f66570a3aa86f6106b55081526be1 (patch) | |
tree | 515ed01d01828a8622bac5203d508da708db5d41 /src | |
parent | 0b6f02fea7716ec5752555ea44aafed214b58faa (diff) | |
download | crosvm-a8adff0ff14f66570a3aa86f6106b55081526be1.tar crosvm-a8adff0ff14f66570a3aa86f6106b55081526be1.tar.gz crosvm-a8adff0ff14f66570a3aa86f6106b55081526be1.tar.bz2 crosvm-a8adff0ff14f66570a3aa86f6106b55081526be1.tar.lz crosvm-a8adff0ff14f66570a3aa86f6106b55081526be1.tar.xz crosvm-a8adff0ff14f66570a3aa86f6106b55081526be1.tar.zst crosvm-a8adff0ff14f66570a3aa86f6106b55081526be1.zip |
devices: jail serial device
This change plumbs the jail throughout the arch specific device creation process. It also adds a custom callback support for the ProxyDevice so that the main process can interrupt the child serial process when it has incoming bytes. TEST=crosvm run BUG=None Change-Id: I6af7d2cb0acbba9bf42eaeeb294cee2bce4a1f36 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1752589 Reviewed-by: Dylan Reid <dgreid@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Zach Reizner <zachr@chromium.org> Commit-Queue: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/linux.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux.rs b/src/linux.rs index f6af012..bf78eb2 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -1352,6 +1352,7 @@ pub fn run_config(cfg: Config) -> Result<()> { components, cfg.split_irqchip, &cfg.serial_parameters, + simple_jail(&cfg, "serial.policy")?, |mem, vm, sys_allocator, exit_evt| { create_devices( &cfg, @@ -1580,7 +1581,6 @@ fn run_control( Ok(count) => { if let Some(ref stdio_serial) = linux.stdio_serial { stdio_serial - .lock() .queue_input_bytes(&out[..count]) .expect("failed to queue bytes into serial port"); } |