Support swapping per-thread fs register value
@CvvT is already working on this.
Since Apr 1, 2025.
- Dominant language
- Rust
- Stars
- 2.7k
- Forks
- 144
- Avg merge
- 12h 21m
- Merged PRs (30d)
- 146
Description
Briefly noting an idea we discussed IRL: since our main usage for storing fs register value is to support a swap, we can maintain a (global, rwlocked) hashmap that tells us the swaps. We would need to set up a state-machine-like thing to leave values "unlinked" until we find the link (during libc initialization), but generally speaking, the idea seems feasible.
@CvvT is also exploring some pthread internals to see if they might be helpful as an alternative, just in case that ends up simpler, but yeah, we have ways to solve this :)
Originally posted by @jaybosamiya-ms in https://github.com/MSRSSP/litebox/issues/56#issuecomment-2759672534
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.
Assessment
This issue has not been assessed yet.