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

Fix for the vsyscall segment & support for the uffd-wp bit #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tramasys
Copy link

Heya, just shooting you a tiny commit with an addition and a fix for the vsyscall segment.

uffd-wp

This just extends the PageMapEntry impl, to include the 57th bit for the uffd-wp flag (available since 5.13, see: https://www.kernel.org/doc/Documentation/admin-guide/mm/userfaultfd.rst)

vsyscall

Using the start address of the vsyscall segment to index into the pagemap will always return an empty buffer (i.e for a pread64 syscall). This causes an PageMapError::Read in your code in the pagemap_vma function (it's an UnexpectedEof to be precise). By filtering out this segment in the pagemap function, we can prevent this error from happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant