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
sys::mman add netbsd's PROT_MPROTECT macro #2171
base: master
Are you sure you want to change the base?
Conversation
8b86f80
to
1baecee
Compare
test/sys/test_mman.rs
Outdated
prot.PROT_MPROTECT(ProtFlags::PROT_READ); | ||
|
||
unsafe { | ||
let ptr = mmap::<BorrowedFd>( |
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.
Anonymous mapping has been remvoed from the mmap(2)
interface, please use mmap_anonymous()
instead
303c9d2
to
90f9f18
Compare
Could you please explain what this is and how it can be properly used to me?
After reading the related manual pages and the test code provided in this PR, I am still confused about the functionality of this macro. Per the
You will get an |
90f9f18
to
09c7d93
Compare
This macro is for mprotect so let 's say you do this for mmap with this flag PROT_READ | PROT_WRITE | PROT_MPROTECT(PROT_EXEC) the actual page won t have PROT_EXEC flag allowed until mprotect request it, if that makes sense |
No description provided.