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

caprevoke: actually revoke unmapped entries #1744

Merged
merged 2 commits into from
Jul 11, 2023

Conversation

brooksdavis
Copy link
Member

In working on #1743 I discovered that I was the unmapped entry that was being revoked too early resulting in it never being removed except perhaps in the most accidental fashion. Fixing this turned up a bug when exiting a process that was in the load-side INITED state as we'd hit an assert when trying to unlink the entry being removed.

If we were in the process of revoking we need to NULL out map->rev_entry
so that vm_map_delete() is allowed to unlink the entry.  Also zero the
stats structure.
I'd put the call to vm_map_entry_end_revocation() at the end of the
initial store-side barrier so it somewhat worked, by accident, but was
missed more or less completely in the load-side case.
@brooksdavis brooksdavis requested review from nwf and markjdb July 10, 2023 23:06
@brooksdavis
Copy link
Member Author

These commits are also in #1743, but I want to include them in a pre-load-side removal tag.

@brooksdavis brooksdavis merged commit fbe5de0 into caprevoke Jul 11, 2023
@brooksdavis brooksdavis deleted the caprevoke-actually-revoke-unmapped-entries branch July 11, 2023 18:38
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.

1 participant