-
Notifications
You must be signed in to change notification settings - Fork 61
Implement mprotect #41
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
Conversation
Page align any non-aligned program headers, fixing up the file offset and filesz accordingly.
Add a function for calculating the set difference when punching one region out of another.
Implement a `shrink_to` function for a VMA. This shrinks the VMA's region to the specified region, while recalculating file offsets and size if the VMA is file-backed.
9776f41 to
321a3be
Compare
Implement the `mprotect` syscall. Including a bunch of tests for ensuring proper VMA functionality regarding splitting and merging via `mprotect`.
321a3be to
ba6666f
Compare
|
@arihant2math @BjornTheProgrammer Please feel free to do a quick review. On my machine, this implements enough syscall for me to be able to run 🎉 |
BjornTheProgrammer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No modifications were needed to get this properly working on my machine!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here (aarch64 macos host).
|
Perfect. Thanks for checking. |
Implement the
mprotectsyscall, splitting VMAs if required, etc.