Skip to content

Conversation

@ValentaTomas
Copy link
Member

@ValentaTomas ValentaTomas commented Nov 3, 2025

Note

Replaces dirty page tracking with a thread-safe Tracker and updates UFFD, sandbox, and build components to use it, adding unregister support and minor API changes.

  • Block / Tracking:
    • Introduce block.Tracker (thread-safe bitset) with Has, Add, Reset, Offsets, BitSet, Clone; unit tests added.
    • Extend Slicer with BlockSize().
  • UFFD:
    • Change constructor to uffd.New(memfile, socketPath); remove TrackedSliceDevice usage.
    • MemoryBackend API: Disable(ctx) now returns *block.Tracker.
    • Implement unregister via UFFDIO_UNREGISTER; Uffd.Disable unregisters then returns Tracker from Dirty().
    • Track faults via block.Tracker with bounded concurrency; expose offsets iterator in cross-process tests.
    • Buffer Ready() channel.
  • Sandbox Integration:
    • On pause, call s.memory.Disable(ctx) and pass dirty.BitSet() to MemoryDiffCreator.
    • serveMemory updated for new UFFD constructor.
  • Build / Diff:
    • Add BlockSize() to NoDiff, localDiff, and StorageDiff.
  • Utils:
    • Add utils.TransformTo iterator helper.

Written by Cursor Bugbot for commit b6a0c3a. This will update automatically on new commits. Configure here.

Copy link
Contributor

@dobrac dobrac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm in general, just few nits

Base automatically changed from uffd-refactor to main November 10, 2025 20:06
@ValentaTomas
Copy link
Member Author

I'll do some last end-to-end testing and then we should be able to merge.

@ValentaTomas ValentaTomas changed the base branch from main to sandbox-integrity November 11, 2025 03:09
Base automatically changed from sandbox-integrity to main November 11, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants