Move box index initialization out of uVisor into usermode
- Dominant language
- C
- Stars
- 135
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Description
The box index is currently initialized in `vmpu_load_boxes`, which executed in privileged mode.
We want to move this initialization out of uvisor to be executed by the box itself when initialized.
A similar mechanism is already used to initialize the process heap, where the `active_heap` member is `NULL` and signals to the first invoker of malloc to initialize the process heap.
uVisor would therefore only zero the entire box bss, which zeroes the box index as well.
This can be used as an indicator to the box init method to initialize the box index.
Contributor guide
Research direction
Start by inspecting vmpu_load_boxes and the box initialization path, then compare how active_heap and malloc defer process-heap initialization. Done means the privileged loader only zeros the box BSS and the box itself initializes the box index when its index is still zero.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems, security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100