From owner-freebsd-current@FreeBSD.ORG Fri Sep 7 19:41:25 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F3041065673 for ; Fri, 7 Sep 2012 19:41:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3363E8FC0A for ; Fri, 7 Sep 2012 19:41:25 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 96244B93B; Fri, 7 Sep 2012 15:41:24 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Date: Fri, 7 Sep 2012 15:40:42 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201209071405.28831.jhb@freebsd.org> <20120907184120.GD33100@deviant.kiev.zoral.com.ua> In-Reply-To: <20120907184120.GD33100@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201209071540.43013.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 07 Sep 2012 15:41:24 -0400 (EDT) Cc: freebsd-current@freebsd.org, Svatopluk Kraus Subject: Re: [patch] mmap() MAP_TEXT implementation (to use for shared libraries) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 19:41:25 -0000 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