- Use the correct instruction in safecopy.checkXstate(). Before this CL:
```
TEXT pkg/sentry/arch/fpu/fpu.initX86FPState.abi0(SB)
...
fpu_amd64.s:78 0x7661b2 480fae2f XRSTOR64 0(DI)
TEXT pkg/safecopy/safecopy.checkXstate.abi0(SB)
...
xrstor_amd64.s:54 0x7648a0 0fae2f XRSTOR 0(DI)
```
I'm not sure what the actual difference between XRSTOR and XRSTOR64 is, but
Linux is careful to use XRSTOR64 (arch/x86/kernel/fpu/xstate.h:XRSTOR,
REX_PREFIX) so it probably matters.
- When an AfterLoad callback fails, log the error message before the failing
object, since the latter can be huge and prevent the error message from being
logged.
- Include additional information in the error message emitted by
fpu.State.AfterLoad().
PiperOrigin-RevId: 605534648
SETREGSET/GETREGSET expect AMX portions of fpstate to always be used.
For this reason we need to allocate enough memory for this to happen,
even if we never populate the AMX portions within initX86FPState.
PiperOrigin-RevId: 599702181
For now we are going to completely disable using AMX, so we will
always subtract extended state size reserved from AMX from the rest
of the extended state size, and hardcode the AMX XCR0 bits to be
always off.
Fixes#9750.
PiperOrigin-RevId: 599302059
When we reserve space for an FPU state in a signal frame, we need to use
the size of the current fpu state. The kernel cpuid can report a smaller size.
On restore, we need to read the size of an fpu state from a signal frame.
After S/R, it can't be different from the current fpu size.
PiperOrigin-RevId: 546972243
reflect.ValueOf takes an interface{}, so when passed a slice the compiler emits
a call to runtime.convTslice to heap-allocate a copy of the slice header.
PiperOrigin-RevId: 394310052
Split usermem package to help remove syserror dependency in go_marshal.
New hostarch package contains code not dependent on syserror.
PiperOrigin-RevId: 365651233