Skip to content

Commit 58873a2

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents fc1e06c + 435341c commit 58873a2

21 files changed

Lines changed: 81 additions & 43 deletions

File tree

‎.github/actions/setup-e2e-vm/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ runs:
6060
version: ${{ inputs.mise-version }}
6161

6262
- name: Cache Rust target and registry
63-
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
63+
uses: Swatinem/rust-cache@6a7bc3ebce750e0a16a430dd57485acfdb38b05f
6464
with:
6565
shared-key: ${{ inputs.rust-cache-key }}
6666
cache-on-failure: "true"

‎.github/actions/setup-rust/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ runs:
3030
3131
- name: Cache Rust target and registry
3232
id: cache
33-
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
33+
uses: Swatinem/rust-cache@6a7bc3ebce750e0a16a430dd57485acfdb38b05f
3434
with:
3535
shared-key: ${{ inputs.cache-key }}-${{ steps.dev-shell.outputs.hash }}
3636
save-if: ${{ inputs.save-cache }}

‎.github/workflows/build-rpm.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
fetch-depth: 0
6666

6767
- name: Cache Cargo dependencies
68-
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
68+
uses: Swatinem/rust-cache@6a7bc3ebce750e0a16a430dd57485acfdb38b05f
6969
with:
7070
shared-key: rpm-vendor-${{ inputs.arch }}
7171
cache-targets: "false"

‎.github/workflows/windows-msvc.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
- name: Install cargo-nextest
8585
run: mise install --locked github:nextest-rs/nextest
8686
- name: Cache Rust target and registry
87-
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
87+
uses: Swatinem/rust-cache@6a7bc3ebce750e0a16a430dd57485acfdb38b05f
8888
env:
8989
# Keep rust-cache's cargo metadata calls independent of the compiler
9090
# wrapper; build steps still inherit sccache from the job.
@@ -146,7 +146,7 @@ jobs:
146146
- name: Install cargo-nextest
147147
run: mise install --locked github:nextest-rs/nextest
148148
- name: Cache Rust target and registry
149-
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
149+
uses: Swatinem/rust-cache@6a7bc3ebce750e0a16a430dd57485acfdb38b05f
150150
env:
151151
RUSTC_WRAPPER: ""
152152
with:
@@ -201,7 +201,7 @@ jobs:
201201
rustup toolchain install
202202
rustup target add ${{ matrix.rust_target }}
203203
- name: Cache Rust target and registry
204-
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
204+
uses: Swatinem/rust-cache@6a7bc3ebce750e0a16a430dd57485acfdb38b05f
205205
env:
206206
RUSTC_WRAPPER: ""
207207
with:

‎Cargo.lock‎

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repository = "https://github.com/NVIDIA/OpenShell"
1616
# Product backend selection. Consumer crates inherit this choice.
1717
openshell-crypto = { path = "crates/openshell-crypto", default-features = false, features = ["aws-lc"] }
1818
# Async runtime
19-
tokio = { version = "1.43", features = ["full"] }
19+
tokio = { version = "1.53.3", features = ["full"] }
2020

2121
# gRPC/Protobuf
2222
tonic = "0.14"

‎crates/openshell-sandbox-backend/src/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
#![forbid(unsafe_code)]
4+
#![deny(unsafe_code)]
55

66
//! Concrete supervisor-side client for the Isolation Backend and Sandbox Protocol RPCs.
77
//!

‎crates/openshell-sandbox-backend/src/runtime_initiated.rs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,12 @@ impl Listener {
255255
socket.set_nonblocking(true)?;
256256
socket.bind(&socket2::SockAddr::vsock(libc::VMADDR_CID_ANY, port))?;
257257
socket.listen(64)?;
258+
// SAFETY: `socket` owns a valid descriptor and is moved into AsyncFd.
259+
// The descriptor is never closed or replaced while registered.
260+
#[allow(unsafe_code)]
261+
let listener = unsafe { tokio::io::unix::AsyncFd::register(socket)? };
258262
Ok(Self::Vsock {
259-
listener: tokio::io::unix::AsyncFd::new(socket)?,
263+
listener,
260264
guest_cid,
261265
})
262266
}

‎crates/openshell-sandbox/src/main_session.rs‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,12 @@ impl MainSession {
560560
) {
561561
match io {
562562
ProcessIo::Pty(master) => {
563-
let master = Arc::new(AsyncFd::new(master).expect("register canonical PTY master"));
563+
// SAFETY: `master` owns a valid PTY descriptor and is moved into AsyncFd.
564+
// The descriptor is never closed or replaced while registered.
565+
#[allow(unsafe_code)]
566+
let master =
567+
unsafe { AsyncFd::register(master) }.expect("register canonical PTY master");
568+
let master = Arc::new(master);
564569
let reader = Arc::clone(&master);
565570
let output = Arc::clone(this);
566571
tokio::spawn(async move {

‎crates/openshell-server/src/grpc/sandbox.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9378,7 +9378,8 @@ mod tests {
93789378
update_sandbox_cas(&state, &sandbox_id, 0, |sandbox| {
93799379
if first_attempt {
93809380
first_attempt = false;
9381-
barrier.wait();
9381+
// Hand off queued work so SQLx can return the connection to other writers.
9382+
tokio::task::block_in_place(|| barrier.wait());
93829383
}
93839384
let annotations = &mut sandbox.metadata.as_mut().unwrap().annotations;
93849385
let count = annotations

0 commit comments

Comments
 (0)