Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Sep 2012 15:40:42 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        freebsd-current@freebsd.org, Svatopluk Kraus <onwahe@gmail.com>
Subject:   Re: [patch] mmap() MAP_TEXT implementation (to use for shared libraries)
Message-ID:  <201209071540.43013.jhb@freebsd.org>
In-Reply-To: <20120907184120.GD33100@deviant.kiev.zoral.com.ua>
References:  <CAFHCsPX6HrCXHA%2BS31Dz9QP8eiwbo21Vzju4K4paohciu2vPTw@mail.gmail.com> <201209071405.28831.jhb@freebsd.org> <20120907184120.GD33100@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209071540.43013.jhb>