From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: Re: Intermittent unexec failures on Linux >= 2.6.25 Date: Tue, 21 Oct 2008 10:32:53 +0200 Message-ID: <18685.37813.957160.535620@a1i15.kph.uni-mainz.de> References: <18623.4028.181298.302150@a1ihome1.kph.uni-mainz.de> <20081020192033.3252b4bf@terra.solaris> <87ej2bi20r.fsf@cyd.mit.edu> <48FD7791.5070806@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1224578322 20759 80.91.229.12 (21 Oct 2008 08:38:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Oct 2008 08:38:42 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org, emacs@gentoo.org To: Jan =?iso-8859-1?Q?Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 21 10:39:40 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KsCly-00054A-Ja for ged-emacs-devel@m.gmane.org; Tue, 21 Oct 2008 10:39:27 +0200 Original-Received: from localhost ([127.0.0.1]:44420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KsCks-0007Rc-T4 for ged-emacs-devel@m.gmane.org; Tue, 21 Oct 2008 04:38:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KsCfw-00048t-3f for emacs-devel@gnu.org; Tue, 21 Oct 2008 04:33:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KsCfu-00046f-Cu for emacs-devel@gnu.org; Tue, 21 Oct 2008 04:33:11 -0400 Original-Received: from [199.232.76.173] (port=41127 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KsCft-00046Q-T7 for emacs-devel@gnu.org; Tue, 21 Oct 2008 04:33:10 -0400 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:42902) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KsCft-000839-VQ for emacs-devel@gnu.org; Tue, 21 Oct 2008 04:33:10 -0400 Original-Received: from a1i15.kph.uni-mainz.de (a1i15.kph.uni-mainz.de [134.93.134.92]) by a1iwww1.kph.uni-mainz.de (8.14.0/8.13.4) with ESMTP id m9L8WtcS017483; Tue, 21 Oct 2008 10:32:55 +0200 Original-Received: from a1i15.kph.uni-mainz.de (localhost [127.0.0.1]) by a1i15.kph.uni-mainz.de (8.14.2/8.13.4) with ESMTP id m9L8WsU8016385; Tue, 21 Oct 2008 10:32:55 +0200 Original-Received: (from ulm@localhost) by a1i15.kph.uni-mainz.de (8.14.2/8.14.2/Submit) id m9L8WsC7016379; Tue, 21 Oct 2008 10:32:54 +0200 In-Reply-To: <48FD7791.5070806@swipnet.se> X-Mailer: VM 8.0.9 under Emacs 22.3.1 (i686-pc-linux-gnu) X-MIME-Autoconverted: from 8bit to quoted-printable by a1iwww1.kph.uni-mainz.de id m9L8WtcS017483 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104736 Archived-At: >>>>> On Tue, 21 Oct 2008, Jan Dj=E4rv wrote: > Chong Yidong skrev: >> Do you remember the rationale for setting >>=20 >> #define MAX_HEAP_BSS_DIFF (1024*1024) >>=20 >> in emacs.c? This variable was introduced by you on 2004-10-20, and I'= m >> not too familiar with this part of the code. > I got it from the kernel source at the time. > I see now that there is no lower limit on the heap gap produced by > randomization. Unfortunately, yes. If I read the kernel sources right, the gap can have any size between one page and 32 MiB. (One could test if heap_bss_diff is larger than the page size ... but probably it's difficult to get the test right, without making a fence-post error.) > I guess we must exec every time to be sure. I had attached a patch at my bug report which asks the kernel (by reading /proc/sys/kernel/randomize_va_space) if heap randomisation is switched on. Or is this too fragile? Ulrich