[Bug 206370] amd64 fpu not fully initialized

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 206370] amd64 fpu not fully initialized

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206370

            Bug ID: 206370
           Summary: amd64 fpu not fully initialized
           Product: Base System
           Version: 10.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: [hidden email]
          Reporter: [hidden email]
                CC: [hidden email]
                CC: [hidden email]

Created attachment 165763
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=165763&action=edit
fpu zero-ing diff

The register file for the x86 MMU is not fully zero'd when creating the thread0
context.  This leaves garbage in several of the registers.  For the X87 FPU
registers, they are properly tagged as empty, but the register file still
contains garbage.  For the XMM registers, only register 0 is actually zero'd
(not the whole file).  The diff attached, fully zero's the X87 registers and
ALL 16 of the XMM registers.

The contents of the fxsave area look something like the stuff below w/out the
diff.  With the diff, all of the registers are zero'd.  Diff is against 10.2-R.

xmm st0 = 0100000000000000ffff
xmm st1 = 00f0000000000000ffff
xmm st2 = 27e9000000000000ffff
xmm st3 = a1e8000000000000ffff
xmm st4 = 2800000000000000ffff
xmm st5 = 0000000000000000ffff
xmm st6 = 0a00000000000000ffff
xmm st7 = 00000000000000000000
xmm xmm0 = 00000000000000000000000000000000
xmm xmm1 = 0000c842000000000000000000000000
xmm xmm2 = 075b0000000000000000000000000000
xmm xmm3 = 00000080000000000000000000000000
xmm xmm4 = 40020000000000000000000000000000
xmm xmm5 = 020000e0000000000000000000000000
xmm xmm6 = 00400000000000000000000000000000
xmm xmm7 = 3f7f0000000000000000000000000000
xmm xmm8 = 00000000000000000000000000000000
xmm xmm9 = 00000000000000000000000000000000
xmm xmma = 00000000000000000000000000000000
xmm xmmb = 00000000000000000000000000000000
xmm xmmc = 00000000000000000000000000000000
xmm xmmd = 00000000000000000000000000000000
xmm xmme = 00000000000000000000000000000000
xmm xmmf = 00000000000000000000000000000000

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 206370] amd64 fpu not fully initialized

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206370

--- Comment #1 from [hidden email] ---
A commit references this bug:

Author: kib
Date: Tue Jan 19 08:04:02 UTC 2016
New revision: 294311
URL: https://svnweb.freebsd.org/changeset/base/294311

Log:
  Clear whole XMM register file instead of only XMM0.  Also clear x87
  registers.  This brings amd64 on par with i386, providing consistent
  initial FPU state.

  Note that we do not clear any extended state, at least because kernel
  does not understand extended state structure and consequences of zero
  overwrite after fninit()/fpusave().

  Submitted by: [hidden email]
  PR:   206370
  MFC after:    2 weeks

Changes:
  head/sys/amd64/amd64/fpu.c

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 206370] amd64 fpu not fully initialized

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206370

Mark Linimon <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]    |[hidden email]

--- Comment #2 from Mark Linimon <[hidden email]> ---
Assign to committer.

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 206370] amd64 fpu not fully initialized

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206370

--- Comment #3 from [hidden email] ---
A commit references this bug:

Author: kib
Date: Tue Feb  2 14:16:08 UTC 2016
New revision: 295148
URL: https://svnweb.freebsd.org/changeset/base/295148

Log:
  MFC r294311:
  Clear whole XMM register file instead of only XMM0.  Also clear x87
  registers.  This brings amd64 on par with i386, providing consistent
  initial FPU state.

  PR:   206370

  MFC r294312:
  Use ANSI definitions.  Wrap long line.

  MFC r294313:
  Adjust i386 comment to match amd64 one after r294311.

  Approved by:  re (gjb)

Changes:
_U  stable/10/
  stable/10/sys/amd64/amd64/fpu.c
  stable/10/sys/i386/isa/npx.c

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 206370] amd64 fpu not fully initialized

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206370

--- Comment #4 from Mark Linimon <[hidden email]> ---
Committed back in 2016.

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 206370] amd64 fpu not fully initialized

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206370

Mark Linimon <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|New                         |Closed

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"