I want to vote for using POSIX realtime signals. With them (and SA_SIGINFO)
you can carry small amounts of userdata, passed in the
struct siginfo_t
---susv2---
The <signal.h> header defines the siginfo_t type as a structure that
includes at least the following members:
int si_signo signal number
int si_errno if non-zero, an errno value associated with
this signal, as defined in <errno.h>
int si_code signal code
pid_t si_pid sending process ID
uid_t si_uid real user ID of sending process
void *si_addr address of faulting instruction
int si_status exit value or signal
long si_band band event for SIGPOLL
union sigval si_value signal value
[and further on]
Implementations may support additional si_code values not included in this
list, may generate values included in this list under circumstances other
than those described in this list, and may contain extensions or limitations
that prevent some values from being generated. Implementations will not
generate a different value from the ones described in this list for
circumstances described in this list.
---susv2---
So we could use si_code=SI_QUEUE and pass the uaddr in sival_ptr
or even si_code=SIGPOLL and pass the data in si_band.
We could also add our own si_code (SI_FUTEX) and add the tid in
siginfo_t (if needed for NGPT)
Why pass this data over a file descriptor?
The user space library can block on sigtimedwait() for notifications.
And with the DoS (letting the kernel pin too much memory on behalf
of a user process) we could use the "max locked memory" ulimit.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/