From owner-freebsd-stable@FreeBSD.ORG Sun Dec 12 08:43:32 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 865FB1065674 for ; Sun, 12 Dec 2010 08:43:32 +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 21A088FC16 for ; Sun, 12 Dec 2010 08:43:31 +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 oBC8hRh9019082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Dec 2010 10:43:27 +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 oBC8hRs6061620; Sun, 12 Dec 2010 10:43:27 +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 oBC8hRoK061619; Sun, 12 Dec 2010 10:43:27 +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: Sun, 12 Dec 2010 10:43:27 +0200 From: Kostik Belousov To: Mike Tancsa Message-ID: <20101212084327.GS33073@deviant.kiev.zoral.com.ua> References: <4D02CA9E.1030704@janh.de> <4D02D736.7000103@sentex.net> <20101211160121.GL33073@deviant.kiev.zoral.com.ua> <4D040458.3030601@sentex.net> <20101211232253.GR33073@deviant.kiev.zoral.com.ua> <4D04195F.1080802@sentex.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ulKx6OyYBbhdAroi" Content-Disposition: inline In-Reply-To: <4D04195F.1080802@sentex.net> 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=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, 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: Jan Henrik Sylvester , stable-list freebsd Subject: Re: aesni(?) corrupts data on 8.2-BETA1 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 08:43:32 -0000 --ulKx6OyYBbhdAroi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 11, 2010 at 07:37:51PM -0500, Mike Tancsa wrote: > On 12/11/2010 6:22 PM, Kostik Belousov wrote: > > On Sat, Dec 11, 2010 at 06:08:08PM -0500, Mike Tancsa wrote: > >> On 12/11/2010 11:01 AM, Kostik Belousov wrote: > >>> > >>> I have no access to AESNI hardware. For start, you may use > >>> src/tools/tools/crypto/cryptotest > >>> to somewhat verify the sanity of the driver. > >> > >> I doesnt happen every time, but one out of 5 or so=20 > >> > > First, which arch is it, amd64 or i386 ? > >=20 > > Also, please revert r216162 and do the same tests. >=20 > Hi, > Its AMD64, but i386 seems to be impacted too. I am not sure how to > revert to a specific commit, but for now I csup'd with a date tag of >=20 > *date=3D2010.12.02.23.00.00 >=20 > which is a day before > http://lists.freebsd.org/pipermail/svn-src-stable-8/2010-December/004338.= html >=20 >=20 > And that seems to fix it! >=20 > I have been running > cryptotest -c -z -t 10 > in a loop for the past 10min and not one error. Please try this patch on the latest HEAD or RELENG_8. diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 482b5da..1b493b4 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -426,7 +426,9 @@ fpudna(void) fxrstor(&fpu_initialstate); if (pcb->pcb_initial_fpucw !=3D __INITIAL_FPUCW__) fldcw(pcb->pcb_initial_fpucw); - fpuuserinited(curthread); + pcb->pcb_flags |=3D PCB_FPUINITDONE; + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |=3D PCB_USERFPUINITDONE; } else fxrstor(pcb->pcb_save); critical_exit(); diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 9ec5d25..f314e44 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -684,7 +684,9 @@ npxdna(void) fpurstor(&npx_initialstate); if (pcb->pcb_initial_npxcw !=3D __INITIAL_NPXCW__) fldcw(pcb->pcb_initial_npxcw); - npxuserinited(curthread); + pcb->pcb_flags |=3D PCB_NPXINITDONE; + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |=3D PCB_NPXUSERINITDONE; } else { /* * The following fpurstor() may cause an IRQ13 when the --ulKx6OyYBbhdAroi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk0Eiy4ACgkQC3+MBN1Mb4gKGgCeLZ2OoaLYKytj4UNXTI78KrWq Xd4AoJafIILy8juGyZ0ZBddwogi9TNLk =qohO -----END PGP SIGNATURE----- --ulKx6OyYBbhdAroi--