Bug#837962: Xen 4.6 fails to build due to incorrect patch applied to tools/blktap2/drivers/tapdisk-vbd.c

2019-02-22 Thread Hans van Kranenburg
On 1/22/19 6:55 PM, Hans van Kranenburg wrote:
> [...]
> 
> Please note that unless there's a response within a month from now, we
> will close the bug report. 

Closing now.

Hans



Bug#837962: Xen 4.6 fails to build due to incorrect patch applied to tools/blktap2/drivers/tapdisk-vbd.c

2019-01-22 Thread Hans van Kranenburg
tags 837962 + moreinfo
thanks

Hi Brett,

I'm hunting down old bug reports in the Xen packages, and also ran into
this one.

The Xen 4.6 packages were in Debian unstable for some time, but they
weren't in particularly good shape, I have been told.

The packaging has changed quite a bit since then and the current Xen
4.11 that we're preparing for Debian Buster, so I think this issue is
not relevant any more. At least I can't find traces of the patch you
mention in current files.

Anyway, here's my standard message that I'm sending out to a whole lot
of old open bugs:

 >8 

Your bug report was targeted at a Xen package in a Debian distribution
older than the current stable (Stretch).

Can you please help us by confirming that any of the following scenarios
does apply to your situation?

* I had this problem a long time ago. It was never solved, but I found a
workaround, which is ...
* I had this problem a long time ago, and I solved it by not using Xen
any more, but by doing ...
* I still experience this problem, and I'm still using Xen
3.2/4.1/4.4/etc. I cannot upgrade to Debian Stretch or Buster because ...
* I had this problem, and since upgrading to Stretch / Buster / ? it
seems it was solved, and I forgot to report it again. Please close it,
thanks.
* Other: ...

Note that even if you found a solution, it's still very useful to report
it back to our bug tracker. There might be someone else running into the
same problem, who can be helped with your information.

Please note that unless there's a response within a month from now, we
will close the bug report. If you discover this message later, and this
case is important to you, then you can try unarchiving the bug and
replying to it, or reach out to the maintainers email list at
pkg-xen-devel at lists.alioth.debian.org (no subscription required) and
post a message.

Thanks,
Hans van Kranenburg



Bug#837962: Xen 4.6 fails to build due to incorrect patch applied to tools/blktap2/drivers/tapdisk-vbd.c

2016-09-15 Thread Brett Stahlman
Package: xen-hypervisor-4.6-amd64
Version: 4.6.0-1ubuntu4.1

I downloaded the source with `apt-get source', and did the following:
./configure
make debball

The build fails with the following error:
gcc  -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99
-Wall -Wstrict-prototypes -Wdeclaration-after-statement
-Wno-unused-but-set-variable -Wno-unused-local-typedefs
-D__XEN_TOOLS__ -MMD -MF .tapdisk-vbd.o.d -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE   -Werror -Wno-unused -fno-strict-aliasing
-I../include -I../drivers
-I/home/bstahlman/src/xen-4.6-src/xen-4.6.0/tools/blktap2/drivers/../../../tools/libxc/include
-I/home/bstahlman/src/xen-4.6-src/xen-4.6.0/tools/blktap2/drivers/../../../tools/include
-D_GNU_SOURCE -DUSE_NFS_LOCKS
-I/home/bstahlman/src/xen-4.6-src/xen-4.6.0/tools/blktap2/drivers/../../../tools/libxc
-fPIC  -c -o tapdisk-vbd.o tapdisk-vbd.c
tapdisk-vbd.c: In function ‘tapdisk_vbd_pull_ring_requests’:
tapdisk-vbd.c:1572:13: error: invalid type argument of ‘->’ (have
‘blkif_request_t {aka struct blkif_request}’)
   idx  = req->id;
 ^

I have been in touch with the author of the patch, Konrad Rzeszutek
Wilk, who has confirmed that one of the patches in the Debian package
is incorrect. It was apparently amended at some point, but debian is
using the original, flawed version. The following patch is the correct
one in a set of 3 xsa155 patches:
https://xenbits.xen.org/xsa/xsa155-xen-0002-blktap2-Use-RING_COPY_REQUEST.patch

The debian package includes an incorrect patch with the same name:
debian/patches/xsa155-xen-0002-blktap2-Use-RING_COPY_REQUEST.patch

It's clear that the debian patch won't work, as it declares "req" as a
struct (blkif_request_t req) but de-references it as though it were
pointer to struct (req->id).

I suggest replacing the incorrect xsa155 patch with the fixed one
referenced in the URL above.

I am using Ubuntu 16.04 LTS x86_64 GNU/Linux 4.4, kernel
4.4.0-36-generic #55-Ubuntu SMP

Thanks,
Brett Stahlman