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

Consider making map_range return an error for unsafe changes #13

Closed
qwandor opened this issue Jul 26, 2022 · 1 comment
Closed

Consider making map_range return an error for unsafe changes #13

qwandor opened this issue Jul 26, 2022 · 1 comment

Comments

@qwandor
Copy link
Collaborator

qwandor commented Jul 26, 2022

In particular, any change which requires break-before-make shouldn't be made while the page table is active. This could check the state of previous_ttbr to determine whether it is active, pass it down into the walker code, and then return an error if some part of the change is invalid in that case.

The problem is that part of the range being mapped might be fine and part might not be, so it might end up creating a partial mapping before realising that it should return an error. Rolling this back isn't safe either. We could do a first walk to check whether it is valid then a second to actually make the change, I guess, but that would introduce a runtime overhead in the normal case.

@qwandor
Copy link
Collaborator Author

qwandor commented Oct 25, 2023

Fixed by #36.

@qwandor qwandor closed this as completed Oct 25, 2023
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

No branches or pull requests

1 participant