Re: Re: [PATCH v5 01/11] file: Export __receive_fd() to modules

From
Yongji Xie <hidden>
Date
2021-03-25 11:04:56
Also in
kvm, linux-fsdevel
Reply to
Christoph Hellwig, 2021-03-25
On Thu, Mar 25, 2021 at 4:25 PM Christoph Hellwig [off-list ref] wrote:
On Mon, Mar 15, 2021 at 05:46:43PM +0800, Yongji Xie wrote:
quoted
On Mon, Mar 15, 2021 at 5:08 PM Christoph Hellwig [off-list ref] wrote:
quoted
On Mon, Mar 15, 2021 at 01:37:11PM +0800, Xie Yongji wrote:
quoted
Export __receive_fd() so that some modules can use
it to pass file descriptor between processes.
I really don't think any non-core code should do that, especilly not
modular mere driver code.
Do you see any issue? Now I think we're able to do that with the help
of get_unused_fd_flags() and fd_install() in modules. But we may miss
some security stuff in this way. So I try to export __receive_fd() and
use it instead.
The real problem is now what helper to use, but rather that random
drivers should not just mess with the FD table like that.
I see. I will use receive_fd() instead that only receives and installs
an fd. This is indeed needed in our cases.

Thanks,
Yongji
Thread (36 messages) 36 messages, 5 authors, 2021-03-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help