public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>,
	linux-fsdevel@vger.kernel.org, containers@lists.osdl.org,
	linux-kernel@vger.kernel.org,
	ecryptfs-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/2] eCryptfs: Introduce device handle for userspace daemon communications
Date: Tue, 15 Apr 2008 16:34:02 -0500	[thread overview]
Message-ID: <20080415213402.GA6446@sergelap.austin.ibm.com> (raw)
In-Reply-To: <20080415140453.a45a15b4.akpm@linux-foundation.org>

Quoting Andrew Morton (akpm@linux-foundation.org):
> 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?

Thanks Andrew.

Mike, the pid_t definately needs to be replaced with a struct pid.

As for the euid, it'd be best if you also compared the user_namespace *
to make sure we support one ecryptfs deamon per user namespace.

thanks,
-serge

  reply	other threads:[~2008-04-15 21:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-15 20:23 [PATCH 1/2] eCryptfs: Introduce device handle for userspace daemon communications Michael Halcrow
2008-04-15 20:24 ` [PATCH 2/2] " Michael Halcrow
2008-04-15 21:08   ` Andrew Morton
2008-04-15 21:04 ` [PATCH 1/2] " Andrew Morton
2008-04-15 21:34   ` Serge E. Hallyn [this message]
2008-04-16 19:24     ` [PATCH] eCryptfs: Make key module subsystem respect namespaces Michael Halcrow
2008-04-16 21:10       ` [PATCH] eCryptfs: Remove obsolete netlink interface to daemon Michael Halcrow
2008-04-17 15:34       ` [PATCH] eCryptfs: Make key module subsystem respect namespaces Serge E. Hallyn
2008-04-17 17:03         ` [PATCH] eCryptfs: Fix refs to pid and user_ns Michael Halcrow
2008-04-17 17:41           ` Serge E. Hallyn
2008-04-15 22:47   ` [Ecryptfs-devel] [PATCH 1/2] eCryptfs: Introduce device handle for userspace daemon communications Michael Halcrow
2008-04-15 23:30     ` Michael Halcrow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080415213402.GA6446@sergelap.austin.ibm.com \
    --to=serue@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.osdl.org \
    --cc=ecryptfs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhalcrow@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox