lkml.org 
[lkml]   [2005]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: MAX_ARG_PAGES has no effect?
Date
On Thursday 01 September 2005 08:57, Ingo Molnar wrote:

> the whole thing should be reworked, so that there is no artificial limit
> like MAX_ARG_PAGES. (it is after all just another piece of memory, in
> theory)

Yes, a sysctl would probably lead to fragmentation problems and then
people would do ugly linked lists of buffers like poll.

> If we do unconditional page-flipping then we fragment the argument
> space, if we do both page-flipping if things are unfragmented and
> well-aligned, and 'compact' the layout otherwise, we havent solved the
> problem and have introduced a significant extra layer of complexity to
> an already security-sensitive and fragile piece of code.

Page flipping = COW like fork would do?

Not sure how this would work - the arguments of execve can be anywhere
in the address space and would presumably be often be in a inconvenient
place like in the middle of the stack of the new executable.

> The best method i found was to get rid of bprm->pages[] and to directly
> copy strings into the new mm via kmap (and to follow whatever RAM
> allocation policies/limits there are for the new mm), but that's quite
> ugly.

That sounds better.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-01 10:13    [W:0.083 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site