public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org, arjan@linux.intel.com,
	pavel@suse.cz, Ulrich Drepper <drepper@redhat.com>
Subject: Re: [PATCH] binfmt: turn MAX_ARG_PAGES into a sysctl tunable
Date: Tue, 27 Jun 2006 13:09:54 +0200	[thread overview]
Message-ID: <20060627110954.GA23672@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.64.0606261555320.3927@g5.osdl.org>


* Linus Torvalds <torvalds@osdl.org> wrote:

> On Tue, 27 Jun 2006, Ingo Molnar wrote:
> >
> > i thought about your "map execve pages directly into target" (since the 
> > source gets destroyed anyway) suggestion back then, and unfortunately it 
> > gets quite complex.
> 
> No, you misunderstood.
> 
> I wasn't actually suggesting mapping pages directly from the source 
> into the destination.  That is indeed horribly horribly complicated.

ok, that's good news :-)

>  - And the whole reason for having a limited array basically goes away
>    (the swappable thing is part of it, but the fact that the page 
>    tables themselves are just a lot more extensible than the silly 
>    array is just fundamentally a part of it too)
> 
> So it's literally just the array I'd get rid of. Instead of insertign 
> the page into the array, just insert it directly into the page table 
> with "install_arg_page()".

ok, but there are a few logistical issues:

at copy_strings_kernel() time we dont yet know where in the target VM to 
install the pages. A binformat might want to install all sorts of stuff 
on the stack first, before it constructs the envp and copies the strings 
themselves. So we dont know the precise alignment needed.

delaying the copying to setup_arg_pages() time does not seem to work 
either, because that gets called after the old MM has been destroyed.

[ delaying the copying will also change behavior in error cases - 
  instead of returning with an error if the string pointers are bad 
  we'll have to kill the execve()ing process. ]

am i missing something?

	Ingo

  reply	other threads:[~2006-06-27 11:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-23 10:54 [PATCH] binfmt: turn MAX_ARG_PAGES into a sysctl tunable Peter Zijlstra
2006-06-26 16:57 ` Andrew Morton
2006-06-26 17:21   ` Linus Torvalds
2006-06-26 22:35     ` Ingo Molnar
2006-06-26 22:46       ` Ingo Molnar
2006-06-26 23:02       ` Linus Torvalds
2006-06-27 11:09         ` Ingo Molnar [this message]
2006-06-27 12:16           ` Arjan van de Ven
2006-06-27 12:14             ` Ingo Molnar
2006-07-18 12:28             ` Peter Zijlstra
2006-06-28  1:07           ` Linus Torvalds

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=20060627110954.GA23672@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@osdl.org \
    --cc=arjan@linux.intel.com \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=torvalds@osdl.org \
    /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