Date: Sun, 12 Dec 2010 10:43:27 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Mike Tancsa <mike@sentex.net> Cc: Jan Henrik Sylvester <me@janh.de>, stable-list freebsd <freebsd-stable@freebsd.org> Subject: Re: aesni(?) corrupts data on 8.2-BETA1 Message-ID: <20101212084327.GS33073@deviant.kiev.zoral.com.ua> In-Reply-To: <4D04195F.1080802@sentex.net> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101212084327.GS33073>