[patch] mmap() MAP_TEXT implementation (to use for shared
libraries)
John Baldwin
jhb at freebsd.org
Fri Sep 7 19:41:25 UTC 2012
On Friday, September 07, 2012 2:41:20 pm Konstantin Belousov wrote:
> > I think these would be rare? There's no good reason for anything to write to
> > a shared library that I can think of. install(1) does an atomic rename to swap
> > in the new libraries already.
>
> After a second thought, I do not like your proposal as well. +x is set for
> shebang scripts, and allowing PROT_EXEC to set VV_TEXT for them means
> that such scripts are subject for write denial.
Yeah, that's fair. Also, I hunted around to find the description of MAP_TEXT
in Solaris 11. It seems from reading that that MAP_TEXT on Solaris isn't used
to prevent writes ala VV_TEXT. Instead, it is used as a hint that is
apparently used to use superpages for text.
--
John Baldwin
More information about the freebsd-current
mailing list