From: Juho S. <js...@ik...> - 2005-08-29 04:57:52
Attachments:
sbcl-reexec.diff
|
Unless someone objects, I'd like to commit the attached patch, which seems to be about the only semi-reliable method for avoiding the memory randomization problems on the FC4 (and future vanilla) kernels. Basically: * If running on Linux >= 2.6, set the ADDR_NO_RANDOMIZE personality flag and execve /proc/self/exe. * If the execve fails, print a warning but try to continue anyway This has the downside of not helping (though not harming, either) if /proc is not mounted. I don't think there's any other reliable method for finding out the path of the current executable. -- Juho Snellman |
From: Florian W. <fw...@de...> - 2005-08-29 13:29:50
|
* Juho Snellman: > This has the downside of not helping (though not harming, either) if > /proc is not mounted. I don't think there's any other reliable method > for finding out the path of the current executable. I think this causes Lisp processes to show up as "exe" in tools like ps and top. I use a similar technique for safely spawning daemon processes in another programming language, but I haven't found a way yet to prevent this problem. |
From: Juho S. <js...@ik...> - 2005-08-29 13:58:07
|
On Mon, Aug 29, 2005 at 03:29:15PM +0200, Florian Weimer wrote: > * Juho Snellman: > > > This has the downside of not helping (though not harming, either) if > > /proc is not mounted. I don't think there's any other reliable method > > for finding out the path of the current executable. > > I think this causes Lisp processes to show up as "exe" in tools like > ps and top. Damn. I'd only thought of checking ps (which shows the correct name on my systems), not top. This shouldn't be a problem, since /proc/self/exe is implemented as a symlink. Just follow the link first, then execute. -- Juho Snellman |