]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: eliminate td_md.md_fpu_scratch
authorKonstantin Belousov <kib@FreeBSD.org>
Wed, 15 Sep 2021 18:37:47 +0000 (21:37 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Tue, 21 Sep 2021 17:20:15 +0000 (20:20 +0300)
commitbd9e0f5df681da8b5ef05a587b4b5b07572d3fc2
tree7915a0a33b984f6cae8f1cf78b466ef5a60e41ff
parentdf8dd6025af88a99d34f549fa9591a9b8f9b75b1
amd64: eliminate td_md.md_fpu_scratch

For signal send, copyout from the user FPU save area directly.

For sigreturn, we are in sleepable context and can do temporal
allocation of the transient save area.  We cannot copying from userspace
directly to user save area because XSAVE state needs to be validated,
also partial copyins can corrupt it.

Requested by: jhb
Reviewed by: jhb, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31954
sys/amd64/amd64/exec_machdep.c
sys/amd64/amd64/vm_machdep.c
sys/amd64/ia32/ia32_signal.c
sys/amd64/include/proc.h
sys/kern/kern_thread.c