aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich Müller2012-06-03 16:14:22 -0700
committerGlenn Morris2012-06-03 16:14:22 -0700
commitc71232db6e7a2dbd0cb0830829dcce8285ffa138 (patch)
tree8f08f7d51cd276908dee9838df21e70937d1af8e
parent7afbaca445e5d49ece642f5b809ff0cdcbd69356 (diff)
downloademacs-c71232db6e7a2dbd0cb0830829dcce8285ffa138.tar.gz
emacs-c71232db6e7a2dbd0cb0830829dcce8285ffa138.zip
Workaround dumping problem on PaX-enabled Linux kernels
* configure.in (PAXCTL): Check for paxctl. * src/Makefile.in (PAXCTL): Define. (temacs$(EXEEXT)): Disable memory randomization for the temacs binary via PaX flags if the paxctl utility is available. (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)): Restore PaX flags to their default. Fixes: debbugs:11398
-rw-r--r--ChangeLog4
-rw-r--r--configure.in2
-rw-r--r--src/ChangeLog8
-rw-r--r--src/Makefile.in10
4 files changed, 24 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 95d9ecbf01b..4aeffbcc4e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12012-06-03 Ulrich Müller <ulm@gentoo.org>
2
3 * configure.in (PAXCTL): Check for paxctl. (Bug#11398)
4
12012-06-01 Paul Eggert <eggert@cs.ucla.edu> 52012-06-01 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 Remove --disable-maintainer-mode option from 'configure'. (Bug#11555) 7 Remove --disable-maintainer-mode option from 'configure'. (Bug#11555)
diff --git a/configure.in b/configure.in
index 055db30772e..07925142bc1 100644
--- a/configure.in
+++ b/configure.in
@@ -699,6 +699,8 @@ AC_PATH_PROG(INSTALL_INFO, install-info, :,
699 $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin) 699 $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin)
700dnl Don't use GZIP, which is used by gzip for additional parameters. 700dnl Don't use GZIP, which is used by gzip for additional parameters.
701AC_PATH_PROG(GZIP_PROG, gzip) 701AC_PATH_PROG(GZIP_PROG, gzip)
702AC_PATH_PROG(PAXCTL, paxctl,,
703 [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
702 704
703 705
704## Need makeinfo >= 4.7 (?) to build the manuals. 706## Need makeinfo >= 4.7 (?) to build the manuals.
diff --git a/src/ChangeLog b/src/ChangeLog
index 4eaf2d49f36..7f8a356eb71 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12012-06-03 Ulrich Müller <ulm@gentoo.org>
2
3 * Makefile.in (PAXCTL): Define.
4 (temacs$(EXEEXT)): Disable memory randomization for the temacs
5 binary via PaX flags if the paxctl utility is available.
6 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
7 Restore PaX flags to their default. (Bug#11398)
8
12012-06-03 Chong Yidong <cyd@gnu.org> 92012-06-03 Chong Yidong <cyd@gnu.org>
2 10
3 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte 11 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
diff --git a/src/Makefile.in b/src/Makefile.in
index 27199578fc0..47c7d5cfbc2 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -113,6 +113,12 @@ TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS)
113## $LDFLAGS or empty if NS_IMPL_GNUSTEP (for some reason). 113## $LDFLAGS or empty if NS_IMPL_GNUSTEP (for some reason).
114TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@ 114TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@
115 115
116## If available, the full path to the paxctl program.
117## On grsecurity/PaX systems, unexec will fail due to a gap between
118## the bss section and the heap. This can be prevented by disabling
119## memory randomization in temacs with "paxctl -r". See bug#11398.
120PAXCTL = @PAXCTL@
121
116## Some systems define this to request special libraries. 122## Some systems define this to request special libraries.
117LIBS_SYSTEM=@LIBS_SYSTEM@ 123LIBS_SYSTEM=@LIBS_SYSTEM@
118 124
@@ -403,6 +409,7 @@ emacs$(EXEEXT): temacs$(EXEEXT) $(etc)/DOC $(lisp) $(leimdir)/leim-list.el
403 -f list-load-path-shadows || true; \ 409 -f list-load-path-shadows || true; \
404 else \ 410 else \
405 LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump || exit 1; \ 411 LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump || exit 1; \
412 test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \
406 ln -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ 413 ln -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \
407 ./emacs -batch -f list-load-path-shadows || true; \ 414 ./emacs -batch -f list-load-path-shadows || true; \
408 fi 415 fi
@@ -450,6 +457,8 @@ $(lib)/libgnu.a: $(config_h)
450temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj) $(lib)/libgnu.a 457temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj) $(lib)/libgnu.a
451 $(CC) $(LD_FIRSTFLAG) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(TEMACS_LDFLAGS2) \ 458 $(CC) $(LD_FIRSTFLAG) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(TEMACS_LDFLAGS2) \
452 -o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES) 459 -o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES)
460 test "$(CANNOT_DUMP)" = "yes" || \
461 test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT)
453 462
454## The following oldxmenu-related rules are only (possibly) used if 463## The following oldxmenu-related rules are only (possibly) used if
455## HAVE_X11 && !USE_GTK, but there is no harm in always defining them 464## HAVE_X11 && !USE_GTK, but there is no harm in always defining them
@@ -597,6 +606,7 @@ bootstrap-emacs$(EXEEXT): temacs$(EXEEXT)
597 ln -f temacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ 606 ln -f temacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \
598 else \ 607 else \
599 $(RUN_TEMACS) --batch --load loadup bootstrap || exit 1; \ 608 $(RUN_TEMACS) --batch --load loadup bootstrap || exit 1; \
609 test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \
600 mv -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ 610 mv -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \
601 fi 611 fi
602 @: Compile some files earlier to speed up further compilation. 612 @: Compile some files earlier to speed up further compilation.