Re: [patch] mmap() MAP_TEXT implementation (to use for shared libraries)

From: John Baldwin <jhb_at_freebsd.org>
Date: Fri, 7 Sep 2012 15:40:42 -0400
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
Received on Fri Sep 07 2012 - 17:41:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC