From owner-freebsd-emulation@FreeBSD.ORG Tue May 5 16:41:03 2009 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 964E5106564A; Tue, 5 May 2009 16:41:03 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id 4E6428FC21; Tue, 5 May 2009 16:41:02 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from bb.ipt.ru ([194.62.233.89]) by services.ipt.ru with esmtp (Exim 4.54 (FreeBSD)) id 1M1NhW-000C8v-3i; Tue, 05 May 2009 20:41:02 +0400 To: Chagin Dmitry References: <81924694@bb.ipt.ru> <20090505144955.16373k1b32dpaxo0@webmail.leidinger.net> <47993241@bb.ipt.ru> <20090505160827.1359651x47bqmxc8@webmail.leidinger.net> <67678219@bb.ipt.ru> <20090505160724.GB14703@dchagin.static.corbina.ru> From: Boris Samorodov Date: Tue, 05 May 2009 20:41:01 +0400 In-Reply-To: <20090505160724.GB14703@dchagin.static.corbina.ru> (Chagin Dmitry's message of "Tue\, 5 May 2009 20\:07\:24 +0400") Message-ID: <35513746@bb.ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Leidinger , freebsd-emulation@freebsd.org Subject: Re: [linux-f10] linux_socketcall... ERR#43 'Protocol not supported' X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2009 16:41:03 -0000 On Tue, 5 May 2009 20:07:24 +0400 Chagin Dmitry wrote: > On Tue, May 05, 2009 at 07:26:28PM +0400, Boris Samorodov wrote: > > The diff is: > > ----- > > --- linux_socket.c.orig 2009-05-05 18:35:31.000000000 +0400 > > +++ linux_socket.c 2009-05-05 19:02:42.000000000 +0400 > > @@ -595,9 +595,15 @@ > > } */ bsd_args; > > int retval_socket; > > > > + printf("bsam: linux_socket (LINUX): domain: %d, type: %d, protocol: %d\n", > > + args->domain, args->type, args->protocol); > > + > > bsd_args.protocol = args->protocol; > > bsd_args.type = args->type; > > bsd_args.domain = linux_to_bsd_domain(args->domain); > > + > > + printf("bsam: linux_socket (FreeBSD): domain: %d\n", bsd_args.domain); > > + > > if (bsd_args.domain == -1) > > return (EINVAL); > > > > @@ -1365,10 +1371,14 @@ > > linux_socketcall(struct thread *td, struct linux_socketcall_args *args) > > { > > void *arg = (void *)(intptr_t)args->args; > > + int ret; > > > > + printf("bsam: Entering linux_socketcall.\n"); > > switch (args->what) { > > case LINUX_SOCKET: > > - return (linux_socket(td, arg)); > > + ret = linux_socket(td, arg); > > + printf("bsam: LINUX_SOCKET: %d\n", ret); > > + return (ret); > > case LINUX_BIND: > > return (linux_bind(td, arg)); > > case LINUX_CONNECT: > > ----- > > > > Console diagnistic is: > > ----- > > May 5 19:10:33 bb kernel: bsam: Entering linux_socketcall. > > May 5 19:10:33 bb kernel: bsam: linux_socket (LINUX): domain: 2, type: 3, protocol: 1 > > May 5 19:10:33 bb kernel: bsam: linux_socket (FreeBSD): domain: 2 > > May 5 19:10:33 bb kernel: bsam: LINUX_SOCKET: 1 > > May 5 19:10:33 bb kernel: bsam: Entering linux_socketcall. > > May 5 19:10:33 bb kernel: bsam: linux_socket (LINUX): domain: 1, type: 526337, protocol: 0 > > May 5 19:10:33 bb kernel: bsam: linux_socket (FreeBSD): domain: 1 > > May 5 19:10:33 bb kernel: bsam: LINUX_SOCKET: 43 > > May 5 19:10:33 bb kernel: bsam: Entering linux_socketcall. > > May 5 19:10:33 bb kernel: bsam: linux_socket (LINUX): domain: 1, type: 526337, protocol: 0 > > May 5 19:10:33 bb kernel: bsam: linux_socket (FreeBSD): domain: 1 > > May 5 19:10:33 bb kernel: bsam: LINUX_SOCKET: 43 > > May 5 19:10:34 bb kernel: bsam: Entering linux_socketcall. > > May 5 19:10:34 bb kernel: bsam: linux_socket (LINUX): domain: 2, type: 2050, protocol: 0 > > May 5 19:10:34 bb kernel: bsam: linux_socket (FreeBSD): domain: 2 > > May 5 19:10:34 bb kernel: bsam: LINUX_SOCKET: 43 > > May 5 19:10:34 bb kernel: bsam: Entering linux_socketcall. > > May 5 19:10:34 bb kernel: bsam: linux_socket (LINUX): domain: 2, type: 2050, protocol: 0 > > May 5 19:10:34 bb kernel: bsam: linux_socket (FreeBSD): domain: 2 > > May 5 19:10:34 bb kernel: bsam: LINUX_SOCKET: 43 > > ----- > > > > Corresponding text for linux_kdump and truss: > > ftp://ftp.ipt.ru/pub/linux/linux_kdump.ping.txt > > ftp://ftp.ipt.ru/pub/linux/truss.ping.txt > > > heh, it seems to me that SOCK_CLOEXEC, SOCK_NONBLOCK bits used. > should be fixed. socketpair() also uses it since 2.6.29 I'll be glad to test patches. WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD Committer, http://www.FreeBSD.org The Power To Serve