qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chris Webb <chris@arachsys.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Connecting virtio-9p-pci to a remote 9p server
Date: Mon, 15 Oct 2012 12:36:08 +0100	[thread overview]
Message-ID: <20121015113607.GB25951@arachsys.com> (raw)

We're planning to implement shared filesystems for guests on our virtualized
hosting platform, stored on a central fileserver separate from the hosts.

Whilst we can mount the shares on each host and then use qemu's 9p
passthrough/proxy support to access the mountpoint, going via the host
kernel and vfs like this feels quite inefficient. We would be converting
back and forth between vfs and 9p models several times needlessly.

Instead, I'm wondering about the feasibility of connecting the 9p stream
directly from qemu's virtio-9p-pci device to a socket opened on a
9p-over-TCP export from the fileserver. Am I right in thinking that qemu's
-fsdev proxy gives me access to a file descriptor attached to the 9p stream
to/from the guest, or is the protocol between virtfs-proxy-helper and qemu
re-encoded within qemu first?

Secondly, assuming I can somehow get at the 9p streams directly (either with
an existing option or by adding a new one), I'd like to restrict guests to
the relevant user's subdirectory on the fileserver, and have been thinking
about doing this by filtering the 9p stream to restrict 'attach' operations.

Fortunately, 9p uses client-chosen fids rather than server filesystem inode
numbers which would immediately scupper any simple attempts to implement a
secure chroot proxy of this kind. Looking at the 9p2000.L protocol, it
doesn't look obviously difficult, but I've not really worked with 9p before,
and could well be missing security complications. (I'm not sure whether
there's risk of symlinks being interpreted server side rather than client
side, for example.)

I'd also be interested in any more general thoughts on this kind of thing.
If we're going to work on it, it would be nice for us to write something
that would be more widely useful to others rather than just create an
in-house hack.

Cheers,

Chris.

             reply	other threads:[~2012-10-15 11:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 11:36 Chris Webb [this message]
2012-10-15 14:26 ` [Qemu-devel] Connecting virtio-9p-pci to a remote 9p server Troy Benjegerdes
2012-10-16 14:15 ` Eric Van Hensbergen
2012-10-30 11:30   ` Chris Webb

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=20121015113607.GB25951@arachsys.com \
    --to=chris@arachsys.com \
    --cc=qemu-devel@nongnu.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).