public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: Blaisorblade <blaisorblade@yahoo.it>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH 04/10] uml: make execvp safe for our usage
Date: Wed, 25 Oct 2006 11:10:24 -0400	[thread overview]
Message-ID: <20061025151024.GA4323@ccure.user-mode-linux.org> (raw)
In-Reply-To: <200610210211.28502.blaisorblade@yahoo.it>

On Sat, Oct 21, 2006 at 02:11:28AM +0200, Blaisorblade wrote:
> > This is horriby ugly.
> 
> Detail why. The code of execvp()? Passing in the buffer?
> I'm not saying it's the brightest code around here, but it's ok for me.

My initial reaction was mostly due to the look of the code, which is
fixable.  I also don't like carrying around bits of libc (although we
do have setjmp/longjmp, but that's a special case).  However, it's
unlikely that it will need much maintenance, so this is more a taste
thing as well.

> I initially thought to design a two-steps API with a "which" operation (where
> memory allocation was used) to call later execvp(); when I saw the glibc 
> implementation (it allocates one single fixed-size buffer) I saw it was 
> simpler this way.

I think I still like the two-stage thing better.  If the 'which' part
finds something that doesn't exec, then we can just spit out a nice error.

> I'd not do that at boot, but just before the fork()+execve() - it is 
> conceivable that a given user will install a support binary after booting 
> UML.

I was envisioning it being part of bootup, but doing it just before
the exec would be OK, too.

				Jeff

  reply	other threads:[~2006-10-25 15:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-17 21:19 [PATCH 00/10] Various UML patches for 2.6.19 Paolo 'Blaisorblade' Giarrusso
2006-10-17 21:27 ` [PATCH 01/10] uml: remove some leftover PPC code Paolo 'Blaisorblade' Giarrusso
2006-10-17 21:27 ` [PATCH 02/10] uml: split memory allocation prototypes out of user.h Paolo 'Blaisorblade' Giarrusso
2006-10-17 21:27 ` [PATCH 03/10] uml: fix prototypes Paolo 'Blaisorblade' Giarrusso
2006-10-18 18:32   ` [uml-devel] " Jeff Dike
2006-10-21  1:42     ` Blaisorblade
2006-10-17 21:27 ` [PATCH 04/10] uml: make execvp safe for our usage Paolo 'Blaisorblade' Giarrusso
2006-10-18 18:37   ` [uml-devel] " Jeff Dike
2006-10-21  0:11     ` Blaisorblade
2006-10-25 15:10       ` Jeff Dike [this message]
2006-10-21  1:16     ` Blaisorblade
2006-10-17 21:27 ` [PATCH 05/10] uml: code convention cleanup of a file Paolo 'Blaisorblade' Giarrusso
2006-10-17 21:27 ` [PATCH 06/10] uml: reenable compilation of enable_timer, disabled by mistake Paolo 'Blaisorblade' Giarrusso
2006-10-17 21:27 ` [PATCH 07/10] uml: use DEFCONFIG_LIST to avoid reading host's config Paolo 'Blaisorblade' Giarrusso
2006-10-17 21:27 ` [PATCH 08/10] uml: cleanup run_helper() API to fix a leak Paolo 'Blaisorblade' Giarrusso
2006-10-17 21:27 ` [PATCH 09/10] uml: kconfig - silence warning Paolo 'Blaisorblade' Giarrusso
2006-10-17 21:27 ` [PATCH 10/10] uml: mmapper - remove just added but wrong "const" attribute Paolo 'Blaisorblade' Giarrusso
2006-10-18 18:41 ` [uml-devel] [PATCH 00/10] Various UML patches for 2.6.19 Jeff Dike

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=20061025151024.GA4323@ccure.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=akpm@osdl.org \
    --cc=blaisorblade@yahoo.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.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