From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 25 08:09:47 2016 Received: (at submit) by debbugs.gnu.org; 25 Apr 2016 12:09:47 +0000 Received: from localhost ([127.0.0.1]:45750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aufKl-0007E8-I4 for submit@debbugs.gnu.org; Mon, 25 Apr 2016 08:09:47 -0400 Received: from danbala.ifoer.tuwien.ac.at ([128.130.168.64]:60367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aufKj-0007E0-Ky for submit@debbugs.gnu.org; Mon, 25 Apr 2016 08:09:46 -0400 Received: by danbala.ifoer.tuwien.ac.at (Postfix, from userid 116) id 9B4C4A59A; Mon, 25 Apr 2016 14:09:44 +0200 (CEST) Date: Mon, 25 Apr 2016 14:09:44 +0200 From: Thomas Klausner To: submit@debbugs.gnu.org Subject: emacs: paxctl usage on NetBSD Message-ID: <20160425120944.GL7662@danbala.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Package: emacs Version: 25.1.50 emacs is using paxctl during the build, in two ways: "paxctl -zex file" and "paxctl -r file" However, the NetBSD version of paxctl has a different usage, e.g. "paxctl +a file" would turn off ASLR. For more details, see http://netbsd.gw.com/cgi-bin/man-cgi?paxctl++NetBSD-current When I replace 'paxctl -zex' with 'paxctl +a' in src/Makefile.in, the build succeeds. Thomas From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 25 11:52:38 2016 Received: (at control) by debbugs.gnu.org; 25 Apr 2016 15:52:38 +0000 Received: from localhost ([127.0.0.1]:46701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auioQ-0005wX-D9 for submit@debbugs.gnu.org; Mon, 25 Apr 2016 11:52:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auioP-0005wI-OO for control@debbugs.gnu.org; Mon, 25 Apr 2016 11:52:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auioK-0001Ao-3y for control@debbugs.gnu.org; Mon, 25 Apr 2016 11:52:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auioK-0001Ak-0w for control@debbugs.gnu.org; Mon, 25 Apr 2016 11:52:32 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1auioJ-0004Wx-LK for control@debbugs.gnu.org; Mon, 25 Apr 2016 11:52:31 -0400 Subject: control message for bug 19759 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Mon, 25 Apr 2016 11:52:31 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) block 19759 by 23371 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 25 20:10:06 2016 Received: (at 23371) by debbugs.gnu.org; 26 Apr 2016 00:10:06 +0000 Received: from localhost ([127.0.0.1]:47150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auqZq-0004gi-9J for submit@debbugs.gnu.org; Mon, 25 Apr 2016 20:10:06 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:37112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auqZo-0004gA-RB for 23371@debbugs.gnu.org; Mon, 25 Apr 2016 20:10:05 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 34BDF16124C; Mon, 25 Apr 2016 17:09:58 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id xniulM3UhG7T; Mon, 25 Apr 2016 17:09:57 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4443616125C; Mon, 25 Apr 2016 17:09:57 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6ZFeetSC4Kck; Mon, 25 Apr 2016 17:09:57 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 26F8F16124C; Mon, 25 Apr 2016 17:09:57 -0700 (PDT) To: Thomas Klausner From: Paul Eggert Subject: Re: emacs: paxctl usage on NetBSD Organization: UCLA Computer Science Department Message-ID: <2c48d1df-764e-09a0-5945-05148523b768@cs.ucla.edu> Date: Mon, 25 Apr 2016 17:09:56 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------263BF4E96C6A5D84C0366068" X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 23371 Cc: 23371@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a multi-part message in MIME format. --------------263BF4E96C6A5D84C0366068 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > When I replace 'paxctl -zex' with 'paxctl +a' in src/Makefile.in, the > build succeeds. Did you do something other than just that replacement? configure.ac says that paxctl is used only when the operating system is GNU/Linux, unless one manually configures by setting PAXCTL in the environment or using a PAXCTL=/some/path argument to 'configure'. Does the attached patch to the emacs-25 branch work for you? --------------263BF4E96C6A5D84C0366068 Content-Type: application/x-patch; name="0001-Port-dumping-to-NetBSD-with-PaX.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-Port-dumping-to-NetBSD-with-PaX.patch" RnJvbSA4NDEyYjYzODk1NWM5ZDQ3MjQ1MjVmY2Q2Y2QzZWM1ZWI4NDhkYmMzIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QHBlbmd1aW4uY3Mu dWNsYS5lZHU+CkRhdGU6IE1vbiwgMjUgQXByIDIwMTYgMTc6MDY6NTQgLTA3MDAKU3ViamVj dDogW1BBVENIXSBQb3J0IGR1bXBpbmcgdG8gTmV0QlNEIHdpdGggUGFYCgpQcm9ibGVtIHJl cG9ydGVkIGJ5IFRob21hcyBLbGF1c25lciAoQnVnIzIzMzcxKS4KKiBjb25maWd1cmUuYWMg KFBBWENUTF9kdW1wZWQsIFBBWENUTF9ub3RkdW1wZWQpOiBOZXcgdmFycy4KU2V0IHRoZW0g dG8gc2V0ZmF0dHIgYW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VhUKSAkQAog ZW5kaWYKIAlAOiBDb21waWxlIHNvbWUgZmlsZXMgZWFybGllciB0byBzcGVlZCB1cCBmdXJ0 aGVyIGNvbXBpbGF0aW9uLgotLSAKMi41LjUKCg== --------------263BF4E96C6A5D84C0366068-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 25 20:11:40 2016 Received: (at control) by debbugs.gnu.org; 26 Apr 2016 00:11:40 +0000 Received: from localhost ([127.0.0.1]:47154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auqbM-0004j2-Ia for submit@debbugs.gnu.org; Mon, 25 Apr 2016 20:11:40 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:37194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auqbK-0004in-GE for control@debbugs.gnu.org; Mon, 25 Apr 2016 20:11:38 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3B30816125C for ; Mon, 25 Apr 2016 17:11:33 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id IPUiGI9Ot7my for ; Mon, 25 Apr 2016 17:11:32 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9DEEB161282 for ; Mon, 25 Apr 2016 17:11:32 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4zxFV_AxNxEr for ; Mon, 25 Apr 2016 17:11:32 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 85DAC16124C for ; Mon, 25 Apr 2016 17:11:32 -0700 (PDT) To: control@debbugs.gnu.org From: Paul Eggert Subject: 23371 has a patch Organization: UCLA Computer Science Department Message-ID: <9dd22f1b-6731-95a6-6ce1-4927b55c82f2@cs.ucla.edu> Date: Mon, 25 Apr 2016 17:11:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 23371 patch From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 11:54:45 2016 Received: (at 23371) by debbugs.gnu.org; 27 Apr 2016 15:54:45 +0000 Received: from localhost ([127.0.0.1]:50202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avRnZ-0005l9-Av for submit@debbugs.gnu.org; Wed, 27 Apr 2016 11:54:45 -0400 Received: from danbala.ifoer.tuwien.ac.at ([128.130.168.64]:58958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avRnX-0005l0-8h for 23371@debbugs.gnu.org; Wed, 27 Apr 2016 11:54:43 -0400 Received: by danbala.ifoer.tuwien.ac.at (Postfix, from userid 116) id 47DECA508; Wed, 27 Apr 2016 17:54:42 +0200 (CEST) Date: Wed, 27 Apr 2016 17:54:42 +0200 From: Thomas Klausner To: Paul Eggert Subject: Re: emacs: paxctl usage on NetBSD Message-ID: <20160427155442.GN7662@danbala.tuwien.ac.at> References: <2c48d1df-764e-09a0-5945-05148523b768@cs.ucla.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="phCU5ROyZO6kBE05" Content-Disposition: inline In-Reply-To: <2c48d1df-764e-09a0-5945-05148523b768@cs.ucla.edu> X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 23371 Cc: 23371@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --phCU5ROyZO6kBE05 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Paul! Thanks for the fast reply! On Mon, Apr 25, 2016 at 05:09:56PM -0700, Paul Eggert wrote: > >When I replace 'paxctl -zex' with 'paxctl +a' in src/Makefile.in, the > >build succeeds. > > Did you do something other than just that replacement? No. > configure.ac says > that paxctl is used only when the operating system is GNU/Linux, unless one > manually configures by setting PAXCTL in the environment or using a > PAXCTL=/some/path argument to 'configure'. That's true, but src/Makefile.in ignores that: PAXCTL_if_present = $(or $(PAXCTL),: paxctl) > Does the attached patch to the emacs-25 branch work for you? I've modified it to apply to git head but it didn't work: Finding pointers to doc strings... Finding pointers to doc strings...done Loading /scratch/wip/emacs-current/work/emacs/lisp/site-init.el (source)... Dumping under the name emacs 18932704 of 33554432 static heap bytes used 91843 pure bytes used /usr/sbin/paxctl +a emacs mv -f emacs bootstrap-emacs /usr/sbin/paxctl +a bootstrap-emacs /usr/pkg/bin/gmake -C ../lisp compile-first EMACS="../src/bootstrap-emacs" gmake[3]: Entering directory '/scratch/wip/emacs-current/work/emacs/lisp' ELC emacs-lisp/macroexp.elc Memory fault (core dumped) Makefile:282: recipe for target 'emacs-lisp/macroexp.elc' failed My version is attached (I added some more paxctl's for the symlinks when the original version didn't work.) I hope I didn't break it. Thomas --phCU5ROyZO6kBE05 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-configure.ac" $NetBSD$ Problem reported by Thomas Klausner (Bug#23371). * configure.ac (PAXCTL_dumped, PAXCTL_notdumped): New vars. Set them to setfattr and/or paxctl commands appropriate for GNU/Linux and/or NetBSD; the latter prefers paxctl +a. Search for paxctl only if setfattr is not found. * src/Makefile.in (PAXCTL_dumped, PAXCTL_notdumped): New vars, replacing PAXCTL_if_present and SETFATTR_if_present. All uses changed. --- configure.ac.orig 2016-04-22 16:23:52.000000000 +0000 +++ configure.ac @@ -1159,16 +1159,9 @@ AC_PATH_PROG(GZIP_PROG, gzip) test $with_compress_install != yes && test -n "$GZIP_PROG" && \ GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)" +PAXCTL_dumped= +PAXCTL_notdumped= if test $opsys = gnu-linux; then - AC_PATH_PROG(PAXCTL, paxctl,, - [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) - if test "X$PAXCTL" != X; then - AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then AC_MSG_RESULT(yes) - else AC_MSG_RESULT(no); PAXCTL=""; fi]) - fi - if test "${SETFATTR+set}" != set; then AC_CACHE_CHECK([for setfattr], [emacs_cv_prog_setfattr], @@ -1179,6 +1172,7 @@ if test $opsys = gnu-linux; then emacs_cv_prog_setfattr=no fi]) if test "$emacs_cv_prog_setfattr" = yes; then + PAXCTL_notdumped='$(SETFATTR) -n user.pax.flags -v er' SETFATTR=setfattr else SETFATTR= @@ -1187,6 +1181,31 @@ if test $opsys = gnu-linux; then AC_SUBST([SETFATTR]) fi fi +case $opsys,$PAXCTL_notdumped in + gnu-linux, | netbsd,) + AC_PATH_PROG([PAXCTL], [paxctl], [], + [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) + if test -n "$PAXCTL"; then + if test "$opsys" = netbsd; then + PAXCTL_dumped='$(PAXCTL) +a' + else + AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], + [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PAXCTL= + fi]) + if test -n "$PAXCTL"; then + PAXCTL_dumped='$(PAXCTL) -zex' + PAXCTL_notdumped='$(PAXCTL) -r' + fi + fi + fi;; +esac +AC_SUBST([PAXCTL_dumped]) +AC_SUBST([PAXCTL_notdumped]) ## Need makeinfo >= 4.7 (?) to build the manuals. if test "$MAKEINFO" != "no"; then --phCU5ROyZO6kBE05 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-src_Makefile.in" $NetBSD$ Problem reported by Thomas Klausner (Bug#23371). * configure.ac (PAXCTL_dumped, PAXCTL_notdumped): New vars. Set them to setfattr and/or paxctl commands appropriate for GNU/Linux and/or NetBSD; the latter prefers paxctl +a. Search for paxctl only if setfattr is not found. * src/Makefile.in (PAXCTL_dumped, PAXCTL_notdumped): New vars, replacing PAXCTL_if_present and SETFATTR_if_present. All uses changed. --- src/Makefile.in.orig 2016-04-17 20:51:40.000000000 +0000 +++ src/Makefile.in @@ -114,8 +114,9 @@ TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(L ## around this, newer ones setfattr. See Bug#11398 and Bug#16343. PAXCTL = @PAXCTL@ SETFATTR = @SETFATTR@ -PAXCTL_if_present = $(or $(PAXCTL),: paxctl) -SETFATTR_if_present = $(or $(SETFATTR),: setfattr) +## Commands to set PaX flags on dumped and not-dumped instances of Emacs. +PAXCTL_dumped = @PAXCTL_dumped@ +PAXCTL_notdumped = @PAXCTL_notdumped@ ## Some systems define this to request special libraries. LIBS_SYSTEM=@LIBS_SYSTEM@ @@ -542,8 +543,13 @@ ifeq ($(CANNOT_DUMP),yes) ln -f temacs$(EXEEXT) $@ else LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup dump - $(PAXCTL_if_present) -zex $@ +ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) $@ +endif ln -f $@ bootstrap-emacs$(EXEEXT) +ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) bootstrap-emacs$(EXEEXT) +endif endif ## We run make-docfile twice because the command line may get too long @@ -606,8 +612,9 @@ temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) -o temacs $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES) $(MKDIR_P) $(etc) ifneq ($(CANNOT_DUMP),yes) - $(PAXCTL_if_present) -r $@ - $(SETFATTR_if_present) -n user.pax.flags -v er $@ + ifneq ($(PAXCTL_notdumped),) + $(PAXCTL_notdumped) $@ + endif endif ## The following oldxmenu-related rules are only (possibly) used if @@ -748,8 +755,13 @@ ifeq ($(CANNOT_DUMP),yes) ln -f temacs$(EXEEXT) $@ else $(RUN_TEMACS) --batch $(BUILD_DETAILS) --load loadup bootstrap - $(PAXCTL_if_present) -zex emacs$(EXEEXT) +ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) emacs$(EXEEXT) +endif mv -f emacs$(EXEEXT) $@ +ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) $@ +endif endif @: Compile some files earlier to speed up further compilation. $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" --phCU5ROyZO6kBE05-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 15:39:05 2016 Received: (at 23371) by debbugs.gnu.org; 27 Apr 2016 19:39:05 +0000 Received: from localhost ([127.0.0.1]:50633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avVIf-00013q-Di for submit@debbugs.gnu.org; Wed, 27 Apr 2016 15:39:05 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43909) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avVIc-00013M-LP for 23371@debbugs.gnu.org; Wed, 27 Apr 2016 15:39:04 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 32380160508; Wed, 27 Apr 2016 12:38:56 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id FujED-LzZSp1; Wed, 27 Apr 2016 12:38:53 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E6915160D1E; Wed, 27 Apr 2016 12:38:53 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Iwxg_K52leaH; Wed, 27 Apr 2016 12:38:53 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id CA638160508; Wed, 27 Apr 2016 12:38:53 -0700 (PDT) Subject: Re: emacs: paxctl usage on NetBSD To: Thomas Klausner References: <2c48d1df-764e-09a0-5945-05148523b768@cs.ucla.edu> <20160427155442.GN7662@danbala.tuwien.ac.at> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <3f6aba54-4f40-817c-24f9-942b033d2289@cs.ucla.edu> Date: Wed, 27 Apr 2016 12:38:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20160427155442.GN7662@danbala.tuwien.ac.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 23371 Cc: 23371@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 04/27/2016 08:54 AM, Thomas Klausner wrote: >> configure.ac says >> that paxctl is used only when the operating system is GNU/Linux, unless one >> manually configures by setting PAXCTL in the environment or using a >> PAXCTL=/some/path argument to 'configure'. > That's true, but src/Makefile.in ignores that: > PAXCTL_if_present = $(or $(PAXCTL),: paxctl) I guess I'm still not following. On non-GNU/Linux hosts, $(PAXCTL) should be empty because paxctl is not searched for, so PAXCTL_if_present should be ': paxctl', i.e., a no-op shell command. And yet you reported that your build used 'paxctl -zex' and 'paxctl -r'. Perhaps your build was actually using the no-ops ': paxctl -zex' and ': paxctl -r' and you didn't notice the colons? That is, perhaps you replaced ': paxctl -zex' (with a prefix colon) with 'paxctl +a' (without the colon)? > > My version is attached (I added some more paxctl's for the symlinks > when the original version didn't work.) I hope I didn't break it. Did it work with your version? If so, does 'ln' and/or 'mv' remove the mark placed on an executable by 'paxctl +a'? and if that happens, how does 'make install' avoid removing the mark in the installed Emacs? If not, then I'm afraid I'm lost. Also, I noticed that you removed the indenting on some of the 'ifeq' lines in src/Makefile.in; why was that necessary? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 18:50:41 2016 Received: (at 23371) by debbugs.gnu.org; 27 Apr 2016 22:50:41 +0000 Received: from localhost ([127.0.0.1]:50909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avYI5-0000Qa-37 for submit@debbugs.gnu.org; Wed, 27 Apr 2016 18:50:41 -0400 Received: from danbala.ifoer.tuwien.ac.at ([128.130.168.64]:58720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avYI2-0000QQ-M1 for 23371@debbugs.gnu.org; Wed, 27 Apr 2016 18:50:39 -0400 Received: by danbala.ifoer.tuwien.ac.at (Postfix, from userid 116) id 6070DA5A2; Thu, 28 Apr 2016 00:50:37 +0200 (CEST) Date: Thu, 28 Apr 2016 00:50:37 +0200 From: Thomas Klausner To: Paul Eggert Subject: Re: emacs: paxctl usage on NetBSD Message-ID: <20160427225037.GQ7662@danbala.tuwien.ac.at> References: <2c48d1df-764e-09a0-5945-05148523b768@cs.ucla.edu> <20160427155442.GN7662@danbala.tuwien.ac.at> <3f6aba54-4f40-817c-24f9-942b033d2289@cs.ucla.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="sClP8c1IaQxyux9v" Content-Disposition: inline In-Reply-To: <3f6aba54-4f40-817c-24f9-942b033d2289@cs.ucla.edu> X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 23371 Cc: 23371@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --sClP8c1IaQxyux9v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 27, 2016 at 12:38:53PM -0700, Paul Eggert wrote: > On 04/27/2016 08:54 AM, Thomas Klausner wrote: > >>configure.ac says > >>that paxctl is used only when the operating system is GNU/Linux, unless one > >>manually configures by setting PAXCTL in the environment or using a > >>PAXCTL=/some/path argument to 'configure'. > >That's true, but src/Makefile.in ignores that: > >PAXCTL_if_present = $(or $(PAXCTL),: paxctl) > > I guess I'm still not following. On non-GNU/Linux hosts, $(PAXCTL) should be > empty because paxctl is not searched for, so PAXCTL_if_present should be ': > paxctl', i.e., a no-op shell command. And yet you reported that your build > used 'paxctl -zex' and 'paxctl -r'. Perhaps your build was actually using > the no-ops ': paxctl -zex' and ': paxctl -r' and you didn't notice the > colons? That is, perhaps you replaced ': paxctl -zex' (with a prefix colon) > with 'paxctl +a' (without the colon)? You're right, I didn't do exactly what I described. The build system as-is does not use paxctl on NetBSD, so this breaks when ASLR is enabled. I run the following sed expressions on src/Makefile.in: 's,$$(PAXCTL_if_present) -zex,/usr/sbin/paxctl +a,g' 's,$$(PAXCTL_if_present) -r,/usr/sbin/paxctl +a,g' > >My version is attached (I added some more paxctl's for the symlinks > >when the original version didn't work.) I hope I didn't break it. > > Did it work with your version? No, I just posted it so you can see what I did. > If so, does 'ln' and/or 'mv' remove the mark placed on an executable by > 'paxctl +a'? and if that happens, how does 'make install' avoid removing the > mark in the installed Emacs? > > If not, then I'm afraid I'm lost. All of cp, mv, and ln keep the paxctl settings: # paxctl a PaX flags: a: ASLR, explicit disable # cp a b # paxctl b PaX flags: a: ASLR, explicit disable # ln b c # paxctl c PaX flags: a: ASLR, explicit disable # mv c d # paxctl d PaX flags: a: ASLR, explicit disable I wasn't sure of that, so I added the extra ones, since it wasn't working. It's not necessary, so I removed it again. > Also, I noticed that you removed the indenting on some of the 'ifeq' lines > in src/Makefile.in; why was that necessary? Because the patch didn't apply cleanly, I had to manually apply it, and I didn't indent it correctly, sorry. So perhaps there is a different problem and paxctl is not properly detected or applied even with your patch. Let's look more closely: PAXCTL_dumped value: work/emacs/config.log:PAXCTL_dumped='$(PAXCTL) +a' work/emacs/lib/Makefile:PAXCTL_dumped = $(PAXCTL) +a work/emacs/src/Makefile:PAXCTL_dumped = $(PAXCTL) +a PAXCTL itself: work/emacs/config.log:PAXCTL='/usr/sbin/paxctl' work/emacs/lib/Makefile:PAXCTL = /usr/sbin/paxctl work/emacs/src/Makefile:PAXCTL = /usr/sbin/paxctl But PAXCTL_notdumped is empty. work/emacs/config.status:S["PAXCTL_notdumped"]="" work/emacs/lib/Makefile:PAXCTL_notdumped = work/emacs/src/Makefile:PAXCTL_notdumped = On Linux this uses paxctl -r, which, according to http://man.he.net/man1/paxctl is: -r do not randomize memory regions (NORANDMMAP) While on NetBSD, +a does: a Explicitly disable PaX ASLR (Address Space Layout Randomization) for program. So perhaps notdumped also needs to call paxctl +a, like my sed expressions do. (later) Yes, that's it. I've defined PAXCTL_notdumped to the same value as PAXCTL_dumped and emacs builds fine now -- basically, one additional line to configure.ac in the netbsd case. I'll attach my patches again, just to make it absolutely clear. Thanks, Thomas --sClP8c1IaQxyux9v Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-configure.ac" $NetBSD$ Problem reported by Thomas Klausner (Bug#23371). * configure.ac (PAXCTL_dumped, PAXCTL_notdumped): New vars. Set them to setfattr and/or paxctl commands appropriate for GNU/Linux and/or NetBSD; the latter prefers paxctl +a. Search for paxctl only if setfattr is not found. * src/Makefile.in (PAXCTL_dumped, PAXCTL_notdumped): New vars, replacing PAXCTL_if_present and SETFATTR_if_present. All uses changed. --- configure.ac.orig 2016-04-22 16:23:52.000000000 +0000 +++ configure.ac @@ -1159,16 +1159,9 @@ AC_PATH_PROG(GZIP_PROG, gzip) test $with_compress_install != yes && test -n "$GZIP_PROG" && \ GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)" +PAXCTL_dumped= +PAXCTL_notdumped= if test $opsys = gnu-linux; then - AC_PATH_PROG(PAXCTL, paxctl,, - [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) - if test "X$PAXCTL" != X; then - AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then AC_MSG_RESULT(yes) - else AC_MSG_RESULT(no); PAXCTL=""; fi]) - fi - if test "${SETFATTR+set}" != set; then AC_CACHE_CHECK([for setfattr], [emacs_cv_prog_setfattr], @@ -1179,6 +1172,7 @@ if test $opsys = gnu-linux; then emacs_cv_prog_setfattr=no fi]) if test "$emacs_cv_prog_setfattr" = yes; then + PAXCTL_notdumped='$(SETFATTR) -n user.pax.flags -v er' SETFATTR=setfattr else SETFATTR= @@ -1187,6 +1181,32 @@ if test $opsys = gnu-linux; then AC_SUBST([SETFATTR]) fi fi +case $opsys,$PAXCTL_notdumped in + gnu-linux, | netbsd,) + AC_PATH_PROG([PAXCTL], [paxctl], [], + [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) + if test -n "$PAXCTL"; then + if test "$opsys" = netbsd; then + PAXCTL_dumped='$(PAXCTL) +a' + PAXCTL_notdumped='$(PAXCTL) +a' + else + AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], + [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PAXCTL= + fi]) + if test -n "$PAXCTL"; then + PAXCTL_dumped='$(PAXCTL) -zex' + PAXCTL_notdumped='$(PAXCTL) -r' + fi + fi + fi;; +esac +AC_SUBST([PAXCTL_dumped]) +AC_SUBST([PAXCTL_notdumped]) ## Need makeinfo >= 4.7 (?) to build the manuals. if test "$MAKEINFO" != "no"; then --sClP8c1IaQxyux9v Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-src_Makefile.in" $NetBSD$ Problem reported by Thomas Klausner (Bug#23371). * configure.ac (PAXCTL_dumped, PAXCTL_notdumped): New vars. Set them to setfattr and/or paxctl commands appropriate for GNU/Linux and/or NetBSD; the latter prefers paxctl +a. Search for paxctl only if setfattr is not found. * src/Makefile.in (PAXCTL_dumped, PAXCTL_notdumped): New vars, replacing PAXCTL_if_present and SETFATTR_if_present. All uses changed. --- src/Makefile.in.orig 2016-04-17 20:51:40.000000000 +0000 +++ src/Makefile.in @@ -114,8 +114,9 @@ TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(L ## around this, newer ones setfattr. See Bug#11398 and Bug#16343. PAXCTL = @PAXCTL@ SETFATTR = @SETFATTR@ -PAXCTL_if_present = $(or $(PAXCTL),: paxctl) -SETFATTR_if_present = $(or $(SETFATTR),: setfattr) +## Commands to set PaX flags on dumped and not-dumped instances of Emacs. +PAXCTL_dumped = @PAXCTL_dumped@ +PAXCTL_notdumped = @PAXCTL_notdumped@ ## Some systems define this to request special libraries. LIBS_SYSTEM=@LIBS_SYSTEM@ @@ -542,8 +543,10 @@ ifeq ($(CANNOT_DUMP),yes) ln -f temacs$(EXEEXT) $@ else LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup dump - $(PAXCTL_if_present) -zex $@ +ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) $@ +endif ln -f $@ bootstrap-emacs$(EXEEXT) endif ## We run make-docfile twice because the command line may get too long @@ -606,8 +612,9 @@ temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) -o temacs $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES) $(MKDIR_P) $(etc) ifneq ($(CANNOT_DUMP),yes) - $(PAXCTL_if_present) -r $@ - $(SETFATTR_if_present) -n user.pax.flags -v er $@ + ifneq ($(PAXCTL_notdumped),) + $(PAXCTL_notdumped) $@ + endif endif ## The following oldxmenu-related rules are only (possibly) used if @@ -748,8 +755,10 @@ ifeq ($(CANNOT_DUMP),yes) ln -f temacs$(EXEEXT) $@ else $(RUN_TEMACS) --batch $(BUILD_DETAILS) --load loadup bootstrap - $(PAXCTL_if_present) -zex emacs$(EXEEXT) +ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) emacs$(EXEEXT) +endif mv -f emacs$(EXEEXT) $@ endif @: Compile some files earlier to speed up further compilation. $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" --sClP8c1IaQxyux9v-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 19:08:52 2016 Received: (at 23371-done) by debbugs.gnu.org; 27 Apr 2016 23:08:52 +0000 Received: from localhost ([127.0.0.1]:50945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avYZg-0002WL-MY for submit@debbugs.gnu.org; Wed, 27 Apr 2016 19:08:52 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avYZd-0002W4-RP for 23371-done@debbugs.gnu.org; Wed, 27 Apr 2016 19:08:50 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0BC38160EF1; Wed, 27 Apr 2016 16:08:44 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id N6Yu8AYk4NaW; Wed, 27 Apr 2016 16:08:42 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 86C63160D6A; Wed, 27 Apr 2016 16:08:42 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id bWO505AUwmqG; Wed, 27 Apr 2016 16:08:42 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 6DFCA160D1E; Wed, 27 Apr 2016 16:08:42 -0700 (PDT) Subject: Re: emacs: paxctl usage on NetBSD To: Thomas Klausner References: <2c48d1df-764e-09a0-5945-05148523b768@cs.ucla.edu> <20160427155442.GN7662@danbala.tuwien.ac.at> <3f6aba54-4f40-817c-24f9-942b033d2289@cs.ucla.edu> <20160427225037.GQ7662@danbala.tuwien.ac.at> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <537cb882-6919-451d-5dd2-7c95be42461d@cs.ucla.edu> Date: Wed, 27 Apr 2016 16:08:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20160427225037.GQ7662@danbala.tuwien.ac.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 23371-done Cc: 23371-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 04/27/2016 03:50 PM, Thomas Klausner wrote: > Yes, that's it. I've defined PAXCTL_notdumped to the same value as > PAXCTL_dumped and emacs builds fine now -- basically, one additional > line to configure.ac in the netbsd case. Thanks, I installed a patch along those lines into the emacs-25 branch. From unknown Sun Sep 07 16:50:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 26 May 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator