Re: [libvirt] Libvirt multi queue support

2013-08-29 Thread Naor Shlomo
Hi Michal First of all thanks for your reply. I followed your advice and the guideline you sent and did the following: interface type='bridge' mac address='52:54:00:43:6e:3f'/ source bridge='clients'/ model type='virtio'/ driver name='vhost' queues='5'/ address

Re: [libvirt] Libvirt multi queue support

2013-08-29 Thread Michal Privoznik
On 29.08.2013 08:07, Naor Shlomo wrote: Hi Michal First of all thanks for your reply. I followed your advice and the guideline you sent and did the following: interface type='bridge' mac address='52:54:00:43:6e:3f'/ source bridge='clients'/ model type='virtio'/

Re: [libvirt] Libvirt multi queue support

2013-08-29 Thread Naor Shlomo
How odd. The Kernel is the first thing I upgraded, here's the output of uname -r: 3.10.9 I searched for IFF_MULTI_QUEUE in /usr/include/linux/if_tun.h and indeed it wasn't there. I believe Kernel 3.10 should support the Multi Queue, do I need to recompile it? maybe change its config file?

Re: [libvirt] Libvirt multi queue support

2013-08-29 Thread Michal Privoznik
On 29.08.2013 08:55, Naor Shlomo wrote: How odd. The Kernel is the first thing I upgraded, here's the output of uname -r: 3.10.9 I searched for IFF_MULTI_QUEUE in /usr/include/linux/if_tun.h and indeed it wasn't there. I believe Kernel 3.10 should support the Multi Queue, do I need to

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Michal Privoznik
On 28.08.2013 23:05, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or veth + number) and trying to assign them to that format is susceptible to race conditions. Instead, assign the parent interface name according to the mac address (the last three bytes) if no name was

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Oskari Saarenmaa
On Thu, Aug 29, 2013 at 10:10:36AM +0200, Michal Privoznik wrote: On 28.08.2013 23:05, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or veth + number) and trying to assign them to that format is susceptible to race conditions. Instead, assign the parent interface

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Gao feng
On 08/29/2013 04:20 PM, Oskari Saarenmaa wrote: On Thu, Aug 29, 2013 at 10:10:36AM +0200, Michal Privoznik wrote: On 28.08.2013 23:05, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or veth + number) and trying to assign them to that format is susceptible to race

[libvirt] [PATCH 1/3] CPU: Implement guestData for PPC CPU driver

2013-08-29 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com On Power platform, Power7+ can support Power7 guest. It needs to define XML configuration to specify guest's CPU model. For exmaple: cpu match='exact' modelPOWER7+_v2.1/model vendorIBM/vendor /cpu Signed-off-by: Li Zhang

[libvirt] [PATCH 3/3] CPU: Implement cpuUpdate to support host-model

2013-08-29 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com Applications on PPC platform wants to support host-model for users Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- src/cpu/cpu_powerpc.c | 35 --- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH 2/3] CPU: add PPC CPU driver test cases.

2013-08-29 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to add test cases for PPC CPU driver. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- tests/cputest.c | 9 + tests/cputestdata/ppc64-baseline-1-result.xml | 3 +++

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Oskari Saarenmaa
29.08.2013 11:36, Gao feng kirjoitti: On 08/29/2013 04:20 PM, Oskari Saarenmaa wrote: On Thu, Aug 29, 2013 at 10:10:36AM +0200, Michal Privoznik wrote: On 28.08.2013 23:05, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or veth + number) and trying to assign them to

Re: [libvirt] [PATCHv2 0/2] Fix crash of libvirtd with interaface type=network and hostdev forwarding

2013-08-29 Thread Peter Krempa
On 08/28/13 16:43, Michal Privoznik wrote: On 28.08.2013 15:14, Peter Krempa wrote: Version 2 contains a fix of more callers in qemu and a whitespace cleanup. Peter Krempa (2): qemu: Remove hostdev entry when freeing the depending network entry qemu_hotplug: Fix whitespace around

[libvirt] Question about how to contribute patches

