From owner-cvs-src@FreeBSD.ORG Sun Oct 5 08:54:57 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B29841065688; Sun, 5 Oct 2008 08:54:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 533F28FC0A; Sun, 5 Oct 2008 08:54:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KmPOB-000PuC-Ef; Sun, 05 Oct 2008 11:54:55 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m958sqBe002967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 5 Oct 2008 11:54:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id m958sqpr026237; Sun, 5 Oct 2008 11:54:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id m958sqb3026236; Sun, 5 Oct 2008 11:54:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 5 Oct 2008 11:54:52 +0300 From: Kostik Belousov To: Roman Divacky Message-ID: <20081005085452.GX46653@deviant.kiev.zoral.com.ua> References: <200810041923.m94JNdfG004774@repoman.freebsd.org> <20081004212237.GA58802@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BzhqTaE66jeIVBY0" Content-Disposition: inline In-Reply-To: <20081004212237.GA58802@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KmPOB-000PuC-Ef 07dffa5c80c947a8801734a911559287 X-Terabit: YES Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/compat/linux linux_misc.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2008 08:54:57 -0000 --BzhqTaE66jeIVBY0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 04, 2008 at 11:22:37PM +0200, Roman Divacky wrote: > On Sat, Oct 04, 2008 at 07:23:30PM +0000, Konstantin Belousov wrote: > > kib 2008-10-04 19:23:30 UTC > >=20 > > FreeBSD src repository > >=20 > > Modified files: > > sys/compat/linux linux_misc.c=20 > > Log: > > SVN rev 183612 on 2008-10-04 19:23:30Z by kib > > =20 > > Current linux_fooaffinity() emulation fails, as the FreeBSD affinity > > syscalls expect the bitmap size in the range from 32 to 128. Old glibc > > always assumed size 1024, while newer glibc searches for approriate > > size, starting from 1024 and going up. > > =20 > > For now, use FreeBSD size of cpuset_t for bitmap size parameter and > > return EINVAL if length of user space bitmap less than our size of > > cpuset_t. > > =20 > > Submitted by: dchagin > > MFC after: 1 week > > [This requires MFC of the actual linux affinity syscalls] >=20 > I think this patch (actually, the reverse of this) is what should be > MFCed: >=20 > --- /tmp/linux_misc.c 2008-10-01 14:43:31.000000000 +0200 > +++ linux_misc.c 2008-10-01 14:41:57.000000000 +0200 > @@ -1739,13 +1739,13 @@ > int error; > cpumask_t i =3D ~0; > =20 > - if (args->len < sizeof(cpuset_t)) > + if (args->len < sizeof(cpumask_t)) > return (EINVAL); > =20 > - error =3D copyout(&i, args->user_mask_ptr, sizeof(cpuset_t)); > + error =3D copyout(&i, args->user_mask_ptr, sizeof(cpumask_t)); > if (error) > return (EFAULT); > =20 > - td->td_retval[0] =3D sizeof(cpuset_t); > + td->td_retval[0] =3D sizeof(cpumask_t); > return (0); > } >=20 > this is a minimal change I believe, Juergen Lock tested this. I see no reason to not MFC r177257 together with this change. --BzhqTaE66jeIVBY0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjogNsACgkQC3+MBN1Mb4iddACfdBcLjNB5Mo9u4ApvaHMs44xH F3UAn2Ep4Hnstlw/oxACkdwuy7XfNm/4 =4NIh -----END PGP SIGNATURE----- --BzhqTaE66jeIVBY0--