Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In Linux it also needs mprotect() to change the permissions on the page so it can write it. The OpenBSD man page[0] indicate that it supports this as well, though notes that not all implementations are guaranteed to allow it, but my guess is it would generally work.

[0] https://man.openbsd.org/mprotect.2



It's not required on linux, if the ELF headers are set up such that the page is mapped rwx to begin with. (but rwx mappings are generally frowned upon from a security perspective)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: