GNU bug report logs -
#19067
24.4; temacs startup failure when both PT_PAX and XATTR_PAX flags are enabled in Linux
Previous Next
Reported by: Ulrich Mueller <ulm <at> gentoo.org>
Date: Sun, 16 Nov 2014 11:40:03 UTC
Severity: important
Tags: fixed, patch
Found in version 24.4
Fixed in version 24.5
Done: Ulrich Mueller <ulm <at> gentoo.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Forwarding Gentoo bug reports https://bugs.gentoo.org/497498 and
https://bugs.gentoo.org/526948 :
On a GNU/Linux system with grsecurity/PaX enabled Linux kernel,
temacs startup will fail when both CONFIG_PAX_PT_PAX_FLAGS and
CONFIG_PAX_XATTR_PAX_FLAGS are enabled:
if test "no" = "yes"; then \
rm -f bootstrap-emacs; \
ln temacs bootstrap-emacs; \
else \
./temacs --batch --load loadup bootstrap || exit 1; \
test "X/sbin/paxctl" = X || /sbin/paxctl -zex emacs; \
mv -f emacs bootstrap-emacs; \
fi
/bin/sh: line 7: 1591 Killed ./temacs --batch --load
loadup bootstrap
Makefile:815: recipe for target 'bootstrap-emacs' failed
make[1]: *** [bootstrap-emacs] Error 1
make[1]: Leaving directory
'/var/tmp/portage/app-editors/emacs-24.4/work/emacs-24.4/src'
Makefile:382: recipe for target 'src' failed
make: *** [src] Error 2
The problem is that paxctl(1) sets the "e" flag ("do not emulate
trampolines") by default for ELF binaries, but setfattr(1) doesn't.
While in principle both settings of the flag would be OK for our case,
Linux (the kernel) refuses to run the binary if the PT_PAX and
XATTR_PAX flags are inconsistent with one another.
Adding the "e" flag also to setfattr fixes this. Patch will follow.
This bug report was last modified 10 years and 177 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.