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

Bbm2 #42

Merged
merged 2 commits into from Oct 31, 2023
Merged

Bbm2 #42

merged 2 commits into from Oct 31, 2023

Conversation

ardbiesheuvel
Copy link
Collaborator

@ardbiesheuvel ardbiesheuvel commented Oct 26, 2023

Take 2.

The check_range_bbm() routine will return an Err() Result of type
MapError::BreakBeforeMakeViolation on any errors returned by the call to
walk_range(), including ones that are the result of other issues.

Let's avoid this by only converting PteUpdateFault errors into
BreakBeforeMakeViolation, and leaving other error types untouched.
Passing the entire range back to the caller on a break-before-make (BBM)
violation is not very helpful. We might add a violation type to the enum
later but let's at least return the subrange that actually triggered the
failure, which is expected to be far more useful to the caller.

To allow the closure used by check_range_bbm() to return MapErrors
directly, tweak the internal API and make the () -> MapError conversion
an implementation detail of the public walk_range() API.
@qwandor qwandor merged commit 39e7e39 into google:main Oct 31, 2023
3 checks passed
@ardbiesheuvel ardbiesheuvel deleted the bbm2 branch October 31, 2023 16:39
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.

None yet

3 participants