Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936214AbXFFWwm (ORCPT ); Wed, 6 Jun 2007 18:52:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1764464AbXFFWwe (ORCPT ); Wed, 6 Jun 2007 18:52:34 -0400 Received: from x35.xmailserver.org ([64.71.152.41]:1229 "EHLO x35.xmailserver.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763548AbXFFWwd (ORCPT ); Wed, 6 Jun 2007 18:52:33 -0400 X-AuthUser: davidel@xmailserver.org Date: Wed, 6 Jun 2007 15:52:31 -0700 (PDT) From: Davide Libenzi X-X-Sender: davide@alien.or.mcafeemobile.com To: David Miller cc: Linux Kernel Mailing List , Linus Torvalds , Andrew Morton , Ulrich Drepper , Ingo Molnar , dada1@cosmosbay.com Subject: Re: [patch 7/8] fdmap v2 - implement sys_socket2 In-Reply-To: <20070606.154434.21926922.davem@davemloft.net> Message-ID: References: <20070606.154434.21926922.davem@davemloft.net> X-GPG-FINGRPRINT: CFAE 5BEE FD36 F65E E640 56FE 0974 BF23 270F 474E X-GPG-PUBLIC_KEY: http://www.xmailserver.org/davidel.asc MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1688 Lines: 45 On Wed, 6 Jun 2007, David Miller wrote: > From: Davide Libenzi > Date: Wed, 06 Jun 2007 15:30:31 -0700 > > > This patch implement a new syscall sys_socket2(), that accepts an > > extra "flags" parameter: > > > > int socket2(int domain, int type, int protocol, int flags); > > > > The flags parameter is used to pass extra flags to the kernel, and is > > at the moment used to select the file descriptor allocations inside > > the non-sequential area (O_NONSEQFD). The remaining parameters are > > exactly the same as the ones of sys_socket(). > > The sys_accept() system call has been modified to return a file > > descriptor inside the non-sequential area, if the listening fd is. > > The sys_socketcall() system call has been also changed to support > > a new SYS_SOCKET2 indentifier. > > > > Signed-off-by: Davide Libenzi > > Since the valid range of "domain" values is quite small, > we could avoid the new system call by cribbing some of the > upper bits of the 'domain' argument. > > Valid existing programs pass in valid 'domain' values and > thus will not set any of the new flags. > > Just an idea. I have no huge preferences. If not the slight one of using the same flags for open() and socket{2}() (O_NONSEQFD). If we overload socket() we may need to fight with existing O_* flags. OTOH the current free ones are pretty high in bits, so it may be OK too. - Davide - 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/