Summary: | ptrace() GETFPREGS/SETFPREGS uses 32-bit version of *XSAVE*/*XRSTOR* truncating FIP/FDP | ||
---|---|---|---|
Product: | Base System | Reporter: | Michał Górny <mgorny> |
Component: | kern | Assignee: | Konstantin Belousov <kib> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | emaste, jhb, kib, markj |
Priority: | --- | ||
Version: | Unspecified | ||
Hardware: | amd64 | ||
OS: | Any |
Description
Michał Górny
2020-10-02 06:44:35 UTC
A commit references this bug: Author: kib Date: Sat Oct 3 23:17:30 UTC 2020 New revision: 366417 URL: https://svnweb.freebsd.org/changeset/base/366417 Log: amd64: Store full 64bit of FIP/FDP for 64bit processes when using XSAVE. If current process is 64bit, use rex-prefixed version of XSAVE (XSAVE64). If current process is 32bit and CPU supports saving segment registers cs/ds in the FPU save area, use non-prefixed variant of XSAVE. Reported and tested by: Micha? G?rny <mgorny@mgorny@moritz.systems> PR: 250043 Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26643 Changes: head/sys/amd64/amd64/cpu_switch.S head/sys/amd64/amd64/fpu.c head/sys/amd64/include/md_var.h A commit references this bug: Author: kib Date: Sat Oct 10 13:46:48 UTC 2020 New revision: 366614 URL: https://svnweb.freebsd.org/changeset/base/366614 Log: MFC r366417: amd64: Store full 64bit of FIP/FDP for 64bit processes when using XSAVE. PR: 250043 Changes: _U stable/12/ stable/12/sys/amd64/amd64/cpu_switch.S stable/12/sys/amd64/amd64/fpu.c stable/12/sys/amd64/include/md_var.h |