diff options
author | brooks <brooks@FreeBSD.org> | 2017-05-15 22:50:54 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2017-05-15 22:50:54 +0000 |
commit | 55f52c0df184d00af839c0781e20e389b1fb1d65 (patch) | |
tree | e9b08c17737ec3e3f734a9793f494b514786b0b5 /lib | |
parent | 60604a2c5e0a093503dd49542afcf9e3b586ea7c (diff) | |
download | FreeBSD-src-55f52c0df184d00af839c0781e20e389b1fb1d65.zip FreeBSD-src-55f52c0df184d00af839c0781e20e389b1fb1d65.tar.gz |
MFC r317845-r317846
r317845:
Provide a freebsd32 implementation of sigqueue()
The previous misuse of sys_sigqueue() was sending random register or
stack garbage to 64-bit targets. The freebsd32 implementation preserves
the sival_int member of value when signaling a 64-bit process.
Document the mixed ABI implementation of union sigval and the
incompability of sival_ptr with pointer integrity schemes.
Reviewed by: kib, wblock
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10605
r317846:
Regen post r317845.
MFC with: r317845
Sponsored by: DARPA, AFRL
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/sigqueue.2 | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/libc/sys/sigqueue.2 b/lib/libc/sys/sigqueue.2 index 04e101b..8377c67 100644 --- a/lib/libc/sys/sigqueue.2 +++ b/lib/libc/sys/sigqueue.2 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2012 +.Dd May 5, 2017 .Dt SIGQUEUE 2 .Os .Sh NAME @@ -129,7 +129,6 @@ does not exist. .Xr kill 2 , .Xr sigaction 2 , .Xr sigpending 2 , -.Xr sigqueue 2 , .Xr sigsuspend 2 , .Xr sigtimedwait 2 , .Xr sigwait 2 , @@ -147,3 +146,18 @@ Support for .Tn POSIX realtime signal queue first appeared in .Fx 7.0 . +.Sh CAVEATS +When using +.Nm +to send signals to a process which might have a different ABI +(for instance, one is 32-bit and the other 64-bit), +the +.Va sival_int +member of +.Fa value +can be delivered reliably, but the +.Va sival_ptr +may be truncated in endian dependent ways and must not be relied on. +Further, many pointer integrity schemes disallow sending pointers to other +processes, and this technique should not be used in programs intended to +be portable. |