crosvm/swap/Cargo.toml
Shintaro Kawamura 7654908fec swap: switch page fault logger with compiler feature flag
page fault logger is only for debugging purpose. It has a security
concern about exposing the trigger to enable the logger. The logger will
make the page fault handling slower and consumes disk resources.

Instead, the page fault logger is only enabled by compiler feature flag
like:

```
cargo build --features=swap,swap/log_page_fault
```

Opening a file on the monitor process is blocking the upcoming minijail
migration. Open the log file on the main process and pass the file
descriptor to the monitor process.

BUG=b:269372016
TEST=manual test

Change-Id: I5df2a32da7fb149680fa24617ffd905b2483108b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4253287
Reviewed-by: David Stevens <stevensd@chromium.org>
Commit-Queue: Shin Kawamura <kawasin@google.com>
2023-02-15 07:06:22 +00:00

28 lines
650 B
TOML

[package]
name = "swap"
version = "0.1.0"
authors = ["The ChromiumOS Authors"]
edition = "2021"
[features]
trace_marker = ["cros_tracing/trace_marker"]
log_page_fault = []
[target.'cfg(unix)'.dependencies]
anyhow = "*"
base = { path = "../base" }
cros_tracing = { path = "../cros_tracing" }
data_model = { path = "../common/data_model" }
libc = "*"
minijail = "*"
num_cpus = "*"
once_cell = "*"
remain = "*"
serde = { version = "1", features = [ "derive" ] }
serde_json = "*"
sync = { path = "../common/sync" } # provided by ebuild
tempfile = "*"
thiserror = "*"
userfaultfd-sys = "0.4.2"
userfaultfd = "0.5.0"
vm_memory = { path = "../vm_memory"}