linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seth Forshee <seth.forshee@canonical.com>
To: Juergen Gross <jgross@suse.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	David Vrabel <david.vrabel@citrix.com>,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xenbus: Use proc_create_mount_point() to create /proc/xen
Date: Tue, 30 Aug 2016 10:02:49 -0500	[thread overview]
Message-ID: <20160830150249.GA55509@ubuntu-hedt> (raw)
In-Reply-To: <7389d1f8-7d61-fbcc-7e62-3f7e7b6f7e50@suse.com>

On Tue, Aug 30, 2016 at 04:48:08PM +0200, Juergen Gross wrote:
> On 29/08/16 17:03, Seth Forshee wrote:
> > Mounting proc in user namespace containers fails if the xenbus
> > filesystem is mounted on /proc/xen because this directory fails
> > the "permanently empty" test. proc_create_mount_point() exists
> > specifically to create such mountpoints in proc but is currently
> > proc-internal. Export this interface to modules, then use it in
> > xenbus when creating /proc/xen.
> > 
> > Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
> > ---
> >  drivers/xen/xenbus/xenbus_probe.c | 2 +-
> >  fs/proc/generic.c                 | 1 +
> >  fs/proc/internal.h                | 1 -
> >  include/linux/proc_fs.h           | 2 ++
> >  4 files changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
> > index 33a31cfef55d..b5c1dec4a7c2 100644
> > --- a/drivers/xen/xenbus/xenbus_probe.c
> > +++ b/drivers/xen/xenbus/xenbus_probe.c
> > @@ -826,7 +826,7 @@ static int __init xenbus_init(void)
> >  	 * Create xenfs mountpoint in /proc for compatibility with
> >  	 * utilities that expect to find "xenbus" under "/proc/xen".
> >  	 */
> > -	proc_mkdir("xen", NULL);
> > +	proc_create_mount_point("xen");
> >  #endif
> >  
> >  out_error:
> > diff --git a/fs/proc/generic.c b/fs/proc/generic.c
> > index c633476616e0..be014c544d50 100644
> > --- a/fs/proc/generic.c
> > +++ b/fs/proc/generic.c
> > @@ -477,6 +477,7 @@ struct proc_dir_entry *proc_create_mount_point(const char *name)
> >  	}
> >  	return ent;
> >  }
> > +EXPORT_SYMBOL(proc_create_mount_point);
> 
> EXPORT_SYMBOL_GPL()?

Other similar sorts of calls in proc (proc_mkdir in particular) are
EXPORT_SYMBOL, so I guessed this one should follow suit. But if it
should be EXPORT_SYMOBL_GPL then that's fine too.

Thanks,
Seth

  reply	other threads:[~2016-08-30 15:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29 15:03 [PATCH] xenbus: Use proc_create_mount_point() to create /proc/xen Seth Forshee
2016-08-30 14:48 ` Juergen Gross
2016-08-30 15:02   ` Seth Forshee [this message]
2016-08-30 15:00 ` [Xen-devel] " David Vrabel
2016-08-30 15:10   ` Seth Forshee
2016-08-30 15:13     ` David Vrabel

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=20160830150249.GA55509@ubuntu-hedt \
    --to=seth.forshee@canonical.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=ebiederm@xmission.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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;
as well as URLs for NNTP newsgroup(s).