2013-08-29 Thread hzguanqi...@corp.netease.com
Hi exports, I tried to contribute a patch to fix a bug, following the contributor guidelines on http://libvirt.org/hacking.html. After I do the 'git send-email' operation and edit the email content, It returns: Who should the emails appear to be from? [Guan Qiang

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Gao feng
On 08/29/2013 04:52 PM, Oskari Saarenmaa wrote: 29.08.2013 11:36, Gao feng kirjoitti: On 08/29/2013 04:20 PM, Oskari Saarenmaa wrote: On Thu, Aug 29, 2013 at 10:10:36AM +0200, Michal Privoznik wrote: On 28.08.2013 23:05, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or

Re: [libvirt] [PATCH] bridge_driver: Introduce networkObjFromNetwork

2013-08-29 Thread Peter Krempa
On 08/28/13 14:39, Michal Privoznik wrote: Similarly to qemu_driver.c, we can join often repeating code of looking up network into one function: networkObjFromNetwork. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/network/bridge_driver.c | 76

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Oskari Saarenmaa
29.08.2013 12:11, Gao feng kirjoitti: The suggested patch also greatly simplifies name selection by removing the loops trying to find a supposedly unused interface name. If you don't like using mac address in the interface name we could just replace it with a random string with a loop

Re: [libvirt] [PATCH] virNetDevVethCreate: assign names based on mac address by default

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 12:05:49AM +0300, Oskari Saarenmaa wrote: Interface names do not have to be numerical (or veth + number) and trying to assign them to that format is susceptible to race conditions. Instead, assign the parent interface name according to the mac address (the last three

Re: [libvirt] Question about how to contribute patches

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 05:08:04PM +0800, hzguanqi...@corp.netease.com wrote: Hi exports, I tried to contribute a patch to fix a bug, following the contributor guidelines on http://libvirt.org/hacking.html. After I do the 'git send-email' operation and edit the email content, It

Re: [libvirt] Question about how to contribute patches

2013-08-29 Thread Gao feng
On 08/29/2013 05:08 PM, hzguanqi...@corp.netease.com wrote: Hi exports, I tried to contribute a patch to fix a bug, following the contributor guidelines on http://libvirt.org/hacking.html. Do you have below context in you libvirt/.git/config? [sendemail] from= Guan

[libvirt] [PATCHv2] virNetDevVethCreate: assign container if name based on parent if name

2013-08-29 Thread Oskari Saarenmaa
Replace the loop trying to find a free veth interface name for the container by assigning the container if name to parent name + 'p' by default. Interface name selection logic is susceptible to race conditions, so try to select just one name by default and use that as a template for the second

Re: [libvirt] [PATCHv3 4/4] VMX: Some serial ports are not actually connected

2013-08-29 Thread Michal Privoznik
On 28.08.2013 23:53, Doug Goldstein wrote: Sometimes a serial port might not be actually wired to a device when the user does not have the VM powered on and we should not consider this a fatal error. --- src/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCHv3 0/4] VMX: CD-ROM handling improvements

2013-08-29 Thread Michal Privoznik
On 28.08.2013 23:53, Doug Goldstein wrote: A user came into #virt the other day and was trying to get libvirtd to work with VMWare Fusion 5, which is basically the Mac OS X version of VMWare Workstation. In helping him out I noticed a few limitations of our VMX parser so I've added support

Re: [libvirt] [PATCHv3 3/4] VMX: Add a VMWare Fusion 5 configuration for tests

2013-08-29 Thread Michal Privoznik
On 28.08.2013 23:53, Doug Goldstein wrote: A user was having an issue with this specific VMWare Fusion config and he gave me permission to add it as part of our test suite to further expand our VMX test coverage. Unfortunately our VMX parser and generator does not support many features

Re: [libvirt] [PATCHv3 2/4] VMX: Add cdrom-raw dev type from VMWare Fusion

2013-08-29 Thread Michal Privoznik
On 28.08.2013 23:53, Doug Goldstein wrote: According to VMWare's documentation 'cdrom-raw' is an acceptable value for deviceType for a CD-ROM drive. The documentation states that the VMX configuration for a CD-ROM deviceType is as follows: ide|scsi(n):(n).deviceType =

Re: [libvirt] [PATCHv3 1/4] VMX: Create virVMXFormatDisk() from HD and CD-ROM

