From: Pavel Machek <pavel@ucw.cz>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, vapier@gentoo.org
Subject: Re: [PATCH] allow execve'ing "/proc/self/exe" even if /proc is not mounted
Date: Wed, 24 Jun 2009 16:51:56 +0200 [thread overview]
Message-ID: <20090624145156.GC1512@ucw.cz> (raw)
In-Reply-To: <1158166a0906241649u78c717c4q8aebfe16e6018e78@mail.gmail.com>
On Thu 2009-06-25 01:49:13, Denys Vlasenko wrote:
> On Thu, Jun 25, 2009 at 1:21 AM, Andrew Morton<akpm@linux-foundation.org> wrote:
> > On Thu, 25 Jun 2009 01:00:56 +0200
> > Denys Vlasenko <vda.linux@googlemail.com> wrote:
> >> In some circumstances running process needs to re-execute
> >> its image.
> ...
> >> More elegant way is to execute /proc/self/exe.
> >> This works just fine as long as /proc is mounted.
> >>
> >> But it breaks if /proc isn't mounted, and this can happen in real-world
> >> usage. For example, when shell invoked very early in initrd/initramfs.
> >
> > Why can't userspace mount /proc before doing the daemonization?
>
> Some people want to unset CONFIG_PROC_FS, and still have
> working POSIX compatible shell. Coincidentally, NOMMU
> machines, ones which *require* re-execution of the shell to support that,
> tent to be the most memory starved machines too (thus most likely
> to be those where people desire to unset CONFIG_PROC_FS).
And some people want to mount /proc on /xyzzy.
Create minimal PROCMINI fs with just /proc/selv/exe?
> We can special-case execve(NULL, ...).
> But I feared people would say this will change previously-buggy
> userspace code into one acting weirdly; in come cases
> leading to infinite execve loops. Do you think it's better
> than "/proc/self/exe"?
Yes. Or... add execme() syscall?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2009-06-27 11:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 23:00 Denys Vlasenko
2009-06-24 23:21 ` Andrew Morton
2009-06-24 23:49 ` Denys Vlasenko
2009-06-24 14:51 ` Pavel Machek [this message]
2009-06-25 0:26 ` Andrew Morton
2009-06-26 8:06 ` Florian Weimer
2009-06-24 23:58 ` Al Viro
2009-06-25 0:07 ` Mike Frysinger
2009-06-26 23:18 ` Denys Vlasenko
2009-06-25 8:10 ` Alan Cox
2009-06-26 8:00 ` Denys Vlasenko
2009-06-26 13:26 ` Mike Frysinger
2009-06-26 22:55 ` Denys Vlasenko
2009-06-28 19:31 ` Mike Frysinger
2009-06-25 18:02 ` Eric W. Biederman
2009-06-25 18:16 ` Mike Frysinger
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090624145156.GC1512@ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vapier@gentoo.org \
--cc=vda.linux@googlemail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®