Date: Sun, 5 Oct 2008 11:54:52 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Roman Divacky <rdivacky@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/compat/linux linux_misc.c Message-ID: <20081005085452.GX46653@deviant.kiev.zoral.com.ua> In-Reply-To: <20081004212237.GA58802@freebsd.org> References: <200810041923.m94JNdfG004774@repoman.freebsd.org> <20081004212237.GA58802@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081005085452.GX46653>