unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: Chong Yidong <cyd@stupidchicken.com>,
	emacs-devel@gnu.org, emacs@gentoo.org
Subject: Re: Intermittent unexec failures on Linux >= 2.6.25
Date: Tue, 21 Oct 2008 10:32:53 +0200	[thread overview]
Message-ID: <18685.37813.957160.535620@a1i15.kph.uni-mainz.de> (raw)
In-Reply-To: <48FD7791.5070806@swipnet.se>

>>>>> On Tue, 21 Oct 2008, Jan Djärv wrote:

> Chong Yidong skrev:
>> Do you remember the rationale for setting
>> 
>> #define MAX_HEAP_BSS_DIFF (1024*1024)
>> 
>> 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
<http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=900>
which asks the kernel (by reading /proc/sys/kernel/randomize_va_space)
if heap randomisation is switched on. Or is this too fragile?

Ulrich




  reply	other threads:[~2008-10-21  8:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03 22:29 Intermittent unexec failures on Linux >= 2.6.25 Ulrich Mueller
2008-10-20 17:20 ` Christian Faulhammer
2008-10-20 17:56   ` Chong Yidong
2008-10-21  6:32     ` Jan Djärv
2008-10-21  8:32       ` Ulrich Mueller [this message]
2008-10-21 10:18         ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18685.37813.957160.535620@a1i15.kph.uni-mainz.de \
    --to=ulm@gentoo.org \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=emacs@gentoo.org \
    --cc=jan.h.d@swipnet.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).