Due to fxsave area is os independent reimplement fxsave handmade code
using copying of a whole area.
Details
golang and glibc test suite
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/x86/linux/linux_x86_sigframe.h | ||
---|---|---|
149 | just to preserve/restore native mcontext_t mc_ownedfp and mc_ownedfp, lines 304,423 | |
178 |
part of sigframe structure, line 190, i.e., the same as native counterpart
No, this is common include for x86, on amd64/linux32 this structure should be packed, |
sys/x86/linux/linux_x86_sigframe.h | ||
---|---|---|
149 |
I put this structure into the reserved area to bytes economy, however it’s not a problem to put it at the end of sigframe before fpstate | |
178 |
ok, I'll fix it later |
sys/x86/linux/linux_x86_sigframe.h | ||
---|---|---|
149 | You should not put it into Linux userspace at all. They are either not needed for sigreturn(2) in any form, including Linux, or have trivial valid values you can reconstruct on fly. |
sys/x86/linux/linux_x86_sigframe.h | ||
---|---|---|
149 |
why? On Linux userspace should read sc_fpsate of sigcontext to get xsave area ptr due to strict alignment requirements for this area (Linux does not copyin/copyout xsave area, just uses op's)
I see, then what to do with the xfpusave_len? Also reconstruct? |
sys/x86/linux/linux_x86_sigframe.h | ||
---|---|---|
149 |
Because there is no such field on Linux. I am sure that eventually there is a binary that hardcodes the layout.
What does Linux do there? Is it always writing the max layout? If yes, you should do the same. |
sys/x86/linux/linux_x86_sigframe.h | ||
---|---|---|
183 | So why do you still need this structure? |
sys/x86/linux/linux_x86_sigframe.h | ||
---|---|---|
183 | Does Linux ucontext have all these fields like uc_link etc? |