lkml.org 
[lkml]   [2009]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] make execve(NULL) re-execute current binary
On Tue, 30 Jun 2009 00:03:39 +0200
Denys Vlasenko <vda.linux@googlemail.com> wrote:

> Hi Al, Andrew, folks,
>
> This is a version 2 of re-execution patch.
>
> I replaced hardcoded "/proc/self/exe" with execve(NULL)

So you add hacks to sys_execve, which means hacks on every system that
doesn't need it and also undefined behaviour if you use the feature when
it isn't present.

This makes no sense.

> extension in the hopes that this is considered less ugly.
> Also I tried to format code according to Andrew's wishes.
>
> Handling execve(NULL) requires adding a bit of code
> to per-architecture sys_execve().

Please implement sys_reexec() as was suggested before. Not only does it
allow this stuff to stay out of the exec() call without risking mashing
up the API and changing ABI in odd corner cases it means its actually
going to be usable by apps - because a reexec() is going to give you a
-ENOSYS on older platforms not randomness.

> In the attached patch, it is done only on x86.
> If this patch will be ACKed in principle,
> the final version will do it for all architectures.

NAK in principle.

Alan


\
 
 \ /
  Last update: 2009-06-30 00:29    [W:0.027 / U:5.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site