From: Anthony Liguori <anthony@codemonkey.ws>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, Adam Litke <agl@us.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] block: fix the use of protocols in backing files
Date: Thu, 28 Oct 2010 09:10:30 -0500 [thread overview]
Message-ID: <4CC98456.6060201@codemonkey.ws> (raw)
In-Reply-To: <20101028095149.GE11647@redhat.com>
On 10/28/2010 04:51 AM, Daniel P. Berrange wrote:
>> The problem is that this wouldn't work in the general case. It's rather
>> an exception that it makes sense for file: backing files with file:
>> images. Consider this:
>>
>> # qemu-img create -o backing_file=nbd:foo:1234 /tmp/main.img
>>
>> Without this patch, you'll end up with /tmp/nbd:foo:1234, which is
>> probably not what you wanted. With a patch that would work for file: you
>> would get a hardly better path nbd:/tmp/foo:1234
>>
> Since we know the protocol, there could be a per-protocol function used
> for resolving the backing store URI relative to the master URI. That
> would avoid needing to special case file: in the shared generic code.
>
Relative resolution of a backing files makes me very nervous. Any time
a disk image can reasonably resolve to something other than what the
user expected is potentially a very nasty security issue.
The less obvious the resolution, the worse the problem becomes. I think
resolution based on current path is probably the most obvious
implementation.
Regards,
Anthony Liguori
> Daniel
>
next prev parent reply other threads:[~2010-10-28 14:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 18:19 [Qemu-devel] [PATCH] block: fix the use of protocols in backing files Anthony Liguori
2010-10-27 19:22 ` malc
2010-10-27 19:42 ` Anthony Liguori
2010-10-28 8:30 ` Stefan Hajnoczi
2010-10-28 8:50 ` Kevin Wolf
2010-10-28 9:35 ` Daniel P. Berrange
2010-10-28 9:45 ` Stefan Hajnoczi
2010-10-28 9:49 ` Kevin Wolf
2010-10-28 9:51 ` Daniel P. Berrange
2010-10-28 14:10 ` Anthony Liguori [this message]
2010-11-04 12:54 ` Kevin Wolf
2010-11-04 13:14 ` Anthony Liguori
2010-11-04 13:31 ` Kevin Wolf
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=4CC98456.6060201@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=agl@us.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=berrange@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@linux.vnet.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;
as well as URLs for NNTP newsgroup(s).