summaryrefslogtreecommitdiffstats
path: root/sys/sys/ucontext.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-01-31 21:43:46 +0000
committerkib <kib@FreeBSD.org>2015-01-31 21:43:46 +0000
commit3bbc91d138d490edd1e55e311bae6c167da61fb8 (patch)
treec59ea8ad2996445d89d6f2338e4a25a24ab968a8 /sys/sys/ucontext.h
parent1831e3d7dcde53b6f53b3d79d72dc59b8cc1420b (diff)
downloadFreeBSD-src-3bbc91d138d490edd1e55e311bae6c167da61fb8.zip
FreeBSD-src-3bbc91d138d490edd1e55e311bae6c167da61fb8.tar.gz
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
Diffstat (limited to 'sys/sys/ucontext.h')
-rw-r--r--sys/sys/ucontext.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/ucontext.h b/sys/sys/ucontext.h
index f69c8d8..e80ed50 100644
--- a/sys/sys/ucontext.h
+++ b/sys/sys/ucontext.h
@@ -99,7 +99,7 @@ struct thread;
/* Machine-dependent functions: */
int get_mcontext(struct thread *, mcontext_t *, int);
-int set_mcontext(struct thread *, const mcontext_t *);
+int set_mcontext(struct thread *, mcontext_t *);
#endif /* !_KERNEL */
OpenPOWER on IntegriCloud