hyperlight-dev / hyperlight-dev/hyperlight

Remove possibility of silent errors in `vmem::TableOps`

Open
#1,128 0 comments 0 reactions 1 assignee Claimed by @syntactically View on GitHub
lifecycle/confirmed
Dominant language
Rust
Stars
4.7k
Forks
208
Avg merge
1d 7h
Merged PRs (30d)
47

Description

#1093 introduced
```rust
struct GuestPageTableBuffer {
buffer: std::cell::RefCell>,
}.
```
To avoid UB in the `into_bytes` implementation, this buffer made `Vec` instead of `Vec`. However this forced `read_entry` to possibly error silently using `unwrap_or(0)`.

We should remove the possibility of error occurring silently, either by panicking, or by rewriting `into_bytes` to avoid UB using `Vec`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.