[libvirt] Memory leak in virInitialize - vboxRegister - VBoxCGlueInit

2012-08-11 Thread Richard W.M. Jones
https://bugzilla.redhat.com/show_bug.cgi?id=847429 Spotted by valgrind: ==2390== 45 bytes in 1 blocks are definitely lost in loss record 68 of 123 ==2390==at 0x4A086DC: malloc (vg_replace_malloc.c:270) ==2390==by 0x30D060EBA0: _dl_signal_error (in /usr/lib64/ld-2.16.so) ==2390==by

Re: [libvirt] [PATCH] virterror: Add error message for unsupported operations.

2012-08-11 Thread Peter Krempa
On 08/10/12 17:28, Eric Blake wrote: ... Sounds like we've got enough arguments in favor of the new code; go ahead and push the new error type. Pushed. Thanks. Peter -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v9 5/7] block: Convert close calls to qemu_close

2012-08-11 Thread Corey Bryant
This patch converts all block layer close calls, that correspond to qemu_open calls, to qemu_close. Signed-off-by: Corey Bryant cor...@linux.vnet.ibm.com --- v5: -This patch is new in v5. (kw...@redhat.com, ebl...@redhat.com) v6-v9: -No changes block/raw-posix.c | 24

[libvirt] [PATCH v9 6/7] block: Enable qemu_open/close to work with fd sets

2012-08-11 Thread Corey Bryant
When qemu_open is passed a filename of the /dev/fdset/nnn format (where nnn is the fdset ID), an fd with matching access mode flags will be searched for within the specified monitor fd set. If the fd is found, a dup of the fd will be returned from qemu_open. Signed-off-by: Corey Bryant

[libvirt] [PATCH v9 1/7] qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg

