HomeFreeBSD

amd64: stop using top of the thread' kernel stack for FPU user save area

Description

amd64: stop using top of the thread' kernel stack for FPU user save area

Instead do one more allocation at the thread creation time. This frees
a lot of space on the stack.

Also do not use alloca() for temporal storage in signal delivery sendsig()
function and signal return syscall sys_sigreturn(). This saves equal
amount of space, again by the cost of one more allocation at the thread
creation time.

A useful experiment now would be to reduce KSTACK_PAGES.

Reviewed by: jhb, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31954

Details

Provenance
kibAuthored on Sep 13 2021, 9:05 PM
Reviewer
jhb
Differential Revision
D31954: amd64: stop using top of the thread' kernel stack for FPU user save area
Parents
rG0f6829488ef3: linux32: add a hack to avoid redefining the type of the savefpu tag
Branches
Unknown
Tags
Unknown