emacs-devel
[Top][All Lists]
Advanced

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

Re: Intermittent unexec failures on Linux >= 2.6.25


From: Ulrich Mueller
Subject: Re: Intermittent unexec failures on Linux >= 2.6.25
Date: Tue, 21 Oct 2008 10:32:53 +0200

>>>>> 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 via email to

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