Reduce/eliminate unsafe code in the shims
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.7k
- Forks
- 144
- Avg merge
- 12h 21m
- Merged PRs (30d)
- 146
Description
In order to make useful safety claims about LiteBox as a whole, I think we need to better layer our use of unsafe across the LiteBox stack. Considering the four layers:
- Platform code requires lots of unsafe, since it is integrating with OS primitives that the Rust borrow checker and even Verus cannot easily reason about.
- Runner code's use of unsafe depends on how well the associated platform manages to provide safe methods on top of the unsafe code.
liteboxcode requires unsafe to implement mutexes and other low-level data structures... but this type of code is probably formally verifiable via Verus.- Shim code should require no unsafe code--it should be built on top of abstractions provided by
litebox.
This issue is most concerned with shim code. We should drive all uses of unsafe out of the shims and into litebox.
The biggest offender is user-mode memory access. We will need to consider #505 as part of this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inventorying unsafe uses in the shim code and read issue #505 for the user-mode memory-access constraints. Compare each use with the abstractions currently provided by litebox and the platform or runner layers. Done means shim code no longer uses unsafe while its existing behavior remains supported by lower layers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems, security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100