From owner-svn-src-all@FreeBSD.ORG Mon Nov 22 12:51:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDD3A106566C; Mon, 22 Nov 2010 12:51:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 71A668FC08; Mon, 22 Nov 2010 12:51:11 +0000 (UTC) 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 oAMCp6UY082001 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Nov 2010 14:51:06 +0200 (EET) (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.4/8.14.4) with ESMTP id oAMCp6BA091600; Mon, 22 Nov 2010 14:51:06 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oAMCp6Lc091599; Mon, 22 Nov 2010 14:51:06 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 22 Nov 2010 14:51:06 +0200 From: Kostik Belousov To: Alexander Leidinger Message-ID: <20101122125106.GZ2392@deviant.kiev.zoral.com.ua> References: <201011221242.oAMCgW9O092144@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="unlXUuABvvRmijn5" Content-Disposition: inline In-Reply-To: <201011221242.oAMCgW9O092144@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_20, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215675 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2010 12:51:13 -0000 --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--