xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <dunlapg@umich.edu>
To: Ross Philipson <ross.philipson@gmail.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] blktap2: Invalid logic detecting unaligned buffers in vhd_write_block
Date: Tue, 29 Mar 2016 12:26:40 +0100	[thread overview]
Message-ID: <CAFLBxZbdJR2jdEUNiP5iKTR+1o4gwuDCm9ZKYoeS45xdp=C-yg@mail.gmail.com> (raw)
In-Reply-To: <56F56895.6040006@gmail.com>

On Fri, Mar 25, 2016 at 4:34 PM, Ross Philipson
<ross.philipson@gmail.com> wrote:
> On 03/25/2016 12:11 PM, Wei Liu wrote:
>> On Thu, Mar 17, 2016 at 06:10:59PM -0400, Ross Philipson wrote:
>>> It seems the logic is meant to detect sector unaligned buffers for block
>>> writes. The NOTing of the logic instead masks off any unaligned bits and
>>> also would cause the function to always fail. It seems the function is not
>>> used in any of the tools so that is probably why the problem is not seen.
>>> In the vhd_read_block function it is correct.
>>>
>>> Signed-off-by: Ross Philipson <ross.philipson@ainfosec.com>
>>
>> This seems to fall under tools umbrella. I've look at blktap2 code,
>> the reasoning is convincing to me so:
>>
>>   Acked-by: Wei Liu <wei.liu2@citrix.com>
>>
>> But I've never used blktap2 and we don't normally test it so I would
>> also wait a bit longer to see if anybody objects to this change.
>>
>> OOI if no code was using this, how did you discover this problem?
>
> We have an old fork of blktap2 from way back when. I was working to extract our
> changes and turn them into patches so we could rebase on upstream blktap2.
> Someone long ago found that - I have no idea how but it was a valid fix so I
> upstreamed it.
>
> There are a number of other ones that were found that are still in upstream
> blktap2 - I plan to send them too.

Ross,

Instead of cross-porting fixes from XenServer's blktap3 to the
bitrotting blktap2, would you consider taking up my work on replacing
blktap2 with building blktap3 as an external project?

The basic shape of things that need to happen for that are:

1. Allow qemu to provide emulated devices for disks which use hotplug
scripts (just checked in last week)

2. Do the tweaks necessary to allow blktap3 to be built as an
independent project (outside the XenServer build system)

3. Switch libxl to use the already-in-tree block-tap script (which
calls tapctl) rather than linking against the blktap library.

4. Add a blktap target to raisin.

#1 is done and was just checked in last week.  #2 shouldn't be a
terribly large amount of work.  For #3, I've posted patches already,
and I can probably do a quick rebase for you to pick up if you wanted.
#4 shouldn't be too hard once you have an out-of-tree build working; I
can help with that as well.

If we then add tests for upstream blktap to osstest, then we'll catch
any breakages, and automatically get updates; and we can delete the
bitrotting blktap2 out of the tree.

What do you think?

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-03-29 11:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17 22:10 [PATCH] blktap2: Invalid logic detecting unaligned buffers in vhd_write_block Ross Philipson
2016-03-25 16:11 ` Wei Liu
2016-03-25 16:34   ` Ross Philipson
2016-03-25 16:38     ` Wei Liu
2016-03-29 11:26     ` George Dunlap [this message]
2016-03-30 14:47       ` Ross Philipson
2016-04-06 16:51       ` Ross Philipson
2016-07-06 13:16         ` George Dunlap
2016-04-06 14:39 ` Ian Jackson
2016-04-06 15:25   ` Ross Philipson
2016-04-06 15:37   ` Ross Philipson
2016-04-07 16:37     ` Ian Jackson

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='CAFLBxZbdJR2jdEUNiP5iKTR+1o4gwuDCm9ZKYoeS45xdp=C-yg@mail.gmail.com' \
    --to=dunlapg@umich.edu \
    --cc=ross.philipson@gmail.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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).