fd passing fails -- sendmsg ignores ancillary data
The msg_control field of struct msghdr is ignored. Thus, Graphene's implementation of sendmsg does not support passing file descriptors.
Thanks for the report! Do you happen to have a simple test case (or know of an LTP test) that illustrates the issue succinctly?
This limitation is still there. I once tried to fix it with this (not merged) PR: https://github.com/oscarlab/graphene/pull/1511.
But the problem with sending ancillary data in sendmsg (via SCM_RIGHTS flag) is not so trivial: we need to checkpoint the corresponding shim handle and send it to the other process, where this shim handle must be restored (and the corresponding PAL handle re-created). This requires a family of checkpoint functions, but all these functions are currently very much tied to our checkpoint-on-fork code.
So, it's definitely a nice feature to have, but we haven't heard any other requests for this feature. So it doesn't seem urgent. Also, it needs a checkpoint subsystem rewrite, so that checkpoint and restore functions can be freely called from our sendmsg/recvmsg code.