From owner-freebsd-emulation Sun Jan 10 02:26:04 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA29091 for freebsd-emulation-outgoing; Sun, 10 Jan 1999 02:26:04 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA29069 for ; Sun, 10 Jan 1999 02:25:59 -0800 (PST) (envelope-from marcel@scc.nl) Received: from scones.sup.scc.nl (i220.ztm.euronet.nl [194.134.67.21]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id LAA25160; Sun, 10 Jan 1999 11:25:21 +0100 (MET) Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.1/8.9.1) with ESMTP id LAA28840; Sun, 10 Jan 1999 11:24:47 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <36987FEF.1CB35E1F@scc.nl> Date: Sun, 10 Jan 1999 11:24:47 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Brian Feldman CC: freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Brian Feldman wrote: > There's no real extra functionality, sendmsg in linux is exactly the same, > binary-compatible with that of FreeBSD. When groping through the kernel to > find out why sendmsg() can return EINVAL, I can't seem to find a reason. The only visible difference is the flags field the msghdr struct. Linux has some incompatible defines. Your test program has flags=0 though. > I have the tarchive here, but you need to first add Linux system calls 183 > and 184 to test it out (linux_i386_get_ldt and linux_i386_set_ldt, respectively) > or you won't be able to use the LDT functions. The functions are already > implemented elsewhere, so it's not that hard to add them and recompile/reload > the Linux module. Once you add syscall 183 and 184 (183/get can just be a stub), > let me know and I'll find some place to slap down the (*cough* 9 megabyte) > tar.gz. Sounds like a lot of unnecessary overhead. I've Oracle Application Server here which (as far as I can see) blocks in the sendmsg call. The only thing I can do at that time is killing it. I think I'll use that or use some sort of special test programs (like yours) to investigate. If there is such a need, I can always choose to implement the LDT functionality and ask politely if you could slap down the archive somewhere. I'll keep you informed of any progress... marcel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sun Jan 10 02:36:50 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA29680 for freebsd-emulation-outgoing; Sun, 10 Jan 1999 02:36:50 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA29675 for ; Sun, 10 Jan 1999 02:36:46 -0800 (PST) (envelope-from marcel@scc.nl) Received: from scones.sup.scc.nl (i458.ztm.euronet.nl [194.134.67.179]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id LAA27077; Sun, 10 Jan 1999 11:36:13 +0100 (MET) Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.1/8.9.1) with ESMTP id LAA29194; Sun, 10 Jan 1999 11:35:39 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <3698827B.BBEB4CF3@scc.nl> Date: Sun, 10 Jan 1999 11:35:39 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Mike Smith CC: Brian Feldman , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! References: <199901100442.UAA03149@dingo.cdrom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Mike Smith wrote: > > There's no real extra functionality, sendmsg in linux is exactly the same, > > binary-compatible with that of FreeBSD. When groping through the kernel to > > find out why sendmsg() can return EINVAL, I can't seem to find a reason. > > I've seen this before; there's definitely a couple of reasons why it > can return that. Sounds like you already know exactly what those reasons are :-) > I think that there's something subtly different in the arguments the > Linux syscall is passing in. The obvious one I know of (see my previous mail) is the flags field in the msghdr struct. That's it. If there's more, let me know. > You shouldn't have any trouble trapping the Linux sendmsd call and using > kdb-remote to step through the kernel until you find the problem though. 8) If I hadn't had the resources so remotely, yes :-) Just one question. Is it save to assume there is no problem with the native FreeBSD syscall? To put it differently; Is it wise to focus on the subtle differences of the Linux syscall? marcel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sun Jan 10 02:56:36 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA01843 for freebsd-emulation-outgoing; Sun, 10 Jan 1999 02:56:36 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from dingo.cdrom.com (castles333.castles.com [208.214.167.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA01838 for ; Sun, 10 Jan 1999 02:56:35 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id CAA05296; Sun, 10 Jan 1999 02:52:50 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199901101052.CAA05296@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Marcel Moolenaar cc: Mike Smith , Brian Feldman , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! In-reply-to: Your message of "Sun, 10 Jan 1999 11:35:39 +0100." <3698827B.BBEB4CF3@scc.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 10 Jan 1999 02:52:50 -0800 From: Mike Smith Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > Just one question. Is it save to assume there is no problem with the native > FreeBSD syscall? > To put it differently; Is it wise to focus on the subtle differences of the > Linux syscall? I would definitely want to set up a FreeBSD version of the call under the same circumstances (ie. test program) to make sure it worked natively, then build the same test program under Linux and verify that it failed under emulation, and then compare the call data inside the kernel for the two operations. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sun Jan 10 12:00:36 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA07443 for freebsd-emulation-outgoing; Sun, 10 Jan 1999 12:00:36 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA07438 for ; Sun, 10 Jan 1999 12:00:34 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.8.8/8.8.7) with ESMTP id OAA13349; Sun, 10 Jan 1999 14:59:57 -0500 (EST) Date: Sun, 10 Jan 1999 14:59:57 -0500 (EST) From: Brian Feldman X-Sender: green@janus.syracuse.net To: Marcel Moolenaar cc: freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! In-Reply-To: <36987FEF.1CB35E1F@scc.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 10 Jan 1999, Marcel Moolenaar wrote: > Brian Feldman wrote: > > > There's no real extra functionality, sendmsg in linux is exactly the same, > > binary-compatible with that of FreeBSD. When groping through the kernel to > > find out why sendmsg() can return EINVAL, I can't seem to find a reason. > > The only visible difference is the flags field the msghdr struct. Linux has > some incompatible defines. Your test program has flags=0 though. > > > I have the tarchive here, but you need to first add Linux system calls 183 > > and 184 to test it out (linux_i386_get_ldt and linux_i386_set_ldt, respectively) > > or you won't be able to use the LDT functions. The functions are already > > implemented elsewhere, so it's not that hard to add them and recompile/reload > > the Linux module. Once you add syscall 183 and 184 (183/get can just be a stub), > > let me know and I'll find some place to slap down the (*cough* 9 megabyte) > > tar.gz. > > Sounds like a lot of unnecessary overhead. I've Oracle Application Server > here which (as far as I can see) blocks in the sendmsg call. The only thing I > can do at that time is killing it. I think I'll use that or use some sort of It's not really a "test program" per se, it's WINE ;) > special test programs (like yours) to investigate. > If there is such a need, I can always choose to implement the LDT > functionality and ask politely if you could slap down the archive somewhere. Oh my, there's someone else having problems with sendmsg? > > I'll keep you informed of any progress... > > marcel > Brian Feldman _ __ ___ ___ ___ green@unixhelp.org _ __ ___ | _ ) __| \ http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sun Jan 10 12:18:09 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA08869 for freebsd-emulation-outgoing; Sun, 10 Jan 1999 12:18:09 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA08862 for ; Sun, 10 Jan 1999 12:18:07 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.8.8/8.8.7) with ESMTP id PAA14279; Sun, 10 Jan 1999 15:17:28 -0500 (EST) Date: Sun, 10 Jan 1999 15:17:28 -0500 (EST) From: Brian Feldman X-Sender: green@janus.syracuse.net To: Mike Smith cc: Marcel Moolenaar , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! In-Reply-To: <199901101052.CAA05296@dingo.cdrom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 10 Jan 1999, Mike Smith wrote: > > > > Just one question. Is it save to assume there is no problem with the native > > FreeBSD syscall? > > To put it differently; Is it wise to focus on the subtle differences of the > > Linux syscall? > > I would definitely want to set up a FreeBSD version of the call under > the same circumstances (ie. test program) to make sure it worked > natively, then build the same test program under Linux and verify that > it failed under emulation, and then compare the call data inside the > kernel for the two operations. This is WINE, and under FreeBSD sendmsg() succeeds every time, and WINE runs. In Linux emulation, sendmsg never succeeds :( syscall linux_socketcall(0x10,0xefbfd654) errno -22 'Invalid argument' I guess I could try to DDB and break on sendmsg's... > > -- > \\ Sometimes you're ahead, \\ Mike Smith > \\ sometimes you're behind. \\ mike@smith.net.au > \\ The race is long, and in the \\ msmith@freebsd.org > \\ end it's only with yourself. \\ msmith@cdrom.com > > > Brian Feldman _ __ ___ ___ ___ green@unixhelp.org _ __ ___ | _ ) __| \ http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sun Jan 10 14:31:35 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA22885 for freebsd-emulation-outgoing; Sun, 10 Jan 1999 14:31:35 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA22880 for ; Sun, 10 Jan 1999 14:31:33 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.8.8/8.8.7) with ESMTP id RAA21205; Sun, 10 Jan 1999 17:30:48 -0500 (EST) Date: Sun, 10 Jan 1999 17:30:48 -0500 (EST) From: Brian Feldman X-Sender: green@janus.syracuse.net To: Mike Smith cc: Marcel Moolenaar , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! In-Reply-To: <199901101052.CAA05296@dingo.cdrom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 10 Jan 1999, Mike Smith wrote: > > > > Just one question. Is it save to assume there is no problem with the native > > FreeBSD syscall? > > To put it differently; Is it wise to focus on the subtle differences of the > > Linux syscall? > > I would definitely want to set up a FreeBSD version of the call under > the same circumstances (ie. test program) to make sure it worked > natively, then build the same test program under Linux and verify that > it failed under emulation, and then compare the call data inside the > kernel for the two operations. Thanks for the previous tip to try using DDB and work it out, from the kernel on outward :) --- src/sys/i386/linux/linux_socket.c.orig Sun Jan 10 16:47:36 1999 +++ src/sys/i386/linux/linux_socket.c Sun Jan 10 17:25:10 1999 @@ -51,6 +51,10 @@ #include #include +#ifndef offsetof +#define offsetof(type, member) ((size_t)(&((type *)0)->member)) +#endif + static int linux_to_bsd_domain(int domain) { @@ -811,7 +815,40 @@ case LINUX_GETSOCKOPT: return linux_getsockopt(p, args->args); case LINUX_SENDMSG: - return sendmsg(p, args->args); + do { + int error, level; + caddr_t control; + struct { + int s; + const struct msghdr *msg; + int flags; + } *uap = args->args; + + error = copyin(uap->msg + offsetof(struct msghdr, msg_control), + &control, sizeof(caddr_t)); + if (error) + return error; + if (control == NULL) + goto done; + error = copyin(control + offsetof(struct cmsghdr, cmsg_level), + &level, sizeof(int)); + if (error) + return error; + if (level == 1) { + /* + * Linux thinks that SOL_SOCKET is 1; we know that it's really + * 0xffff, of course. + */ + level = SOL_SOCKET; + error = copyout(&level, control + + offsetof(struct cmsghdr, cmsg_level), + sizeof(int)); + if (error) + return error; + } + done: + return sendmsg(p, args->args); + } while (0); case LINUX_RECVMSG: return recvmsg(p, args->args); > > -- > \\ Sometimes you're ahead, \\ Mike Smith > \\ sometimes you're behind. \\ mike@smith.net.au > \\ The race is long, and in the \\ msmith@freebsd.org > \\ end it's only with yourself. \\ msmith@cdrom.com > > > Brian Feldman _ __ ___ ___ ___ green@unixhelp.org _ __ ___ | _ ) __| \ http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Mon Jan 11 06:24:29 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA08630 for freebsd-emulation-outgoing; Mon, 11 Jan 1999 06:24:29 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA08622 for ; Mon, 11 Jan 1999 06:24:24 -0800 (PST) (envelope-from marcel@scc.nl) Received: from scones.sup.scc.nl (i030.ztm.euronet.nl [194.134.112.31]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id PAA16605; Mon, 11 Jan 1999 15:23:49 +0100 (MET) Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.1/8.9.1) with ESMTP id PAA75980; Mon, 11 Jan 1999 15:23:03 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <369A0946.DA78C160@scc.nl> Date: Mon, 11 Jan 1999 15:23:02 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Brian Feldman CC: Mike Smith , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Brian Feldman wrote: > > > > > > Just one question. Is it save to assume there is no problem with the native > > > FreeBSD syscall? > > > To put it differently; Is it wise to focus on the subtle differences of the > > > Linux syscall? > > > > I would definitely want to set up a FreeBSD version of the call under > > the same circumstances (ie. test program) to make sure it worked > > natively, then build the same test program under Linux and verify that > > it failed under emulation, and then compare the call data inside the > > kernel for the two operations. > > Thanks for the previous tip to try using DDB and work it out, from the kernel > on outward :) > [patch deleted] The patch is all that's needed for Oracle Application Server!!! The patch Brian posted does do the job, but, IMHO, is not a good basis for further finetuning of the sendmsg and recvmsg syscalls. Especially the copyout bothers me. Is it worth reimplementing sendmsg and recvmsg or is everybody happy with the patch? BTW Brian, you're quick. I was still setting up a second machine :-) marcel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Mon Jan 11 09:39:21 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA03037 for freebsd-emulation-outgoing; Mon, 11 Jan 1999 09:39:21 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from dingo.cdrom.com (castles234.castles.com [208.214.165.234]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA03031 for ; Mon, 11 Jan 1999 09:39:16 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (LOCALHOST [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id JAA92400; Mon, 11 Jan 1999 09:35:00 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199901111735.JAA92400@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Marcel Moolenaar cc: Brian Feldman , Mike Smith , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! In-reply-to: Your message of "Mon, 11 Jan 1999 15:23:02 +0100." <369A0946.DA78C160@scc.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 11 Jan 1999 09:34:59 -0800 From: Mike Smith Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > The patch Brian posted does do the job, but, IMHO, is not a good basis for > further finetuning of the sendmsg and recvmsg syscalls. Especially the > copyout bothers me. Is it worth reimplementing sendmsg and recvmsg or is > everybody happy with the patch? That depends on how you describe "reimplementing". You might want to shim the generic implementations to make them more friendly to the Linux layer, but I would not think that reimplementing the bulk of the syscall in the Linux emulator would be a wise idea. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Mon Jan 11 13:30:18 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA03431 for freebsd-emulation-outgoing; Mon, 11 Jan 1999 13:30:18 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA03397 for ; Mon, 11 Jan 1999 13:30:12 -0800 (PST) (envelope-from marcel@scc.nl) Received: from scones.sup.scc.nl (i019.ztm.euronet.nl [194.134.112.20]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id WAA15232; Mon, 11 Jan 1999 22:29:36 +0100 (MET) Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.1/8.9.1) with ESMTP id WAA92105; Mon, 11 Jan 1999 22:27:55 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <369A6CDA.8A6D114B@scc.nl> Date: Mon, 11 Jan 1999 22:27:54 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Mike Smith CC: Brian Feldman , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! References: <199901111735.JAA92400@dingo.cdrom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Mike Smith wrote: > > > > The patch Brian posted does do the job, but, IMHO, is not a good basis for > > further finetuning of the sendmsg and recvmsg syscalls. Especially the > > copyout bothers me. Is it worth reimplementing sendmsg and recvmsg or is > > everybody happy with the patch? > > That depends on how you describe "reimplementing". You might want to > shim the generic implementations to make them more friendly to the > Linux layer, but I would not think that reimplementing the bulk of the > syscall in the Linux emulator would be a wise idea. If sendit and recvit in /sys/kern/uipc_syscalls.c would be public, than we could create a linux_sendmsg and linux_recvmsg based on sendmsg and recvmsg and have it call sendit and recvit directly. To eliminate the copyout and also to prevent a copyin of the, possibly large, control message (ancillary data) it would be benificial to seperate the cmsg header from the cmsg data in the lower layers (at least for sending). The only thing that's against such a modification is the impact on the existing code. I'm willing to make the modifications, only if there is a change that such a change would be accepted in the first place. marcel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Tue Jan 12 04:04:59 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA08790 for freebsd-emulation-outgoing; Tue, 12 Jan 1999 04:04:59 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from law-f77.hotmail.com (law-f77.hotmail.com [209.185.131.140]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA08784 for ; Tue, 12 Jan 1999 04:04:57 -0800 (PST) (envelope-from frix_bsd@hotmail.com) Received: (from root@localhost) by law-f77.hotmail.com (8.8.8/8.8.8) id EAA04539 for freebsd-emulation@freebsd.org; Tue, 12 Jan 1999 04:04:23 -0800 (PST) (envelope-from frix_bsd@hotmail.com) Message-Id: <199901121204.EAA04539@law-f77.hotmail.com> Received: from 147.110.52.37 by www.hotmail.com with HTTP; Tue, 12 Jan 1999 04:04:22 PST X-Originating-IP: [147.110.52.37] From: "Frikkie Thirion" To: freebsd-emulation@FreeBSD.ORG Subject: Boycotted by proxy service Date: Tue, 12 Jan 1999 04:04:22 PST Mime-Version: 1.0 Content-Type: text/plain Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org HI there I'm currently at my vacation work and they only give internet access through a http proxy, no socks. I was wondering if there is another package similar to modula-3-socks which could be used to cvsup(date) Any sugestions will be apreciated tremendously Kind regards Frikkie Thirion ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Tue Jan 12 12:41:32 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA08505 for freebsd-emulation-outgoing; Tue, 12 Jan 1999 12:41:32 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA08494 for ; Tue, 12 Jan 1999 12:41:30 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.8.8/8.8.7) with ESMTP id PAA02641; Tue, 12 Jan 1999 15:40:41 -0500 (EST) Date: Tue, 12 Jan 1999 15:40:41 -0500 (EST) From: Brian Feldman X-Sender: green@janus.syracuse.net To: Marcel Moolenaar cc: Mike Smith , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! In-Reply-To: <369A6CDA.8A6D114B@scc.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 11 Jan 1999, Marcel Moolenaar wrote: > Mike Smith wrote: > > > > > > The patch Brian posted does do the job, but, IMHO, is not a good basis for > > > further finetuning of the sendmsg and recvmsg syscalls. Especially the > > > copyout bothers me. Is it worth reimplementing sendmsg and recvmsg or is > > > everybody happy with the patch? > > > > That depends on how you describe "reimplementing". You might want to > > shim the generic implementations to make them more friendly to the > > Linux layer, but I would not think that reimplementing the bulk of the > > syscall in the Linux emulator would be a wise idea. > > If sendit and recvit in /sys/kern/uipc_syscalls.c would be public, than we > could create a linux_sendmsg and linux_recvmsg based on sendmsg and recvmsg > and have it call sendit and recvit directly. > > To eliminate the copyout and also to prevent a copyin of the, possibly large, > control message (ancillary data) it would be benificial to seperate the cmsg > header from the cmsg data in the lower layers (at least for sending). > > The only thing that's against such a modification is the impact on the > existing code. I'm willing to make the modifications, only if there is a > change that such a change would be accepted in the first place. > > marcel > What Linux syscalls aren't working properly (socket calls, of course)? This is the only one I've _ever_ run across. And I hardly think a 4-byte-copyin, then a conditional 4-byte-more copyin, and then conditionally again a 4-byte copyout is substantial overhead! You know of course that system call arguments are faulted in from the user stack on int 0x80, so it doesn't change the system call time that much (read: substantially at all) to have a couple more. Brian Feldman _ __ ___ ___ ___ green@unixhelp.org _ __ ___ | _ ) __| \ http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Wed Jan 13 21:15:52 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA17626 for freebsd-emulation-outgoing; Wed, 13 Jan 1999 21:15:52 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from opus.cts.cwu.edu (opus.cts.cwu.edu [198.104.92.71]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA17621 for ; Wed, 13 Jan 1999 21:15:49 -0800 (PST) (envelope-from skynyrd@opus.cts.cwu.edu) Received: from localhost (skynyrd@localhost) by opus.cts.cwu.edu (8.9.1/8.9.1) with SMTP id VAA24882 for ; Wed, 13 Jan 1999 21:14:42 -0800 (PST) Date: Wed, 13 Jan 1999 21:14:42 -0800 (PST) From: Chris Timmons To: freebsd-emulation@FreeBSD.ORG Subject: TclPro for Linux eval Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org With the most recent 3.0-current emulator, I can run the setup program, interact with dialogue windows, etc ... but then things go sour here, apparantly while creating a pipe (I would guess preparing to execute the unzip program "uzpln86" to uncompress tclpro.1 - something I can do from the command line just fine.) 6781 pwlin CALL linux_access(0xefbfa26c,0) 6781 pwlin NAMI "/compat/linux/usr/local/users/skynyrd/tclpro/tclpro1.1/uzpln86" 6781 pwlin NAMI "/usr/local/users/skynyrd/tclpro/tclpro1.1/uzpln86" 6781 pwlin RET linux_access 0 6781 pwlin CALL linux_access(0xefbfa26c,0) 6781 pwlin NAMI "/compat/linux/usr/local/users/skynyrd/tclpro/tclpro1.1/tclpro.1" 6781 pwlin NAMI "/usr/local/users/skynyrd/tclpro/tclpro1.1/tclpro.1" 6781 pwlin RET linux_access 0 6781 pwlin CALL linux_pipe(0xefbfa738) 6781 pwlin RET linux_pipe 0 6781 pwlin CALL linux_fcntl(0x4,0x2,0x1) 6781 pwlin RET linux_fcntl 0 6781 pwlin CALL linux_fcntl(0x5,0x2,0x1) 6781 pwlin RET linux_fcntl 0 6781 pwlin PSIG SIGSEGV SIG_DFL 6781 pwlin NAMI "pwlin.core" 6765 sh RET linux_waitpid 6781/0x1a7d 6765 sh CALL write(0x2,0x80a3080,0x12) 6765 sh GIO fd 2 wrote 18 bytes "Segmentation fault" 6765 sh RET write 18/0x12 I ran gdb on the core file, and this looks plausible: #0 0x80eda8a in TclpCreatePipe () #1 0x80e1aa3 in TclCreatePipeline () #2 0x80e1f4e in Tcl_OpenCommandChannel () #3 0x80da289 in Tcl_ExecCmd () #4 0x80b28c7 in TclInvokeStringCommand () [...] The linux_fcntl calls just before the SEGV are to set the close-on-exec flag (for the pair of file descriptors returned by pipe, right?) Any ideas? I realize that running an interpreted language like TCL under emulation is goofy to begin with, but I kind of wanted to see if I could at least check out some of the tcl debugging stuff. -Chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Jan 14 01:21:45 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA12750 for freebsd-emulation-outgoing; Thu, 14 Jan 1999 01:21:45 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from hotmail.com (law-f56.hotmail.com [209.185.131.119]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id BAA12742 for ; Thu, 14 Jan 1999 01:21:41 -0800 (PST) (envelope-from frix_bsd@hotmail.com) Received: (qmail 11457 invoked by uid 0); 14 Jan 1999 09:20:29 -0000 Message-ID: <19990114092029.11456.qmail@hotmail.com> Received: from 147.110.52.37 by www.hotmail.com with HTTP; Thu, 14 Jan 1999 01:20:29 PST X-Originating-IP: [147.110.52.37] From: "Frikkie Thirion" To: FreeBSD-emulation@FreeBSD.ORG Subject: Trouble aplying Thread patches Date: Thu, 14 Jan 1999 01:20:29 PST Mime-Version: 1.0 Content-Type: text/plain Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi there Sorry to bother you with such a problem, but I can't seem to get the syntax right: patch -p0 < patchfile fails to aply the patches I obtained from http://lt.tar.com which fixes the FreeBSD thread implementations for Linux programs. The only instructions at lt.tar.com on aplying the patches is: '2) Download and install your choice of the patches and files above (if any), and cvsup the latest FreeBSD-current source tree. ' -- download wents fine, just can't seem to install them. Any sugestions on how to aply them? Kind regards Frikkie Thirion ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Jan 14 02:42:36 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA20980 for freebsd-emulation-outgoing; Thu, 14 Jan 1999 02:42:36 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA20970 for ; Thu, 14 Jan 1999 02:42:30 -0800 (PST) (envelope-from marcel@scc.nl) Received: from scones.sup.scc.nl (i006.ztm.euronet.nl [194.134.112.7]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id LAA01127; Thu, 14 Jan 1999 11:41:18 +0100 (MET) Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.1/8.9.1) with ESMTP id LAA98865; Thu, 14 Jan 1999 11:40:32 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <369DC9A0.F1413964@scc.nl> Date: Thu, 14 Jan 1999 11:40:32 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Brian Feldman CC: Mike Smith , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Brian Feldman wrote: > > On Mon, 11 Jan 1999, Marcel Moolenaar wrote: > > > Mike Smith wrote: > > > > > > > > The patch Brian posted does do the job, but, IMHO, is not a good basis for > > > > further finetuning of the sendmsg and recvmsg syscalls. Especially the > > > > copyout bothers me. Is it worth reimplementing sendmsg and recvmsg or is > > > > everybody happy with the patch? > > > > > That depends on how you describe "reimplementing". You might want to > > > shim the generic implementations to make them more friendly to the > > > Linux layer, but I would not think that reimplementing the bulk of the > > > syscall in the Linux emulator would be a wise idea. > > > > If sendit and recvit in /sys/kern/uipc_syscalls.c would be public, than we > > could create a linux_sendmsg and linux_recvmsg based on sendmsg and recvmsg > > and have it call sendit and recvit directly. > > > > To eliminate the copyout and also to prevent a copyin of the, possibly large, > > control message (ancillary data) it would be benificial to seperate the cmsg > > header from the cmsg data in the lower layers (at least for sending). > > > > The only thing that's against such a modification is the impact on the > > existing code. I'm willing to make the modifications, only if there is a > > change that such a change would be accepted in the first place. > > > > What Linux syscalls aren't working properly (socket calls, of course)? Why do you ask? > This is the only one I've _ever_ run across. And I hardly think a 4-byte-copyin, > then a conditional 4-byte-more copyin, and then conditionally again a 4-byte > copyout is substantial overhead! But some overhead can be eliminated if you integrate the functionality of sendmsg and recvmsg (the FreeBSD native syscalls). If we all believe sendmsg and recvmsg (in the Linux emulator) work, than I think it's a good time to discuss possibly optimizations (be it in overhead or in maintainability/readability) > You know of course that system call arguments are faulted in from the user > stack on int 0x80, so it doesn't change the system call time that much > (read: substantially at all) to have a couple more. Ok; but the copyout changes data in a structure controlled by the program. That change is visible by the program. Technically speaking, the Linux emulator can change runtime behavior. I know; it is not likely, but possible. That's what bothers me about the copyout. marcel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Jan 14 06:04:26 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA09733 for freebsd-emulation-outgoing; Thu, 14 Jan 1999 06:04:26 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from ns.tar.com (ns.tar.com [204.95.187.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA09726 for ; Thu, 14 Jan 1999 06:04:24 -0800 (PST) (envelope-from dick@ns.tar.com) Received: (from dick@localhost) by ns.tar.com (8.9.1/8.9.1) id IAA13400; Thu, 14 Jan 1999 08:03:11 -0600 (CST) (envelope-from dick) Date: Thu, 14 Jan 1999 08:03:11 -0600 From: "Richard Seaman, Jr." To: Frikkie Thirion Cc: FreeBSD-emulation@FreeBSD.ORG Subject: Re: Trouble aplying Thread patches Message-ID: <19990114080311.E47922@tar.com> References: <19990114092029.11456.qmail@hotmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: <19990114092029.11456.qmail@hotmail.com>; from Frikkie Thirion on Thu, Jan 14, 1999 at 01:20:29AM -0800 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, Jan 14, 1999 at 01:20:29AM -0800, Frikkie Thirion wrote: > Sorry to bother you with such a problem, but I can't seem to > get the syntax right: patch -p0 < patchfile fails to aply > the patches I obtained from http://lt.tar.com which fixes the FreeBSD > thread implementations for Linux programs. 1) Make sure you have up to date current sources. You really shouldn't have to apply any patches from this site, any more, just to get linux emulation working. It should all be in the current source tree. However, you have to "turn on" the options, as detailed at that site. 2) If you stil think you want to apply any patches: cd /usr/src patch < patchfile should do it. -- Richard Seamman, Jr. email: dick@tar.com 5182 N. Maple Lane phone: 414-367-5450 Chenequa WI 53058 fax: 414-367-5852 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Jan 14 13:49:44 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA14484 for freebsd-emulation-outgoing; Thu, 14 Jan 1999 13:49:44 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA14470 for ; Thu, 14 Jan 1999 13:49:38 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.8.8/8.8.7) with ESMTP id QAA27610; Thu, 14 Jan 1999 16:48:22 -0500 (EST) Date: Thu, 14 Jan 1999 16:48:22 -0500 (EST) From: Brian Feldman X-Sender: green@janus.syracuse.net To: Marcel Moolenaar cc: Mike Smith , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! In-Reply-To: <369DC9A0.F1413964@scc.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 14 Jan 1999, Marcel Moolenaar wrote: > Brian Feldman wrote: > > > > On Mon, 11 Jan 1999, Marcel Moolenaar wrote: > > > > > Mike Smith wrote: > > > > > > > > > > The patch Brian posted does do the job, but, IMHO, is not a good basis for > > > > > further finetuning of the sendmsg and recvmsg syscalls. Especially the > > > > > copyout bothers me. Is it worth reimplementing sendmsg and recvmsg or is > > > > > everybody happy with the patch? > > > > > > That depends on how you describe "reimplementing". You might want to > > > > shim the generic implementations to make them more friendly to the > > > > Linux layer, but I would not think that reimplementing the bulk of the > > > > syscall in the Linux emulator would be a wise idea. > > > > > > If sendit and recvit in /sys/kern/uipc_syscalls.c would be public, than we > > > could create a linux_sendmsg and linux_recvmsg based on sendmsg and recvmsg > > > and have it call sendit and recvit directly. > > > > > > To eliminate the copyout and also to prevent a copyin of the, possibly large, > > > control message (ancillary data) it would be benificial to seperate the cmsg > > > header from the cmsg data in the lower layers (at least for sending). > > > > > > The only thing that's against such a modification is the impact on the > > > existing code. I'm willing to make the modifications, only if there is a > > > change that such a change would be accepted in the first place. > > > > > > > What Linux syscalls aren't working properly (socket calls, of course)? > > Why do you ask? > > > This is the only one I've _ever_ run across. And I hardly think a 4-byte-copyin, > > then a conditional 4-byte-more copyin, and then conditionally again a 4-byte > > copyout is substantial overhead! > > But some overhead can be eliminated if you integrate the functionality of > sendmsg and recvmsg (the FreeBSD native syscalls). If we all believe sendmsg > and recvmsg (in the Linux emulator) work, than I think it's a good time to > discuss possibly optimizations (be it in overhead or in > maintainability/readability) > > > You know of course that system call arguments are faulted in from the user > > stack on int 0x80, so it doesn't change the system call time that much > > (read: substantially at all) to have a couple more. > > Ok; but the copyout changes data in a structure controlled by the program. > That change is visible by the program. Technically speaking, the Linux > emulator can change runtime behavior. I know; it is not likely, but possible. > That's what bothers me about the copyout. I suppose you're right, I saw the const struct msghdr * in sednmsg, but I don't think that necessarily applies to the cmsg, which is just a pointer in msghdr. We do not make any changes to the const struct msghdr *, so we violate no rules. Why would a program ever check if the sendmsg affected cmsghdr? All it would do from then on is have the corrct value of cmsg_level. If it really bothers anyone any serious amount, there's an easy fix. Change the code to if ((oldval = copyin(blah blah blah) == 1){ if (error = copyout(SOL_SOCKET var blah)) return error; error = sendmsg(blahblah); copyout(&oldval blah blah); return error; } pardon the crappily horrible code style, I'm not actually submitting this kinda thing into the kernel. > > marcel > Brian Feldman _ __ ___ ___ ___ green@unixhelp.org _ __ ___ | _ ) __| \ http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Jan 14 14:03:34 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA16361 for freebsd-emulation-outgoing; Thu, 14 Jan 1999 14:03:34 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from top.worldcontrol.com (snblitz.sc.scruznet.com [165.227.132.84]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id OAA16353 for ; Thu, 14 Jan 1999 14:03:30 -0800 (PST) (envelope-from brian@worldcontrol.com) From: brian@worldcontrol.com Received: (qmail 1747 invoked by uid 100); 14 Jan 1999 22:15:40 -0000 Date: Thu, 14 Jan 1999 14:15:40 -0800 To: Frikkie Thirion Cc: FreeBSD-emulation@FreeBSD.ORG Subject: Re: Trouble aplying Thread patches Message-ID: <19990114141540.A1731@top.worldcontrol.com> Mail-Followup-To: Frikkie Thirion , FreeBSD-emulation@FreeBSD.ORG References: <19990114092029.11456.qmail@hotmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <19990114092029.11456.qmail@hotmail.com>; from Frikkie Thirion on Thu, Jan 14, 1999 at 01:20:29AM -0800 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, Jan 14, 1999 at 01:20:29AM -0800, Frikkie Thirion wrote: > Hi there > > Sorry to bother you with such a problem, but I can't seem to > get the syntax right: patch -p0 < patchfile fails to aply > the patches I obtained from http://lt.tar.com which fixes the FreeBSD > thread implementations for Linux programs. > > The only instructions at lt.tar.com on aplying the patches is: > '2) Download and install your choice of the patches and files above (if > any), and cvsup the latest FreeBSD-current source tree. ' > -- download wents fine, just can't seem to install them. > Any sugestions on how to aply them? car /usr/src patch --index-first To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Jan 14 15:28:20 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA01077 for freebsd-emulation-outgoing; Thu, 14 Jan 1999 15:28:20 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from rah.star-gate.com (sj-dsl-9-129-138.dspeed.net [209.249.129.138]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA01072 for ; Thu, 14 Jan 1999 15:28:18 -0800 (PST) (envelope-from hasty@rah.star-gate.com) Received: from rah.star-gate.com (localhost.star-gate.com [127.0.0.1]) by rah.star-gate.com (8.9.1/8.8.8) with ESMTP id PAA29281; Thu, 14 Jan 1999 15:24:44 -0800 (PST) (envelope-from hasty@rah.star-gate.com) Message-Id: <199901142324.PAA29281@rah.star-gate.com> To: brian@worldcontrol.com cc: Frikkie Thirion , FreeBSD-emulation@FreeBSD.ORG, hasty@rah.star-gate.com Subject: Re: Trouble aplying Thread patches In-reply-to: Your message of "Thu, 14 Jan 1999 14:15:40 PST." <19990114141540.A1731@top.worldcontrol.com> Date: Thu, 14 Jan 1999 15:24:44 -0800 From: Amancio Hasty Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I think that should be added to the web page .. >patch --index-first Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA25756 for freebsd-emulation-outgoing; Fri, 15 Jan 1999 03:18:43 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA25751 for ; Fri, 15 Jan 1999 03:18:38 -0800 (PST) (envelope-from marcel@scc.nl) Received: from scones.sup.scc.nl (i449.ztm.euronet.nl [194.134.67.170]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id MAA09971; Fri, 15 Jan 1999 12:17:23 +0100 (MET) Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.1/8.9.1) with ESMTP id MAA48373; Fri, 15 Jan 1999 12:16:44 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <369F239C.D17CD06D@scc.nl> Date: Fri, 15 Jan 1999 12:16:44 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Brian Feldman CC: Mike Smith , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Brian Feldman wrote: > > > > You know of course that system call arguments are faulted in from the user > > > stack on int 0x80, so it doesn't change the system call time that much > > > (read: substantially at all) to have a couple more. > > > > Ok; but the copyout changes data in a structure controlled by the program. > > That change is visible by the program. Technically speaking, the Linux > > emulator can change runtime behavior. I know; it is not likely, but possible. > > That's what bothers me about the copyout. > > I suppose you're right, I saw the const struct msghdr * in sednmsg, but I don't > think that necessarily applies to the cmsg, which is just a pointer in msghdr. > We do not make any changes to the const struct msghdr *, so we violate no > rules. Correct :-) > Why would a program ever check if the sendmsg affected cmsghdr? It is not for the kernel/emulator developer to ask such questions, for it will only result in unfounded assumptions. (hmmm, did I just say that? :-) > All it would do from then on is have the corrct value of cmsg_level. Correct for FreeBSD, but not correct for Linux. We are running Linux apps of course. > If it really bothers anyone any serious amount, there's an easy fix. [fix deleted] I know. It is not such a big deal to spend any more time on this discussion. Let's instead make sure the necessary changed get committed. marcel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sat Jan 16 07:47:46 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA24289 for freebsd-emulation-outgoing; Sat, 16 Jan 1999 07:47:46 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from nina.pagesz.net (nina.pagesz.net [208.194.157.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA24284 for ; Sat, 16 Jan 1999 07:47:45 -0800 (PST) (envelope-from rhh@pagesz.net) Received: from stealth.dummynet. (isabella-59.pagesz.net [208.194.157.59]) by nina.pagesz.net (8.8.7/8.8.7) with ESMTP id KAA21516 for ; Sat, 16 Jan 1999 10:47:55 -0500 Received: (from rhh@localhost) by stealth.dummynet. (8.9.1/8.8.8) id KAA05726 for emulation@freebsd.org; Sat, 16 Jan 1999 10:23:34 -0500 (EST) (envelope-from rhh) Date: Sat, 16 Jan 1999 10:23:34 -0500 From: Randall Hopper To: emulation@FreeBSD.ORG Subject: XessLite4 Spreadsheet - Problem on 3.0-RELEASE Message-ID: <19990116102334.A5244@pagesz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a spreadsheet I've heard is pretty good. Only problem is that there is only a Linux version. So I thought I'd try it with our LINUX emulation. Here's what I see. On FreeBSD w/ ktrace: 5167 xslite4 NAMI "/compat/linux/proc/version" 5167 xslite4 NAMI "/compat/linux" 5167 xslite4 NAMI "/compat/linux/proc/version" 5167 xslite4 RET obs_vtimes 0 5167 xslite4 CALL write(0x2,0xefbfc70c,0x4c) 5167 xslite4 GIO fd 2 wrote 76 bytes "Oops ... cannot find CPU information. Please contact AIS technical support. " 5167 xslite4 RET write 76/0x4c 5167 xslite4 CALL exit(0x1) On Linux w/ strace, I see the output below. I've created /compat/linux/proc/{version,cpuinfo} with copies of these files from a Linux box that Xesslite4 runs on, but no success. Any ideas as to what I need to do to get it working? Or is the Linux layer missing some needed functionality. Thanks, Randall URL: http://www.ais.com/xesslite_share_lic.html URL: ftp://ftp.uu.net/vendor/ais/XessLite/XessLite-4.0.6-2.i386.rpm lstat("/proc/version", {st_mode=0, st_size=0, ...}) = 0 open("/proc/version", O_RDONLY) = 4 fstat(4, {st_mode=0, st_size=0, ...}) = 0 mmap(0, 1024, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400080 00 read(4, "Linux version 2.0.36 (root@ku4nf"..., 1024) = 99 lseek(4, -98, SEEK_CUR) = 1 close(4) = 0 munmap(0x40008000, 1024) = 0 open("/proc/version", O_RDONLY) = 4 fstat(4, {st_mode=0, st_size=0, ...}) = 0 mmap(0, 1024, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400080 00 read(4, "Linux version 2.0.36 (root@ku4nf"..., 1024) = 99 lseek(4, -79, SEEK_CUR) = 20 close(4) = 0 munmap(0x40008000, 1024) = 0 lstat("/proc/cpuinfo", {st_mode=0, st_size=0, ...}) = 0 open("/proc/cpuinfo", O_RDONLY) = 4 fstat(4, {st_mode=0, st_size=0, ...}) = 0 mmap(0, 1024, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400080 00 read(4, "processor\t: 0\ncpu\t\t: 586\nmo"..., 1024) = 238 lseek(4, -237, SEEK_CUR) = 1 close(4) = 0 munmap(0x40008000, 1024) = 0 open("/proc/cpuinfo", O_RDONLY) = 4 fstat(4, {st_mode=0, st_size=0, ...}) = 0 mmap(0, 1024, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400080 00 read(4, "processor\t: 0\ncpu\t\t: 586\nmo"..., 1024) = 238 read(4, "", 1024) = 0 read(4, "", 1024) = 0 close(4) = 0 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message