Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

several caprevoke optimizations #2195

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Commits on Oct 9, 2024

  1. caprevoke: Make the skip_fault optimization smarter

    If, when scanning, we reach a VA that is unmapped and corresponds to a
    non-resident page, and the VM object is swap-backed and has no swap blocks
    assigned, we skip to the next resident page.
    
    Extend this optimization to the case where the object has swap blocks assigned:
    the in-memory tracking structure for a swap block includes a bitmap of all the
    capability tags, so when skipping we can search for the closer of
    - the next resident page
    - the next page backed by a swap block that has at least one capability tag.
    markjdb committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    c5427db View commit details
    Browse the repository at this point in the history
  2. caprevoke: Skip VM objects that have OBJ_HASCAP clear

    This skips over vnode mappings that have PROT_READ_CAP set in max_prot
    and thus avoids a lot of needless scanning.
    
    Add some counters so that we can see the relative effectiveness of different
    checks in reducing the number of scanned virtual pages.
    markjdb committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    0577a32 View commit details
    Browse the repository at this point in the history
  3. caprevoke: Bail if the target process exited during an async scan

    This avoids some needless work in cases where a short-lived process triggers
    async revocation.
    markjdb committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    f0dce4c View commit details
    Browse the repository at this point in the history