From: Oleg Nesterov <oleg@redhat.com>
To: Rob Landley <rob@landley.net>
Cc: Alan Cox <gnomes@lxorguk.ukuu.org.uk>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Linux Embedded <linux-embedded@vger.kernel.org>,
dalias@libc.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: execve(NULL, argv, envp) for nommu?
Date: Mon, 11 Sep 2017 17:15:26 +0200 [thread overview]
Message-ID: <20170911151526.GA4126@redhat.com> (raw)
In-Reply-To: <d2d1acae-b2a1-9f41-d3bf-9d3b35a62664@landley.net>
On 09/08, Rob Landley wrote:
>
> So is exec(NULL, argv, envp) a reasonable thing to want?
I think that something like prctl(PR_OPEN_EXE_FILE) which does
dentry_open(current->mm->exe_file->path, O_PATH)
and returns fd make more sense.
Then you can do execveat(fd, "", ..., AT_EMPTY_PATH).
But to be honest, I can't understand the problem, because I know nothing
about nommu.
You need to unblock parent sleeping in vfork(), and you can't do another
fork (I don't undestand why).
Perhaps the child can create another thread? The main thread can exit
after that and unblock the parent. Or perhaps even something like
clone(CLONE_VM | CLONE_PARENT), I dunno...
Oleg.
next prev parent reply other threads:[~2017-09-11 15:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-05 7:34 execve(NULL, argv, envp) for nommu? Rob Landley
2017-09-05 9:00 ` Geert Uytterhoeven
2017-09-05 13:24 ` Alan Cox
2017-09-06 1:12 ` Rob Landley
2017-09-08 21:18 ` Rob Landley
2017-09-11 15:15 ` Oleg Nesterov [this message]
2017-09-12 10:48 ` Rob Landley
2017-09-12 11:30 ` Geert Uytterhoeven
2017-09-12 13:45 ` Rob Landley
2017-09-13 19:33 ` Alan Cox
2017-09-12 15:45 ` Oleg Nesterov
2017-09-13 14:20 ` Oleg Nesterov
2017-09-11 18:14 ` Alan Cox
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=20170911151526.GA4126@redhat.com \
--to=oleg@redhat.com \
--cc=dalias@libc.org \
--cc=geert@linux-m68k.org \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
/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;
as well as URLs for NNTP newsgroup(s).