From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: `exec shield' test in configure too strict? Date: Mon, 4 Oct 2004 17:04:26 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1096902334 16732 80.91.229.6 (4 Oct 2004 15:05:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Oct 2004 15:05:34 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 04 17:05:23 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CEUOw-0007ks-00 for ; Mon, 04 Oct 2004 17:05:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CEUVX-0003It-KH for ged-emacs-devel@m.gmane.org; Mon, 04 Oct 2004 11:12:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CEUVQ-0003In-CZ for emacs-devel@gnu.org; Mon, 04 Oct 2004 11:12:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CEUVP-0003Ib-UI for emacs-devel@gnu.org; Mon, 04 Oct 2004 11:12:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CEUVP-0003IY-Ry for emacs-devel@gnu.org; Mon, 04 Oct 2004 11:12:03 -0400 Original-Received: from [195.54.107.70] (helo=mxfep01.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CEUOP-0003bP-OG; Mon, 04 Oct 2004 11:04:50 -0400 Original-Received: from coolsville.localdomain ([213.115.26.74] [213.115.26.74]) by mxfep01.bredband.com with ESMTP id <20041004150446.VYVD3239.mxfep01.bredband.com@coolsville.localdomain>; Mon, 4 Oct 2004 17:04:46 +0200 In-Reply-To: Original-To: Miles Bader X-Mailer: Apple Mail (2.619) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27879 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27879 > Recently Emacs' configure script has been changed to check for the > presence of linux `exec shield' functionality, by looking for the file > /proc/sys/kernel/exec-shield, and seeing if it as a non-zero value. If > it is present and enabled, and there's no `setarch' program available, > configure will give an error message and abort. The reason for this, > as > I understand it, is that emacs cannot dump on such a system unless it > can use the `setarch' program. > > However this test seems too strict: On fencepost.gnu.org, exec-shield > is enabled: > > $ cat /proc/sys/kernel/exec-shield > 1 > > and there is no setarch program: > > $ type setarch > bash: type: setarch: not found > > and so emacs refuses to configure -- but if disable this test by doing: > > $ make ac_cv_file__proc_sys_kernel_exec_shield=no > > Then Emacs configures and dumps just fine, despite not using `setarch'. Do that machine have a /proc/sys/kernel/exec-shield-randomize file? It is the random start address of the heap that makes dumping fail. A test that explicitly tests for this would be best, but I'm not sure how portable such a test would be. Simpler then to test the contents of /proc/sys/kernel/exec-shield-randomize if this file exists. Jan D.