From: Matt Helsley Subject: Re: [PATCH 11/11][v15]: Document sys_eclone Date: Mon, 12 Jul 2010 11:02:23 -0700 Message-ID: <20100712180223.GD3129@count0.beaverton.ibm.com> References: <1278189164-28408-1-git-send-email-sukadev@linux.vnet.ibm.com> <20100704233951.GK3338@count0.beaverton.ibm.com> <201007051234.40943.arnd@arndb.de> <20100706222554.GA7648@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Albert Cahalan Cc: Randy Dunlap , Serge Hallyn , Arnd Bergmann , Containers , Nathan Lynch , "H. Peter Anvin" , Dan Smith , Sukadev Bhattiprolu , Roland McGrath List-Id: containers.vger.kernel.org On Sun, Jul 11, 2010 at 05:00:10AM -0400, Albert Cahalan wrote: > On Tue, Jul 6, 2010 at 6:25 PM, Sukadev Bhattiprolu > wrote: > > Arnd Bergmann [arnd-r2nGTMty4D4@public.gmane.org] wrote: > > | On Monday 05 July 2010, Albert Cahalan wrote: > > | > On Sun, Jul 4, 2010 at 7:39 PM, Matt Helsley wrote: > > | > > On Sat, Jul 03, 2010 at 07:41:30PM -0400, Albert Cahalan wrote: > > | > >> wrote: > > | > You'd be copying from a struct in userspace to some random local > > | > variables in the kernel. There is no reason why the kernel would > > | > have to use a struct at all. You copy the flags, then see what else > > | > you need to copy. > > | > > | Exactly. The size argument is also my main criticism of the suggested > > | syscall, and I've been arguing the same as you. > > | > > | Note that you may still use copy the entire struct, provided that we > > | leave enough reserved fields at the end for future extensions. If > > | we run out of space ten years from now, we can still have a new syscall > > | number with a new structure. > > > > If we need the API to be extendible, to me specifying the size in the > > API seems more explicit than using the flags. > > Is there any other system call with this sort of extendability? > You're going against history and IIRC policy. > > Most explicit would be a version number, but even that is > forbidden AFAIK. Have a look at set_robust_list() -- it passes a size parameter for a struct. Lots of socket calls take a socklen_t for a variable-size address struct. (Granted, they all go through socketcall, but that's a bit beside the point.) read() and write() syscalls operating on pseudofiles can be for structs (e.g. signalfd_siginfo) and thus indirectly do this. Cheers, -Matt Helsley