Skip to content

Commit 9727ac9

Browse files
authored
Add OOPSLA paper, update dependencies (#126)
Signed-off-by: Wojciech Ozga <woz@zurich.ibm.com>
1 parent b64f6c8 commit 9727ac9

12 files changed

Lines changed: 62 additions & 49 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
build:
1111
runs-on: ubuntu-24.04
1212
steps:
13-
- uses: actions/checkout@v5
13+
- uses: actions/checkout@v7
1414
with:
1515
submodules: 'true'
1616
- name: install build dependencies

‎.github/workflows/verify.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest # container actions require GNU/Linux
1111
steps:
1212
- name: Checkout repository
13-
uses: actions/checkout@v5
13+
uses: actions/checkout@v7
1414
with:
1515
persist-credentials: false
1616
submodules: 'true'

‎README.md‎

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -163,33 +163,31 @@ Integrating local attestation with dm-crypt/LUKS is work in progress. When finis
163163
A script in initrd will then retrieve the decryption key from TAP and decrypt the rootfs.
164164

165165
# License
166-
This repository is distributed under the terms of the Apache 2.0 License, see [LICENSE](LICENSE).
167-
168-
**This is an active research project, without warranties of any kind.**
166+
This repository is distributed under the terms of the Apache 2.0 License, see [LICENSE](LICENSE). This is an active research project, without warranties of any kind.
169167

170168
# Citation
171-
**Our newest full paper on ACE:**
169+
**Full paper on ACE:**
172170
```
173171
@misc{ozga2025ace,
174172
author = {Ozga, Wojciech and Hunt, Guerney D. H. and Le, Michael V. and Gaeher Lennard and Shinnar, Avraham and Palmer, Elaine R. and Jamjoom, Hani and Dragone, Silvio},
175-
title = {ACE: Confidential Computing for Embedded RISC-V Systems},
173+
title = {ACE: Towards A High-Assurance Isolated Virtualization Environment for RISC-V},
176174
year = 2025,
177175
howpublished = {\url{https://arxiv.org/pdf/2505.12995}}
178176
}
179177
```
180178

181-
**Our workshop paper on ACE:**
179+
**Paper on formal verification of page allocator:**
182180
```
183-
@inproceedings{ozga2023riscvtee,
184-
title={Towards a Formally Verified Security Monitor for VM-based Confidential Computing},
185-
author={Ozga, Wojciech and Hunt, Guerney D. H. and Le, Michael V. and Palmer, Elaine R. and Shinnar, Avraham},
186-
booktitle = {Proceedings of the 12th International Workshop on Hardware and Architectural Support for Security and Privacy},
187-
series = {HASP2023},
188-
year={2023}
181+
@inproceedings{gaher2026rr,
182+
author = {Gäher, Lennard and Lafeychine, Vincent and Kehrli, Sascha and Shinnar, Avraham and Ozga, Wojciech and Hunt, Guerney D. H. and Dreyer, Derek},
183+
title = {Bringing Foundational Verification to Real-World Rust Code},
184+
booktitle = {Proceedings of the ACM on Programming Languages},
185+
series = {OOPSLA 2026},
186+
year = 2026
189187
}
190188
```
191189

192-
**Our paper on context switch validation:**
190+
**Paper on context switch validation:**
193191
```
194192
@misc{kalani2025sailor,
195193
author = {Kalani, Neelu and Bourgeat, Thomas and Hunt, Guerney D.H. and Ozga, Wojciech},
@@ -199,3 +197,15 @@ This repository is distributed under the terms of the Apache 2.0 License, see [L
199197
year = 2025
200198
}
201199
```
200+
201+
**Workshop paper on ACE:**
202+
```
203+
@inproceedings{ozga2023riscvtee,
204+
title={Towards a Formally Verified Security Monitor for VM-based Confidential Computing},
205+
author={Ozga, Wojciech and Hunt, Guerney D. H. and Le, Michael V. and Palmer, Elaine R. and Shinnar, Avraham},
206+
booktitle = {Proceedings of the 12th International Workshop on Hardware and Architectural Support for Security and Privacy},
207+
series = {HASP2023},
208+
year={2023}
209+
}
210+
```
211+

‎security-monitor/Cargo.lock‎

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

‎security-monitor/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pointers_utility = {path = "rust-crates/pointers_utility"}
2525
riscv-decode = "0.2"
2626

2727
# The `spin` crate provides synchronization primitives (Mutexes etc) using spinlocks
28-
spin = {version="0.10", default-features = false, features = ["once", "rwlock", "spin_mutex"]}
28+
spin = {version="0.12", default-features = false, features = ["once", "rwlock", "spin_mutex"]}
2929

3030
# This crates provides functionality to parse TVM attestation payload (TAP).
3131
riscv_cove_tap = {path = "rust-crates/riscv_cove_tap", features = ["parser"]}

‎security-monitor/rust-crates/riscv_cove_tap/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description = "Library to parse the RISC-V CoVE's TEE attestation payload"
66
edition = "2024"
77

88
[dependencies]
9-
rand = {version = "0.8.5", optional=true}
9+
rand = {version = "0.8.6", optional=true}
1010

1111
hybrid-array = "0.2.3"
1212
ml-kem = {version = "0.3.0-pre", default-features=false, features = [] }

‎security-monitor/src/core/memory_layout/confidential_memory_address.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// SPDX-FileCopyrightText: 2023 IBM Corporation
22
// SPDX-FileContributor: Wojciech Ozga <woz@zurich.ibm.com>, IBM Research - Zurich
33
// SPDX-License-Identifier: Apache-2.0
4+
use super::MemoryLayout;
45
use crate::error::Error;
56
use pointers_utility::{ptr_byte_add_mut, ptr_byte_offset};
6-
use super::MemoryLayout;
77

88
/// The wrapper over a raw pointer that is guaranteed to be an address located in the confidential memory region.
99
#[repr(transparent)]
@@ -38,7 +38,6 @@ impl ConfidentialMemoryAddress {
3838
self.0 as *const u8
3939
}
4040

41-
4241
#[rr::returns("self.(loc_a)")]
4342
pub fn as_usize(&self) -> usize {
4443
self.0.addr()

‎security-monitor/src/core/memory_layout/non_confidential_memory_address.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ impl NonConfidentialMemoryAddress {
5858
pub unsafe fn add(&self, offset_in_bytes: usize, upper_bound: *const usize) -> Result<NonConfidentialMemoryAddress, Error> {
5959
let memory_layout = MemoryLayout::read();
6060
ensure!(upper_bound <= memory_layout.non_confidential_memory_end, Error::AddressNotInNonConfidentialMemory())?;
61-
let pointer = ptr_byte_add_mut(self.0, offset_in_bytes, upper_bound).map_err(#[rr::verify] |_| Error::AddressNotInNonConfidentialMemory())?;
61+
let pointer = ptr_byte_add_mut(self.0, offset_in_bytes, upper_bound).map_err(
62+
#[rr::verify]
63+
|_| Error::AddressNotInNonConfidentialMemory(),
64+
)?;
6265
Ok(NonConfidentialMemoryAddress(pointer))
6366
}
6467

‎security-monitor/src/core/page_allocator/allocator.rs‎

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,11 @@ impl PageAllocator {
269269
#[rr::ok]
270270
#[rr::ensures("if_Ok ret (λ tok, tok.(page_sz) = {page_size_to_allocate})")]
271271
|page_allocator| {
272-
let base_address = page_allocator.base_address;
273-
let page_size = page_allocator.page_size;
274-
Ok(page_allocator.root.acquire_page_token(base_address, page_size, page_size_to_allocate))
275-
})?
272+
let base_address = page_allocator.base_address;
273+
let page_size = page_allocator.page_size;
274+
Ok(page_allocator.root.acquire_page_token(base_address, page_size, page_size_to_allocate))
275+
},
276+
)?
276277
}
277278

278279
/// Consumes the page tokens given by the caller, allowing for their further acquisition. This is equivalent to deallocation of the
@@ -288,23 +289,25 @@ impl PageAllocator {
288289
#[rr::requires(#iris "once_initialized π \"MEMORY_LAYOUT\" (Some MEMORY_CONFIG)")]
289290
#[rr::returns("Ok tt")]
290291
|page_allocator| {
291-
let base_address = page_allocator.base_address;
292-
let page_size = page_allocator.page_size;
293-
let root_node = &mut page_allocator.root;
294-
for page_token in released_pages {
295-
#[rr::params("γ")]
296-
#[rr::inv_vars("root_node")]
297-
#[rr::inv("root_node.ghost = γ")]
298-
#[rr::inv("root_node.cur.(max_node_size) = Size128TiB")]
299-
#[rr::inv("root_node.cur.(base_address) = 0%Z")]
300-
#[rr::ignore]
301-
#[allow(unused)]
302-
|| {};
303-
304-
root_node.store_page_token(base_address, page_size, page_token);
305-
}
306-
Ok(())
307-
}).unwrap();
292+
let base_address = page_allocator.base_address;
293+
let page_size = page_allocator.page_size;
294+
let root_node = &mut page_allocator.root;
295+
for page_token in released_pages {
296+
#[rr::params("γ")]
297+
#[rr::inv_vars("root_node")]
298+
#[rr::inv("root_node.ghost = γ")]
299+
#[rr::inv("root_node.cur.(max_node_size) = Size128TiB")]
300+
#[rr::inv("root_node.cur.(base_address) = 0%Z")]
301+
#[rr::ignore]
302+
#[allow(unused)]
303+
|| {};
304+
305+
root_node.store_page_token(base_address, page_size, page_token);
306+
}
307+
Ok(())
308+
},
309+
)
310+
.unwrap();
308311
//.inspect_err(|_| debug!("Memory leak: failed to store released pages in the page allocator"));
309312
}
310313

@@ -507,7 +510,6 @@ impl PageStorageTreeNode {
507510

508511
/// Creates children for the given node because the node gets created with an empty list of children, expecting that children will be
509512
/// created lazily with this function.
510-
///
511513
#[rr::params("smaller_sz")]
512514
/// Precondition: the page size argument has to match the node's logical state.
513515
#[rr::requires("this_node_page_size = self.cur.(max_node_size)")]
@@ -601,7 +603,6 @@ impl PageStorageTreeNode {
601603

602604
/// Merges page tokens owned by children.
603605
/// Safety: Requires that all children have been initialized.
604-
///
605606
#[rr::params("smaller_sz")]
606607
/// Precondition: The children are initialized.
607608
#[rr::requires("Hchild_init" : "self.cur.(children_initialized)")]

‎security-monitor/src/debug.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ macro_rules! debug {
8888
($fmt:expr, $($args:tt)+) => {{}};
8989
}
9090

91-
pub(crate) use {_debug, debug};
91+
pub(crate) use _debug;
92+
pub(crate) use debug;
9293

9394
pub struct Console {}
9495

0 commit comments

Comments
 (0)