Date: Mon, 22 Nov 2010 14:51:06 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Alexander Leidinger <netchild@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215675 - head/sys/compat/linux Message-ID: <20101122125106.GZ2392@deviant.kiev.zoral.com.ua> In-Reply-To: <201011221242.oAMCgW9O092144@svn.freebsd.org> References: <201011221242.oAMCgW9O092144@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--unlXUuABvvRmijn5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 22, 2010 at 12:42:32PM +0000, Alexander Leidinger wrote: > Author: netchild > Date: Mon Nov 22 12:42:32 2010 > New Revision: 215675 > URL: http://svn.freebsd.org/changeset/base/215675 >=20 > Log: > Do not take the process lock. The assignment to u_short inside the > properly aligned structure is atomic on all supported architectures, and > the thread that should see side-effect of assignment is the same thread > that does assignment. > =20 > Use a more appropriate conditional to detect the linux ABI. > =20 > Suggested by: kib > X-MFC: together with r215664 >=20 > Modified: > head/sys/compat/linux/linux_emul.c >=20 > Modified: head/sys/compat/linux/linux_emul.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/compat/linux/linux_emul.c Mon Nov 22 12:33:48 2010 (r215674) > +++ head/sys/compat/linux/linux_emul.c Mon Nov 22 12:42:32 2010 (r215675) > @@ -265,7 +262,8 @@ linux_proc_exec(void *arg __unused, stru > if (__predict_false(imgp->sysent =3D=3D &elf_linux_sysvec > && p->p_sysent !=3D &elf_linux_sysvec)) > linux_proc_init(FIRST_THREAD_IN_PROC(p), p->p_pid, 0); > - if (__predict_false(p->p_sysent =3D=3D &elf_linux_sysvec)) > + if (__predict_false((p->p_sysent->sv_flags & SV_ABI_MASK) =3D=3D > + SV_ABI_LINUX)) > /* Kill threads regardless of imgp->sysent value */ > linux_kill_threads(FIRST_THREAD_IN_PROC(p), SIGKILL); > if (__predict_false(imgp->sysent !=3D &elf_linux_sysvec There are several similar comparisons around the patched one. I am still quite curious for the reason of all __predict() obfuscations that are countless in the linuxolator. We are not oblidged to emulate this aspect of Linux. --unlXUuABvvRmijn5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzqZzkACgkQC3+MBN1Mb4j44gCfSP/cgcK+dGdlgipC7wGIRPUb WKQAoN1r2j9mOup3dXw3PAXiGF9PmLi7 =9M8k -----END PGP SIGNATURE----- --unlXUuABvvRmijn5--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101122125106.GZ2392>