Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Aug 2008 22:58:44 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Artem Belevich <fbsdlist@src.cx>
Cc:        Bernd Walter <ticso@cicely7.cicely.de>, freebsd-current@freebsd.org
Subject:   Re: __tls_get_addr problem with recent current
Message-ID:  <20080830195844.GI2038@deviant.kiev.zoral.com.ua>
In-Reply-To: <ed91d4a80808301250j1a4802d4o412c6b5e30979079@mail.gmail.com>
References:  <ed91d4a80808300946s49ff076dw64b57f8e9058f2d@mail.gmail.com> <20080830183804.GG2038@deviant.kiev.zoral.com.ua> <ed91d4a80808301250j1a4802d4o412c6b5e30979079@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080830195844.GI2038>