From owner-freebsd-emulation@FreeBSD.ORG Mon May 11 07:36:33 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 01E141065673 for ; Mon, 11 May 2009 07:36:33 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 79A7C8FC0A for ; Mon, 11 May 2009 07:36:32 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 7A1CB9AEC7; Mon, 11 May 2009 11:36:31 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.17.3] (HELO dchagin.static.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1780231346; Mon, 11 May 2009 11:36:31 +0400 Received: from dchagin.static.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.static.corbina.ru (8.14.3/8.14.3) with ESMTP id n4B7aV3l049577; Mon, 11 May 2009 11:36:31 +0400 (MSD) (envelope-from dchagin@dchagin.static.corbina.ru) Received: (from dchagin@localhost) by dchagin.static.corbina.ru (8.14.3/8.14.3/Submit) id n4B7aPe1049576; Mon, 11 May 2009 11:36:25 +0400 (MSD) (envelope-from dchagin) Date: Mon, 11 May 2009 11:36:25 +0400 From: Chagin Dmitry To: Thomas Mueller Message-ID: <20090511073625.GA49560@dchagin.static.corbina.ru> References: <200905090700.n49704gb019256@freefall.freebsd.org> <20090509080609.GA4415@dchagin.static.corbina.ru> <20090511092045.4e18692c@tom.ulm.sysgo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline In-Reply-To: <20090511092045.4e18692c@tom.ulm.sysgo.com> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: freebsd-emulation@freebsd.org Subject: Re: kern/134276: [linux][patch] MSG_NOSIGNAL not translated for recv(), socket timeout incorrect for 64-bit hosts 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: Mon, 11 May 2009 07:36:33 -0000 --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 11, 2009 at 09:20:45AM +0200, Thomas Mueller wrote: > On Sat, 9 May 2009 12:06:09 +0400, Chagin Dmitry wrote: > > On Sat, May 09, 2009 at 07:00:04AM +0000, Thomas Mueller wrote: > > > The following reply was made to PR kern/134276; it has been noted by = GNATS. > > >=20 > > > From: Thomas Mueller > > > To: Chagin Dmitry > > > Cc: freebsd-gnats-submit@freebsd.org > > > Subject: Re: kern/134276: [linux][patch] MSG_NOSIGNAL not translated = for > > > recv(), socket timeout incorrect for 64-bit hosts > > > Date: Sat, 9 May 2009 08:30:53 +0200 > > >=20 > > > > > I've encountered two socket related problems with the Linux emul= ation: > > > > >=20 > > > > > 1. A Linux application passing the MSG_NOSIGNAL flag in calls to= =20 > > > > > recv() or recvfrom() will still receive a SIGPIPE if the cond= ition > > > > > for sending the signal is met. > > > > >=20 > > > > > 2. An attempt to set socket timeouts with a call to setsocktopt(= ) using the=20 > > > > > SO_RECVTIMEO or SO_SNDTIMEO option will fail with [EINVAL] on= amd64. > > > > >=20 > > > >=20 > > > > What the Linux application you have mentioned? > > > > I should know it to test patches. Thank you. > > > =20 > > > Sorry for not mentioning it in the PR. The applications are part of = the > > > LM-X License Manager package by X-Formation (http://www.x-formation.= com/). > > > It looks like they offer a trial download but require registration. > > > =20 > > > When back in the office (next weeek), I could revert my local changes > > > and provide you with an output of linux_kdump if that helps. I would > > > also test patches. > > > =20 > > > =20 > >=20 > > Thank you, > >=20 > > Please, apply this two patches. > >=20 > > http://people.freebsd.org/~dchagin/patches/commit-4952ce8.patch >=20 > In linux_setsockopt() when calling kern_setsockopt() for > SO_RCVTIMEO/SO_SNDTIMEO you need to pass 'name' instead of > 'bsd_args.name' since the latter is still undefined at that point: >=20 > --- commit-4952ce8.patch.orig 2009-05-11 09:07:56.000000000 +0200 > +++ commit-4952ce8.patch 2009-05-11 09:08:09.000000000 +0200 > @@ -39,7 +39,7 @@ > + tv.tv_sec =3D linux_tv.tv_sec; > + tv.tv_usec =3D linux_tv.tv_usec; > + return (kern_setsockopt(td, bsd_args.s, bsd_args.= level, > -+ bsd_args.name, &tv, UIO_SYSSPACE, sizeof(tv))= ); > ++ name, &tv, UIO_SYSSPACE, sizeof(tv))); > + break; > + default: > + break; >=20 > > http://people.freebsd.org/~dchagin/patches/commit-6355ebf.patch >=20 >=20 Good catch, thank you! --=20 Have fun! chd --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAkoH1XgACgkQ0t2Tb3OO/O0eHQCgqY2u7QiHYsf9JD34RDLbEC6O /JIAn0O0HZKNJMGYJvJLTw3tNyXf6eif =vOcE -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk--