HomeFreeBSD

Do not qualify the mcontext_t *mcp argument for set_mcontext(9) as

Description

Do not qualify the mcontext_t *mcp argument for set_mcontext(9) as
const. On x86, even after the machine context is supposedly read into
the struct ucontext, lazy FPU state save code might only mark the FPU
data as hardware-owned. Later, set_fpcontext() needs to fetch the
state from hardware, modifying the *mcp.

The set_mcontext(9) is called from sigreturn(2) and setcontext(2)
implementations and old create_thread(2) interface, which throw the
*mcp out after the set_mcontext() call.

Reported by: dim
Discussed with: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Provenance
kibAuthored on Jan 31 2015, 9:43 PM
Parents
rGe0a60ae16abc: Update directory times immediately after an entry is created or
Branches
Unknown
Tags
Unknown

Event Timeline