2013-08-29 Thread Michal Privoznik
On 28.08.2013 23:53, Doug Goldstein wrote: virVMXFormatHardDisk() and virVMXFormatCDROM() duplicated a lot of code from each other and made a lot of nested if checks to build each part of the VMX file. This hopefully simplifies the code path while combining the two functions with no net

Re: [libvirt] [PATCHv2] virNetDevVethCreate: assign container if name based on parent if name

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 01:00:15PM +0300, Oskari Saarenmaa wrote: Replace the loop trying to find a free veth interface name for the container by assigning the container if name to parent name + 'p' by default. Interface name selection logic is susceptible to race conditions, so try to select

[libvirt] [PATCH 02/12] Add bounds checking on virDomainGetJobStats RPC call

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The return values for the virDomainGetJobStats call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 09/12] Add bounds checking on virConnectListAllNodeDevices RPC call

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The return values for the virConnectListAllNodeDevices call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 00/12] Ensure array bounds checking is present on all RPC calls

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Missing bounds checking on array parameters is a security issue for libvirtd, since it allows a client to make libvirtd allocate unbounded memory. Missing bounds checking on array return values is not a security issue, but it is a robustness issue. If

[libvirt] [PATCH 01/12] Add bounds checking on virDomainMigrate*Params RPC calls (CVE-2013-4292)

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The parameters for the virDomainMigrate*Params RPC calls were not bounds checks, meaning a malicious client can cause libvirtd to consume arbitrary memory This issue was introduced in the 1.1.0 release of libvirt Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH 10/12] Add bounds checking on virConnectListAllNWFilters RPC call

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The return values for the virConnectListAllNWFilters call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 08/12] Add bounds checking on virConnectListAllInterfaces RPC call

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The return values for the virConnectListAllInterfaces call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 03/12] Add bounds checking on virDomain{SnapshotListAllChildren, ListAllSnapshots} RPC calls

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The return values for the virDomain{SnapshotListAllChildren,ListAllSnapshots} calls were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH 07/12] Add bounds checking on virConnectListAllNetworks RPC call

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The return values for the virConnectListAllNetworks call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 04/12] Add bounds checking on virConnectListAllDomains RPC call

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The return values for the virConnectListAllDomains call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 11/12] Add bounds checking on virConnectListAllSecrets RPC call

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The return values for the virConnectListAllSecrets call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 12/12] Prohibit unbounded arrays in XDR protocols

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The use of is a security issue for RPC parameters, since a malicious client can set a huge array length causing arbitrary memory allocation in the daemon. It is also a robustness issue for RPC return values, because if the stream is corrupted, it can

[libvirt] [PATCH 06/12] Add bounds checking on virStoragePoolListAllVolumes RPC call

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The return values for the virStoragePoolListAllVolumes call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 05/12] Add bounds checking on virConnectListAllStoragePools RPC call

2013-08-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The return values for the virConnectListAllStoragePools call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

Re: [libvirt] Question about how to contribute patches

2013-08-29 Thread hzguanqi...@corp.netease.com
Thanks for everyone. It succeed this time. Daniel's script is very convenient. On 2013-08-29 17:54 , Gao feng wrote: On 08/29/2013 05:08 PM, hzguanqi...@corp.netease.com wrote: Hi exports, I tried to contribute a patch to fix a bug, following the contributor guidelines on

[libvirt] [PATCH] autogen.sh: Correctly detect .git as a file

2013-08-29 Thread Michal Privoznik
One of my previous patches 5cfe0d37cd0be tried to handle the case when libvirt is a submodule of another project. In that case, the .git is just a link to the parent .git directory (which the autogen.sh script didn't count on). The fix was missing 'test' though. Signed-off-by: Michal Privoznik

[libvirt] RFC: Splitting python binding out into a separate repo ading to PyPi

2013-08-29 Thread Daniel P. Berrange
As everyone knows, we have historically always shipped the python binding as part of the libvirt primary tar.gz distribution. In some ways that has simplified life for people, since we know they'll always have a libvirt python that matches their libvirt C library. At the same time though, this

[libvirt] [PATCH] Fix a PyList usage mistake

2013-08-29 Thread Guan Qiang
From: Guan Qiang hzguanqi...@corp.netease.com Fix PyList usage mistake in Function libvirt_lxc_virDomainLxcOpenNamespace. https://bugzilla.redhat.com/show_bug.cgi?id=1002383 --- python/libvirt-lxc-override.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH] autogen.sh: Correctly detect .git as a file

2013-08-29 Thread Eric Blake
On 08/29/2013 05:22 AM, Michal Privoznik wrote: One of my previous patches 5cfe0d37cd0be tried to handle the case when libvirt is a submodule of another project. In that case, the .git is just a link to the parent .git directory (which the autogen.sh script didn't count on). The fix was

Re: [libvirt] Question about how to contribute patches

2013-08-29 Thread Eric Blake
On 08/29/2013 03:08 AM, hzguanqi...@corp.netease.com wrote: Hi exports, I tried to contribute a patch to fix a bug, following the contributor guidelines on http://libvirt.org/hacking.html. After I do the 'git send-email' operation and edit the email content, It returns: Does

Re: [libvirt] [PATCHv2] virNetDevVethCreate: assign container if name based on parent if name

2013-08-29 Thread Oskari Saarenmaa
On Thu, Aug 29, 2013 at 11:28:43AM +0100, Daniel P. Berrange wrote: On Thu, Aug 29, 2013 at 01:00:15PM +0300, Oskari Saarenmaa wrote: Replace the loop trying to find a free veth interface name for the container by assigning the container if name to parent name + 'p' by default. Interface

Re: [libvirt] [PATCHv2] virNetDevVethCreate: assign container if name based on parent if name

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 02:46:43PM +0300, Oskari Saarenmaa wrote: On Thu, Aug 29, 2013 at 11:28:43AM +0100, Daniel P. Berrange wrote: On Thu, Aug 29, 2013 at 01:00:15PM +0300, Oskari Saarenmaa wrote: Replace the loop trying to find a free veth interface name for the container by

Re: [libvirt] [RFC]Libvirt Wireshark Dissector

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 01:22:56AM +0900, Yuto KAWAMURA wrote: Hi libvirt developers, I would like to ask you to review the dissector of libvirt RPC protocol which I've been developing on project of Google Summer of Code 2013[1][2][3]. It can add support for dissecting libvirt RPC

Re: [libvirt] [PATCH 01/12] Add bounds checking on virDomainMigrate*Params RPC calls (CVE-2013-4292)

2013-08-29 Thread Michal Privoznik
On 29.08.2013 12:49, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The parameters for the virDomainMigrate*Params RPC calls were not bounds checks, meaning a malicious client can cause libvirtd to consume arbitrary memory This issue was introduced in the 1.1.0

Re: [libvirt] RFC: Splitting python binding out into a separate repo ading to PyPi

2013-08-29 Thread Jiri Denemark
On Thu, Aug 29, 2013 at 12:24:41 +0100, Daniel Berrange wrote: ... IMHO we should / must listen to our users here before it is too late. We can still release libvirt python at the same time as normal libvirt releases, and require that people update the bindings whenever adding new APIs (if

Re: [libvirt] [PATCH] Fix a PyList usage mistake

2013-08-29 Thread Eric Blake
On 08/29/2013 05:02 AM, Guan Qiang wrote: From: Guan Qiang hzguanqi...@corp.netease.com Fix PyList usage mistake in Function libvirt_lxc_virDomainLxcOpenNamespace. https://bugzilla.redhat.com/show_bug.cgi?id=1002383 --- python/libvirt-lxc-override.c |2 +- 1 file changed, 1

Re: [libvirt] [PATCH 01/12] Add bounds checking on virDomainMigrate*Params RPC calls (CVE-2013-4292)

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 02:34:15PM +0200, Michal Privoznik wrote: On 29.08.2013 12:49, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The parameters for the virDomainMigrate*Params RPC calls were not bounds checks, meaning a malicious client can cause libvirtd

Re: [libvirt] [PATCH 01/12] Add bounds checking on virDomainMigrate*Params RPC calls (CVE-2013-4292)

2013-08-29 Thread Michal Privoznik
On 29.08.2013 14:55, Daniel P. Berrange wrote: On Thu, Aug 29, 2013 at 02:34:15PM +0200, Michal Privoznik wrote: On 29.08.2013 12:49, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The parameters for the virDomainMigrate*Params RPC calls were not bounds checks,

Re: [libvirt] RFC: Splitting python binding out into a separate repo ading to PyPi

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 02:50:22PM +0200, Jiri Denemark wrote: On Thu, Aug 29, 2013 at 12:24:41 +0100, Daniel Berrange wrote: ... IMHO we should / must listen to our users here before it is too late. We can still release libvirt python at the same time as normal libvirt releases, and

Re: [libvirt] RFC: Splitting python binding out into a separate repo ading to PyPi

2013-08-29 Thread Doug Goldstein
On Thu, Aug 29, 2013 at 6:24 AM, Daniel P. Berrange berra...@redhat.comwrote: snip In RHEL world too, bundling of libvirt + its python binding is causing pain with the fairly recent concept of software collections[2]. This allows users to install multiple versions of languages like Python,

Re: [libvirt] [PATCHv3 3/4] VMX: Add a VMWare Fusion 5 configuration for tests

2013-08-29 Thread Doug Goldstein
On Thu, Aug 29, 2013 at 5:19 AM, Michal Privoznik mpriv...@redhat.comwrote: On 28.08.2013 23:53, Doug Goldstein wrote: A user was having an issue with this specific VMWare Fusion config and he gave me permission to add it as part of our test suite to further expand our VMX test coverage.

Re: [libvirt] Entering freeze for libvirt-1.1.2

2013-08-29 Thread Christophe Fergeau
On Thu, Aug 29, 2013 at 12:25:57AM +0800, Daniel Veillard wrote: I am a day late but I finally tagged the release candidate 1 of 1.1.2 in git and push the tarball and rpms to the usual place: ftp://libvirt.org/libvirt/ so the plan is to have an rc2 candidate on friday and if

[libvirt] [PATCH] security: provide supplemental groups even when parsing label (CVE-2013-4291)

2013-08-29 Thread Eric Blake
Commit 29fe5d7 (released in 1.1.1) introduced a latent problem for any caller of virSecurityManagerSetProcessLabel and where the domain already had a uid:gid label to be parsed. Such a setup would collect the list of supplementary groups during virSecurityManagerPreFork, but then ignores that

Re: [libvirt] [PATCH] security: provide supplemental groups even when parsing label (CVE-2013-4291)

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 08:47:11AM -0600, Eric Blake wrote: Commit 29fe5d7 (released in 1.1.1) introduced a latent problem for any caller of virSecurityManagerSetProcessLabel and where the domain already had a uid:gid label to be parsed. Such a setup would collect the list of supplementary

Re: [libvirt] [PATCH 01/12] Add bounds checking on virDomainMigrate*Params RPC calls (CVE-2013-4292)

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 02:58:44PM +0200, Michal Privoznik wrote: On 29.08.2013 14:55, Daniel P. Berrange wrote: On Thu, Aug 29, 2013 at 02:34:15PM +0200, Michal Privoznik wrote: On 29.08.2013 12:49, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The parameters

[libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Jason Helfman
Hello, There is an initiative at FreeBSD in removing gcc from base system and using CLANG. That being said, we are trying to resolve issues of ports that can't build without gcc. Libvirt fell into this group, and are curious if anyone has any ideas on why this breakage would occur. Here is a

Re: [libvirt] [PATCH] security: provide supplemental groups even when parsing label (CVE-2013-4291)

2013-08-29 Thread Eric Blake
On 08/29/2013 08:53 AM, Daniel P. Berrange wrote: On Thu, Aug 29, 2013 at 08:47:11AM -0600, Eric Blake wrote: Commit 29fe5d7 (released in 1.1.1) introduced a latent problem for any caller of virSecurityManagerSetProcessLabel and where the domain already had a uid:gid label to be parsed. Such

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 08:58 AM, Jason Helfman wrote: Hello, There is an initiative at FreeBSD in removing gcc from base system and using CLANG. That being said, we are trying to resolve issues of ports that can't build without gcc. Libvirt fell into this group, and are curious if anyone has any

Re: [libvirt] [PATCH 05/12] Add bounds checking on virConnectListAllStoragePools RPC call

2013-08-29 Thread Eric Blake
On 08/29/2013 04:49 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The return values for the virConnectListAllStoragePools call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Just

Re: [libvirt] RFC: Splitting python binding out into a separate repo ading to PyPi

2013-08-29 Thread Eric Blake
On 08/29/2013 05:24 AM, Daniel P. Berrange wrote: I don't think these issues are going to go away, in fact I think they will likely become more pressing, until the point where some 3rd party takes the step of providing libvirt python bindings themselves. I don't think we want to let

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Jason Helfman
On Thu, Aug 29, 2013 at 8:08 AM, Eric Blake ebl...@redhat.com wrote: On 08/29/2013 08:58 AM, Jason Helfman wrote: Hello, There is an initiative at FreeBSD in removing gcc from base system and using CLANG. That being said, we are trying to resolve issues of ports that can't build

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Jason Helfman
On Thu, Aug 29, 2013 at 8:33 AM, Jason Helfman j...@freebsd.org wrote: On Thu, Aug 29, 2013 at 8:08 AM, Eric Blake ebl...@redhat.com wrote: On 08/29/2013 08:58 AM, Jason Helfman wrote: Hello, There is an initiative at FreeBSD in removing gcc from base system and using CLANG. That being

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 09:35 AM, Jason Helfman wrote: stdlib.h:#defineRAND_MAX0x7fff Good. -jgh And on our current head release (10) it is this: #define RAND_MAX0x7ffd Huh? Why is this not 2**n-1? That violates assumptions we have made, and is WHY your

[libvirt] [PATCH 0/3] virsh: Handle interrupting of jobs manually

2013-08-29 Thread Peter Krempa
Using Ctrl+C to abort migration has a side effect of killing ssh transports used to execute the migration. Add manual handling to avoid this issue. Peter Krempa (3): virsh-domain: rename print_job_progress to vshPrintJobProgress virsh: Remember terminal state when starting and add helpers

[libvirt] [PATCH 1/3] virsh-domain: rename print_job_progress to vshPrintJobProgress

2013-08-29 Thread Peter Krempa
--- tools/virsh-domain.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 83b9c3f..3fd57fd 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -1452,8 +1452,8 @@ cleanup: } static void

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 09:43 AM, Eric Blake wrote: On 08/29/2013 09:35 AM, Jason Helfman wrote: stdlib.h:#defineRAND_MAX0x7fff Good. -jgh And on our current head release (10) it is this: #define RAND_MAX0x7ffd Huh? Why is this not 2**n-1? That violates

[libvirt] [PATCH 2/3] virsh: Remember terminal state when starting and add helpers

2013-08-29 Thread Peter Krempa
This patch adds instrumentation to allow modification of config of the terminal in virsh and successful reset of the state afterwards. The added helpers allow to disable receiving of SIGINT when pressing the key sequence (Ctrl+C usualy). This normally sends SIGINT to the foreground process group

[libvirt] [PATCH 3/3] virsh-domain: Avoid killing ssh transport tunnels when cancelling job

2013-08-29 Thread Peter Krempa
The vshWatchJob function registers a SIGINT handler that is used to abort the active job and does not terminate virsh. Unfortunately, this breaks when using the ssh transport as SIGINT is sent to the foreground process group including the ssh transport processes which terminate. This breaks the

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 09:52:52AM -0600, Eric Blake wrote: On 08/29/2013 09:43 AM, Eric Blake wrote: On 08/29/2013 09:35 AM, Jason Helfman wrote: stdlib.h:#defineRAND_MAX0x7fff Good. -jgh And on our current head release (10) it is this: #define

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 09:52 AM, Eric Blake wrote: #define RAND_MAX0x7ffd Huh? Why is this not 2**n-1? That violates assumptions we have made, and is WHY your compile failed. It has nothing to do with clang vs. gcc (both compilers would fail), it has to do with your changed system

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 10:03 AM, Daniel P. Berrange wrote: I think I can fix libvirt to work around the boneheaded decision; basically, since we cannot trust the full range of random_r to be evenly distributed, I will have to tweak libvirt's call to truncate every call to random_r to a subset of bits

[libvirt] [PATCH 1/3] tools: rename console.[ch] to virsh-console.[ch] and fix coding style

2013-08-29 Thread Peter Krempa
--- cfg.mk | 2 +- po/POTFILES.in | 2 +- tools/Makefile.am| 2 +- tools/{console.c = virsh-console.c} | 73 ++-- tools/{console.h = virsh-console.h} | 4 +- tools/virsh-domain.c

[libvirt] [PATCH 3/3] virsh-console: Avoid using signal() in multithreaded application

2013-08-29 Thread Peter Krempa
Man page for signal states: The effects of signal() in a multithreaded process are unspecified. Switch signal() to sigaction in virsh console code. --- tools/virsh-console.c | 52 ++- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git

[libvirt] [PATCH 2/3] virsh: Rename vshMakeStdinRaw to vshTTYMakeRaw and move it to virsh.c

2013-08-29 Thread Peter Krempa
Move the function to virsh.c to the rest of the TTY managing functions and change the code so that it mirrors the rest. --- tools/virsh-console.c | 50 +- tools/virsh-console.h | 7 +++ tools/virsh-domain.c | 2 +- tools/virsh.c | 48

[libvirt] [PATCH 0/3] Fix and clean up multiple issues in virsh console handling

2013-08-29 Thread Peter Krempa
This series has to be applied on top of virsh: Handle interrupting of jobs manually. Peter Krempa (3): tools: rename console.[ch] to virsh-console.[ch] and fix coding style virsh: Rename vshMakeStdinRaw to vshTTYMakeRaw and move it to virsh.c virsh-console: Avoid using signal() in

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 10:33 AM, Eric Blake wrote: Since gnulib has a working random_r() function can we just make gnulib replace the boneheaded freebsd impl ? Huh - the glibc man pages state that random_r returns RAND_MAX bits. random_r is a glibc extension: POSIX only requires rand(), rand_r(), and

Re: [libvirt] Entering freeze for libvirt-1.1.2

2013-08-29 Thread Viktor Mihajlovski
On 08/28/2013 06:25 PM, Daniel Veillard wrote: I am a day late but I finally tagged the release candidate 1 of 1.1.2 in git and push the tarball and rpms to the usual place: ftp://libvirt.org/libvirt/ so the plan is to have an rc2 candidate on friday and if everything looks good push

Re: [libvirt] Entering freeze for libvirt-1.1.2

2013-08-29 Thread Eric Blake
On 08/29/2013 11:01 AM, Viktor Mihajlovski wrote: I see make check fail on a machine not running systemd (Ubuntu 12.04), not overly concerned about that, but maybe this test should be skipped in non-systemd environments? The point of this test is to mock out the system calls, so that it

Re: [libvirt] Entering freeze for libvirt-1.1.2

2013-08-29 Thread Eric Blake
[dropping libvirt-announce - aren't we setting reply-to on our announcements, so that replies are directed only to side lists?] On 08/28/2013 11:31 AM, Doug Goldstein wrote: master presently fails on Mac OS X with the following: Making all in src GEN

Re: [libvirt] Entering freeze for libvirt-1.1.2

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 07:01:07PM +0200, Viktor Mihajlovski wrote: On 08/28/2013 06:25 PM, Daniel Veillard wrote: I am a day late but I finally tagged the release candidate 1 of 1.1.2 in git and push the tarball and rpms to the usual place: ftp://libvirt.org/libvirt/ so the plan

Re: [libvirt] Entering freeze for libvirt-1.1.2

2013-08-29 Thread Justin Clift
On 29/08/2013, at 6:13 PM, Eric Blake wrote: [dropping libvirt-announce - aren't we setting reply-to on our announcements, so that replies are directed only to side lists?] Not so far. I'm neither for-nor-against doing so, so feel to change if it needed. :) On 08/28/2013 11:31 AM, Doug

Re: [libvirt] [PATCH 1/3] virsh-domain: rename print_job_progress to vshPrintJobProgress

2013-08-29 Thread Eric Blake
On 08/29/2013 09:52 AM, Peter Krempa wrote: --- tools/virsh-domain.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) ACK, mechanical and safe for freeze. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org

Re: [libvirt] Entering freeze for libvirt-1.1.2

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 12:38:11PM -0500, Doug Goldstein wrote: On Thu, Aug 29, 2013 at 12:18 PM, Justin Clift jcl...@redhat.com wrote: On 29/08/2013, at 6:13 PM, Eric Blake wrote: [dropping libvirt-announce - aren't we setting reply-to on our announcements, so that replies are directed

Re: [libvirt] [PATCH] Let test_virtlockd.aug find the libvird augeas lense

2013-08-29 Thread Eric Blake
On 08/29/2013 11:53 AM, Guido Günther wrote: Otherwise we fail make check like: GEN check-augeas-virtlockd Syntax error in lens definition test_virtlockd.aug:8.8-.20:Could not load module Libvirtd for Libvirtd.lns test_virtlockd.aug:8.8-.20:Undefined variable

Re: [libvirt] [PATCHv3 2/4] VMX: Add cdrom-raw dev type from VMWare Fusion

2013-08-29 Thread Doug Goldstein
On Thu, Aug 29, 2013 at 5:19 AM, Michal Privoznik mpriv...@redhat.comwrote: On 28.08.2013 23:53, Doug Goldstein wrote: According to VMWare's documentation 'cdrom-raw' is an acceptable value for deviceType for a CD-ROM drive. The documentation states that the VMX configuration for a CD-ROM

Re: [libvirt] Mass rebuild report for August 29 2013

2013-08-29 Thread Eric Blake
-libvirt-1.1.1-1 Package owner: berrange Time to build: 6 minutes, 39 seconds Build logs: http://build1.vanpienbroek.nl/fedora-mingw-rebuild/20130829/mingw-libvirt-1.1.1-1 Also caused by winpthreads: CCLD libvirt.la ./.libs/libvirt_driver_remote.a

Re: [libvirt] [PATCHv3 2/4] VMX: Add cdrom-raw dev type from VMWare Fusion

2013-08-29 Thread Eric Blake
On 08/29/2013 01:58 PM, Doug Goldstein wrote: On Thu, Aug 29, 2013 at 5:19 AM, Michal Privoznik mpriv...@redhat.comwrote: On 28.08.2013 23:53, Doug Goldstein wrote: According to VMWare's documentation 'cdrom-raw' is an acceptable value for deviceType for a CD-ROM drive. The documentation

Re: [libvirt] Mass rebuild report for August 29 2013

2013-08-29 Thread Erik van Pienbroek
(thus support for C++11 std::thread is not enabled yet) mingw-libvirt-1.1.1-1 Package owner: berrange Time to build: 6 minutes, 39 seconds Build logs: http://build1.vanpienbroek.nl/fedora-mingw-rebuild/20130829/mingw-libvirt-1.1.1-1 Also caused by winpthreads

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Jason Helfman
On Thu, Aug 29, 2013 at 9:42 AM, Eric Blake ebl...@redhat.com wrote: On 08/29/2013 10:33 AM, Eric Blake wrote: Since gnulib has a working random_r() function can we just make gnulib replace the boneheaded freebsd impl ? Huh - the glibc man pages state that random_r returns RAND_MAX bits.

[libvirt] RFC: btrfs storage pool using subvolumes snapshots

2013-08-29 Thread Oskari Saarenmaa
I wrote an experimental btrfs storage pool which uses subvolumes (and optionally snapshots) as storage volumes in LXC domains. The code is available at https://github.com/saaros/libvirt/compare/btrfs-storage but it's still missing some features like quotas for the subvolumes (currently the

[libvirt] [PATCH] random: don't mix RAND_MAX with random_r

2013-08-29 Thread Eric Blake
FreeBSD 10 recently changed their definition of RAND_MAX, to try and cover the fact that their evenly distributed results really are a smaller range than a full power of 2. As a result, I did some investigation, and learned: 1. POSIX requires random() to be evenly distributed across exactly 31

[libvirt] [PATCH] random: don't mix RAND_MAX with random_r

2013-08-29 Thread Eric Blake
FreeBSD 10 recently changed their definition of RAND_MAX, to try and cover the fact that their evenly distributed results really are a smaller range than a full power of 2. As a result, I did some investigation, and learned: 1. POSIX requires random() to be evenly distributed across exactly 31

Re: [libvirt] [PATCH] random: don't mix RAND_MAX with random_r

2013-08-29 Thread Eric Blake
On 08/29/2013 05:17 PM, Eric Blake wrote: FreeBSD 10 recently changed their definition of RAND_MAX, to try and cover the fact that their evenly distributed results really are a smaller range than a full power of 2. As a result, I did some investigation, and learned: Disregard this one; looks