emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

configure should avoid exec-shield breakage


From: Dave Love
Subject: configure should avoid exec-shield breakage
Date: Mon, 20 Sep 2004 22:13:00 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux)

PROBLEMS talks about Exec-shield breaking things, but it shouldn't
need to give the recipe -- configure should sort it out.  Also,
PROBLEMS seems a bit misleading on the topic.

The right test for exec-shield seems to be that
/proc/sys/kernel/exec-shield exists and that its contents aren't `0'.
E.g. it can apparently be `3' (in old versions?), whereas PROBLEMS
says 0-2.  There's also a /proc/sys/kernel/exec-shield-randomize, and
I'm not sure how values in the two are related.

`setarch' is apparently only relevant while dumping temacs -- it
doesn't affect the state generated by configure, for instance.
(PROBLEMS says to run configure and make under setarch.)

This is all on Fedora Core 2, which sadly doesn't seem to contain any
documentation for the feature, and has a misleading man page for
setarch.

So I think configure should check whether /proc/sys/kernel/exec-shield
exists and contains a value other than `0', and whether `setarch' is
present.  If so, it should AC_SUBST a variable to `setarch i386'.
That variable should be substituted in front of temacs invocations in
src/Makefile.in so that the exec-shield case looks like

        setarch i386 ./temacs ...

(You may have to prevent the losing cpp treatment of the makefile from
clobbering `i386'.)

Then the build should just work.  If exec-shield is on but there's no
setarch, configure should stop and refer to discussion in PROBLEMS.
E.g. an exec-shield kernel patch is available for Debian, but setarch
isn't as far as I can tell.

I guess the same sort of problem could occur with other features
similar to exec-shield (pax?), and not just under Linux; perhaps that
possibility should be mentioned in PROBLEMS unless someone knows for
sure.  It seems there are toolchain changes related to exec-shield in
some way I don't understand -- perhaps someone knows whether they're
relevant for PROBLEMS.

I don't think I've repeated recently that unexec should die...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]