qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Chirantan Ekbote <chirantan@chromium.org>
Cc: vromanso@redhat.com, qemu-devel@nongnu.org, mpatel@redhat.com,
	virtio-fs-list <virtio-fs@redhat.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	rmohr@redhat.com
Subject: Re: [Virtio-fs] [PATCH v3] virtiofsd: add container-friendly -o sandbox=chroot option
Date: Tue, 20 Oct 2020 09:13:03 -0400	[thread overview]
Message-ID: <20201020131303.GA380917@redhat.com> (raw)
In-Reply-To: <CAJFHJrohwGOvZax=anXZdFeuTT+uZAJ89Hu9CohgnE-tJEKTiw@mail.gmail.com>

On Mon, Oct 19, 2020 at 06:43:41PM +0900, Chirantan Ekbote wrote:
> On Thu, Oct 8, 2020 at 5:55 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:
> >
> > virtiofsd cannot run in a container because CAP_SYS_ADMIN is required to
> > create namespaces.
> >
> 
> In crosvm we deal with this by also creating a user namespace, which
> then allows us to create the mount, net, and pid namespaces as well.
> Could that also work for virtiofsd?

I think one key question here is that who does the sandboxing. Is it
the contatiner runtime environment or virtiofsd itself. I think what
stefan is trying to do is that container runtime has done the sandboxing
so virtiofsd has not do it.

Having said that, if container runtime has setup things in such a
way that virtiofsd has CAP_SYS_ADMIN, is it desirable that virtiofsd
does pivot_root() instead of chroot()?

Thanks
Vivek



  reply	other threads:[~2020-10-20 13:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08  8:55 [PATCH v3] virtiofsd: add container-friendly -o sandbox=chroot option Stefan Hajnoczi
2020-10-19  9:43 ` [Virtio-fs] " Chirantan Ekbote
2020-10-20 13:13   ` Vivek Goyal [this message]
2020-10-22 19:19 ` Dr. David Alan Gilbert
2020-10-22 19:24   ` Vivek Goyal
2020-10-23 18:24 ` Dr. David Alan Gilbert
2020-10-26 17:19 ` Dr. David Alan Gilbert

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=20201020131303.GA380917@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=chirantan@chromium.org \
    --cc=mpatel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rmohr@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=virtio-fs@redhat.com \
    --cc=vromanso@redhat.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;
as well as URLs for NNTP newsgroup(s).