From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland McGrath Subject: Re: [RFC][v8][PATCH 0/10] Implement clone3() system call Date: Tue, 13 Oct 2009 13:50:15 -0700 (PDT) Message-ID: <20091013205015.1ED524F7@magilla.sf.frob.com> References: <20091013044925.GA28181@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sukadev Bhattiprolu's message of Monday, 12 October 2009 21:49:25 -0700 <20091013044925.GA28181-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> 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: Sukadev Bhattiprolu Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org, arnd-r2nGTMty4D4@public.gmane.org, Containers , Nathan Lynch , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Louis.Rilling-aw0BnHfMbSpBDgjK7y7TUQ@public.gmane.org, "Eric W. Biederman" , kosaki.motohiro-+CUm20s59erQFUHtdCDX3A@public.gmane.org, hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org, mingo-X9Un+BFzKDI@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, Alexey Dobriyan , Pavel Emelyanov List-Id: linux-api@vger.kernel.org Some userland debugging things and so forth like to look at the clone_flags argument, so that is kept simpler for them if it stays in a register (i.e. its own argument) rather than a user pointer fetch for that argument. Any problem with: sys_clone3(unsigned long clone_flags, struct clone_struct __user *cs, pid_t __user *pids) ? That also has the side benefit that instead of non-ia64 users forever asking, "Why is it clone3 when there is no clone2?" you can instead pretend that it follows the "clone3 because it takes three arguments" convention. ;-) Btw, IMHO "struct foo_struct" is one of the lamest naming conventions ever. How about "struct clone_args"? Also, if you were to replace: u64 child_stack; with: u64 child_stack_base; u64 child_stack_size; and use in sys_clone3 (for most arch's): child_stack_ptr = kcs.child_stack_base + kcs.child_stack_size; then the same clone3 interface would cover ia64 as well. Thanks, Roland