2012-08-11 Thread Corey Bryant
Set the close-on-exec flag for the file descriptor received via SCM_RIGHTS. Signed-off-by: Corey Bryant cor...@linux.vnet.ibm.com --- v4 -This patch is new in v4 (ebl...@redhat.com) v5 -Fallback to FD_CLOEXEC if MSG_CMSG_CLOEXEC is not available (ebl...@redhat.com,

[libvirt] [PATCH v9 4/7] block: Convert open calls to qemu_open

2012-08-11 Thread Corey Bryant
This patch converts all block layer open calls to qemu_open. Note that this adds the O_CLOEXEC flag to the changed open paths when the O_CLOEXEC macro is defined. Signed-off-by: Corey Bryant cor...@linux.vnet.ibm.com --- v2: -Convert calls to qemu_open instead of file_open (kw...@redhat.com)

[libvirt] [PATCH v9 3/7] block: Prevent detection of /dev/fdset/ as floppy

2012-08-11 Thread Corey Bryant
Signed-off-by: Corey Bryant cor...@linux.vnet.ibm.com --- v8 -This patch is new in v8. It was reported on a prior fd passing approach and I realized it's needed in this series. (kw...@redhat.com) v9 -No changes block/raw-posix.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[libvirt] [PATCH v9 0/7] file descriptor passing using fd sets

2012-08-11 Thread Corey Bryant
libvirt's sVirt security driver provides SELinux MAC isolation for Qemu guest processes and their corresponding image files. In other words, sVirt uses SELinux to prevent a QEMU process from opening files that do not belong to it. sVirt provides this support by labeling guests and resources with

[libvirt] [PATCH v9 2/7] qapi: Introduce add-fd, remove-fd, query-fdsets

2012-08-11 Thread Corey Bryant
This patch adds support that enables passing of file descriptors to the QEMU monitor where they will be stored in specified file descriptor sets. A file descriptor set can be used by a client like libvirt to store file descriptors for the same file. This allows the client to open a file with

[libvirt] [PATCH v9 7/7] monitor: Clean up fd sets on monitor disconnect

2012-08-11 Thread Corey Bryant
Fd sets are shared by all monitor connections. Fd sets are considered to be in use while at least one monitor is connected. When the last monitor disconnects, all fds that are members of an fd set with no outstanding dup references are closed. This prevents any fd leakage associated with a

Re: [libvirt] [Qemu-devel] [PATCH v9 5/7] block: Convert close calls to qemu_close

2012-08-11 Thread Blue Swirl
On Sat, Aug 11, 2012 at 1:14 PM, Corey Bryant cor...@linux.vnet.ibm.com wrote: This patch converts all block layer close calls, that correspond to qemu_open calls, to qemu_close. Signed-off-by: Corey Bryant cor...@linux.vnet.ibm.com --- v5: -This patch is new in v5. (kw...@redhat.com,

Re: [libvirt] [PATCH v9 2/7] qapi: Introduce add-fd, remove-fd, query-fdsets

2012-08-11 Thread Eric Blake
On 08/11/2012 07:14 AM, Corey Bryant wrote: This patch adds support that enables passing of file descriptors to the QEMU monitor where they will be stored in specified file descriptor sets. v9: -Use fdset-id rather than fdset_id. (ebl...@redhat.com) -Update example for query-fdsets.

Re: [libvirt] [PATCH v9 6/7] block: Enable qemu_open/close to work with fd sets

2012-08-11 Thread Eric Blake
On 08/11/2012 07:14 AM, Corey Bryant wrote: When qemu_open is passed a filename of the /dev/fdset/nnn format (where nnn is the fdset ID), an fd with matching access mode flags will be searched for within the specified monitor fd set. If the fd is found, a dup of the fd will be returned from

Re: [libvirt] [PATCH v2] json: fix interface locale dependency

2012-08-11 Thread Martin Kletzander
On 08/10/2012 05:39 PM, Eric Blake wrote: On 08/10/2012 03:43 AM, Martin Kletzander wrote: I'm still worried about whether 'struct lconv' will compile on mingw. Then again, any system that lacks localeconf() probably also lacks any locale that would use ',' for the decimal separator, so maybe

[libvirt] [PATCHv2 0/4] Add LibSSH2 transport

2012-08-11 Thread Peter Krempa
This is a second respin of the LibSSH2 transport patch series. The most notable changes: - - Rebased on top of current upstream (virObject, new error codes) - ported to use virObject stuff - re-named all functions and other literals to contain the 2 - implemented

[libvirt] [PATCHv2 4/4] libssh2_transport: Use libssh2 driver code in remote driver

2012-08-11 Thread Peter Krempa
This patch adds URI options to support libssh2 transport in the remote driver. A new transport sceme is introduced eg. qemu+libssh://... that utilizes the libssh2 code added in previous patches. The libssh2 code requires the authentication callback to be able to perform keyboard-interactive

[libvirt] [PATCHv2 2/4] libssh2_transport: add ssh context support to virNetSocket

2012-08-11 Thread Peter Krempa
This patch enables virNetSocket to be used as an ssh client when properly configured. Fucntion virNetSocketNewConnectLibSSH() is added, that takes all needed parameters and creates a libssh2 session context and performs steps needed to open the connection. --- src/libvirt_private.syms |1 +

[libvirt] [PATCHv2 3/4] libssh2_transport: Add libssh2 session support to net client code

2012-08-11 Thread Peter Krempa
This patch adds a glue layer to enable using libssh2 code with the network client code. As in the original client implementation, shell code is sent to the server to detect correct options for netcat. --- src/libvirt_private.syms |1 + src/rpc/virnetclient.c | 117

Re: [libvirt] [PATCH] block: Set cdrom device read only flag

2012-08-11 Thread Kevin Shanahan
On Thu, Aug 09, 2012 at 10:42:51AM +0200, Kevin Wolf wrote: Am 07.08.2012 10:47, schrieb Markus Armbruster: Kevin Wolf kw...@redhat.com writes: Am 02.08.2012 09:20, schrieb Kevin Shanahan: On Thu, Aug 02, 2012 at 02:49:52PM +0930, Kevin Shanahan wrote: On Thu, Aug 02, 2012 at