Re: Passing a socket fd from user mode to a kernel module
Re: Passing a socket fd from user mode to a kernel module
- Subject: Re: Passing a socket fd from user mode to a kernel module
- From: Bogdan Harjoc <email@hidden>
- Date: Sat, 17 Jul 2010 19:07:10 +0300
Since you already have a control device, how about having the kernel
create the socket and connect to the server, then forward data from
the server into the control socket and from the control socket to the
server ? When the auth is complete, user process closes the control
socket and exits.
Bogdan Harjoc
On Sat, Jul 17, 2010 at 4:54 AM, Joe Lowe <email@hidden> wrote:
> I have a file system kernel module that exposes a remote file system via a
> file system protocol over a socket. Creating/connecting the socket and
> performing initial authentication to the server is done in user mode. The
> socket is then handed to the kernel module via an ioctl to a control device.
[...]
> The primary problem is that the sock_retain and sock_release kernel calls
> are private exports and are not defined in the public kernel headers.
> Without these calls the socket will get torn down when the user mode process
> exits or closes the fd.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden