[Pkg-xen-devel] Bug#837962: Xen 4.6 fails to build due to incorrect patch applied to tools/blktap2/drivers/tapdisk-vbd.c
Brett Stahlman
brettstahlman at gmail.com
Thu Sep 15 22:36:59 UTC 2016
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
More information about the Pkg-xen-devel
mailing list