Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755830Ab2HOQbF (ORCPT ); Wed, 15 Aug 2012 12:31:05 -0400 Received: from terminus.zytor.com ([198.137.202.10]:55221 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755766Ab2HOQbC (ORCPT ); Wed, 15 Aug 2012 12:31:02 -0400 Message-ID: <502BCEAD.7050905@zytor.com> Date: Wed, 15 Aug 2012 09:30:37 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Stanislav Kinsbursky CC: tglx@linutronix.de, mingo@redhat.com, davem@davemloft.net, thierry.reding@avionic-design.de, bfields@redhat.com, eric.dumazet@gmail.com, xemul@parallels.com, neilb@suse.de, netdev@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, paul.gortmaker@windriver.com, viro@zeniv.linux.org.uk, gorcunov@openvz.org, akpm@linux-foundation.org, tim.c.chen@linux.intel.com, devel@openvz.org, ebiederm@xmission.com Subject: Re: [RFC PATCH 5/5] syscall: sys_fbind() introduced References: <20120815161141.7598.16682.stgit@localhost.localdomain> <20120815162225.7598.85131.stgit@localhost.localdomain> In-Reply-To: <20120815162225.7598.85131.stgit@localhost.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1677 Lines: 42 On 08/15/2012 09:22 AM, Stanislav Kinsbursky wrote: > This syscall allows to bind socket to specified file descriptor. > Descriptor can be gained by simple open with O_PATH flag. > Socket node can be created by sys_mknod(). > > Signed-off-by: Stanislav Kinsbursky > --- > arch/x86/syscalls/syscall_32.tbl | 1 + > arch/x86/syscalls/syscall_64.tbl | 1 + > include/linux/syscalls.h | 1 + > kernel/sys_ni.c | 3 +++ > net/socket.c | 25 +++++++++++++++++++++++++ > 5 files changed, 31 insertions(+), 0 deletions(-) > > diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl > index 7a35a6e..9594b82 100644 > --- a/arch/x86/syscalls/syscall_32.tbl > +++ b/arch/x86/syscalls/syscall_32.tbl > @@ -356,3 +356,4 @@ > 347 i386 process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv > 348 i386 process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev > 349 i386 kcmp sys_kcmp > +350 i386 fbind sys_fbind i386 uses socketcalls... perhaps it shouldn't (socketcalls are pretty much an abomination), but for socketcall-based architectures this really should be a socketcall. Don't you also need fconnect()? Or is that simply handled by allowing open() without O_PATH? -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. -- 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/