OpenVZ Forum


Home » Mailing lists » Devel » Re: [PATCH 1/2] eCryptfs: Introduce device handle for userspace daemon communications
Re: [PATCH 1/2] eCryptfs: Introduce device handle for userspace daemon communications [message #29531] Tue, 15 April 2008 21:04 Go to previous message
akpm is currently offline  akpm
Messages: 224
Registered: March 2007
Senior Member
On Tue, 15 Apr 2008 15:23:13 -0500
Michael Halcrow <mhalcrow@us.ibm.com> wrote:

> Functions to facilitate reading and writing to the eCryptfs
> miscellaneous device handle. This will replace the netlink interface
> as the preferred mechanism for communicating with the userspace
> eCryptfs daemon.
> 
> Each user has his own daemon, which registers itself by opening the
> eCryptfs device handle. Only one daemon per euid may be registered at
> any given time. The eCryptfs module sends a message to a daemon by
> adding its message to the daemon's outgoing message queue. The daemon
> reads the device handle to get the oldest message off the queue.
> 
> Incoming messages from the userspace daemon are immediately
> handled. If the message is a response, then the corresponding process
> that is blocked waiting for the response is awakened.
> 

This is a drastic change, but the changelog doesn't tell us why it is being
made!

> ...
> +	rc = ecryptfs_find_daemon_by_euid(&daemon, current->euid);
> +	if (daemon->pid != current->pid) {
> +	rc = ecryptfs_find_daemon_by_euid(&daemon, current->euid);
> +	BUG_ON(current->euid != daemon->euid);
> +	BUG_ON(current->pid != daemon->pid);

This code uses pids and uids all over the place.  Will it operate correctly
in a containerised environment?

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH 0/8 net-2.6.26] [NETNS]: namespace refcounting cleanup
Next Topic: [PATCH] cgroup: fix a race condition in manipulating tsk->cg_list
Goto Forum:
  


Current Time: Wed Jun 26 12:14:55 GMT 2024

Total time taken to generate the page: 0.03097 seconds