microsoft / microsoft/litebox

Support swapping per-thread fs register value

Open
#66 0 comments 0 reactions 1 assignee View on GitHub

@CvvT is already working on this.

Since Apr 1, 2025.

enhancement layer-platform
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.