685
685
token object contains additional information necessary for the
686
686
userspace code to complete the operation.
688
eCryptfs manages a netlink socket between the kernel module and the
689
userspace daemon. When the kernel would like to request a public key
690
operation from the userspace daemon on a file open event, the kernel
691
module allocates from a pool of free netlink message context
692
objects. It then constructs the request packet and sends it down to
693
the userspace daemon, after which the process calls the scheduler. The
694
daemon wakes up and parses the message, directing the request to the
695
appropriate PKI module. Once the request has been processed, the
696
daemon sends a reply packet via the netlink socket. A kernel thread
697
receives the reply, associates the received packet with its netlink
698
message context object, and wakes up the process that originally sent
699
the request out to userspace. The process parses the received packet
700
from the netlink message and continues with the file open operation.
688
eCryptfs manages a device file (/dev/ecryptfs) between the kernel module
689
and the userspace daemon. When the kernel would like to request a public
690
key operation from the userspace daemon on a file open event, the kernel
691
module allocates from a pool of free message context objects. It then
692
constructs the request packet and allows the userspace daemon to read it
693
from the device file, after which the process calls the scheduler. The
694
daemon wakes up, reads and parses the message, then directs the request
695
to the appropriate PKI module. Once the request has been processed, the
696
daemon writes a reply packet via the device file. A kernel thread
697
receives the reply, associates the received packet with its message
698
context object, and wakes up the process that originally sent the
699
request out to userspace. The process parses the received packet from
700
the message and continues with the file open operation.
702
702
\subsection{Deployment Considerations}