From owner-freebsd-current@FreeBSD.ORG Sat Aug 30 19:58:51 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53B731065678 for ; Sat, 30 Aug 2008 19:58:51 +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 EC47F8FC0C for ; Sat, 30 Aug 2008 19:58:50 +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 1KZWau-0005hO-G2; Sat, 30 Aug 2008 22:58:48 +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 m7UJwjVw086706 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Aug 2008 22:58:45 +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.2/8.14.2) with ESMTP id m7UJwj6t080294; Sat, 30 Aug 2008 22:58:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m7UJwi9G080293; Sat, 30 Aug 2008 22:58:44 +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: Sat, 30 Aug 2008 22:58:44 +0300 From: Kostik Belousov To: Artem Belevich Message-ID: <20080830195844.GI2038@deviant.kiev.zoral.com.ua> References: <20080830183804.GG2038@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nSa29feRGwiKgVww" Content-Disposition: inline In-Reply-To: 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 1KZWau-0005hO-G2 db4ccb82d51b84c197d9a69bfb3adb92 X-Terabit: YES Cc: Bernd Walter , freebsd-current@freebsd.org Subject: Re: __tls_get_addr problem with recent current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2008 19:58:51 -0000 --nSa29feRGwiKgVww Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 30, 2008 at 12:50:04PM -0700, Artem Belevich wrote: > Patch seems to have fixed the problem. The build that used to fail > immediatelly has been going on for few minutes now with no crashes so > far. >=20 > Thanks a lot for the quick fix! Hmm, after I sent the patch, I started thought that, in fact, we shall reread the fsbase when switching from 32bit process, not when switching to such process. Could you, please, retest with the following change (against stock sources, not over the previous patch) ? diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index f34b0cc..29ce2e1 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -249,6 +249,10 @@ store_seg: 1: movl %ds,PCB_DS(%r8) movl %es,PCB_ES(%r8) movl %fs,PCB_FS(%r8) + movl $MSR_FSBASE,%ecx + rdmsr + shlq $32,%rdx + leaq (%rax,%rdx),%r9 jmp done_store_seg 2: movq PCB_GS32P(%r8),%rax movq (%rax),%rax --nSa29feRGwiKgVww Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAki5pnIACgkQC3+MBN1Mb4jbzQCdFVX9kWTWMy9ZfC6WQjkVUbGq qxQAn2NDlwsRsuzs8DOeFOZTq//qwlGi =f3Hc -----END PGP SIGNATURE----- --nSa29feRGwiKgVww--