[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200910211526.50584.arnd@arndb.de>
Date: Wed, 21 Oct 2009 15:26:50 +0200
From: Arnd Bergmann <arndbergmann@...glemail.com>
To: Pavel Machek <pavel@....cz>
Cc: Arnd Bergmann <arndbergmann@...glemail.com>,
Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, Oren Laadan <orenl@...columbia.edu>,
serue@...ibm.com, "Eric W. Biederman" <ebiederm@...ssion.com>,
Alexey Dobriyan <adobriyan@...il.com>,
Pavel Emelyanov <xemul@...nvz.org>,
Andrew Morton <akpm@...l.org>, torvalds@...ux-foundation.org,
mikew@...gle.com, mingo@...e.hu, hpa@...or.com,
Nathan Lynch <nathanl@...tin.ibm.com>, peterz@...radead.org,
Louis.Rilling@...labs.com, roland@...hat.com,
kosaki.motohiro@...fujitsu.com, randy.dunlap@...cle.com,
linux-api@...r.kernel.org,
Containers <containers@...ts.linux-foundation.org>,
sukadev@...ibm.com
Subject: Re: [RFC][v8][PATCH 10/10]: Document clone3() syscall
On Wednesday 21 October 2009, Pavel Machek wrote:
> > > Hmm, is there reason why pids are not at the end of struct
> > > clone_struct? Passing most parameters in special structure, then pids
> > > separately is strange...
> >
> > I suggested doing that, it's a lot easier to handle fixed length data
> > structures than an array at the end.
>
> You could still put the something * pids at the end of (fixed length)
> structure.
>
> (Not that I agree with the argument, pid array is variable-length,
> anyway, and inlining it at the end of structure should not make code
> more complex).
Please read up on the v1 to v7 patches, we've been through all this
before. There are obviously a lot of ways to do it, many of which are
equally good. The important thing to note is that the user-visible
interface should *not* pass the structure into the library that provides
this function but build the structure itself, so it doesn't matter that
much.
If you put the array at the end of the data structure, the wrapper
will have to copy the array provided by the user to a temporary
buffer. Passing the array as a separate syscall argument avoids
this.
Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists