Re: [libvirt] [PATCH v2]daemon: Fix a crash during virNetlinkEventServiceStopAll

2019-06-20 Thread Haitaoliu
Hi guys, Could you help me to review it ? thanks, haitao On 2019/6/12 15:18, Liu Haitao wrote: When reboot the host, a core dump file would be generated. The call traces are: Note.In this case, the main thread is thread 5. (gdb) thread 5 [Switching to thread 5 (LWP

[libvirt] [PATCH] Don't parse/format vram attribute for cirrus video

2019-06-20 Thread Jonathon Jongsma
Since the cirrus vga memory size isn't configurable, we can ignore any 'vram' attribute when parsing a domain definition. However, when no value is specified, it ends up getting set to a default value of 16MB. This 16MB value is not used anywhere (for example, it is not passed as an argument to

[libvirt] [PATCH] Fix 'validate' typo in comments

2019-06-20 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d06e094b11..8604ba63d4 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -21375,7 +21375,7 @@

Re: [libvirt] [PATCH v2] test_driver: properly handle DHCP ranges and IPv6 networks in testDomainInterfaceAddresses

2019-06-20 Thread Ilias Stamatis
On Thu, Jun 20, 2019 at 5:57 PM Michal Privoznik wrote: > > On 6/19/19 6:45 PM, Ilias Stamatis wrote: > > testDomainInterfaceAddresses always returns the same hard-coded > > addresses. Change the behavior such as if there is a DHCP range defined, > > addresses are returned from that pool. > > > >

Re: [libvirt] [PATCH v2] test_driver: properly handle DHCP ranges and IPv6 networks in testDomainInterfaceAddresses

2019-06-20 Thread Michal Privoznik
On 6/19/19 6:45 PM, Ilias Stamatis wrote: testDomainInterfaceAddresses always returns the same hard-coded addresses. Change the behavior such as if there is a DHCP range defined, addresses are returned from that pool. The specific address returned depends on both the domain id and the specific

Re: [libvirt] [PATCH 2/3] docs: schemas: Add 'seclabel' for external disk snapshot

2019-06-20 Thread Eric Blake
On 6/20/19 8:51 AM, Peter Krempa wrote: > Allow using seclabels the same way as disk images allow it. Currently > the snapshot code copies the seclabels from the original image if no > seclabel is provided. Also there's no code change required as the > snapshot XML parser actually uses parts of

Re: [libvirt] [PATCH 09/15] qemu: Add support for controling qemu capabilities via the qemu XML namespace

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:18PM +0200, Peter Krempa wrote: Similarly how we allow adding arbitrary command line arguments and environment variables this patch introduces the ability to control libvirt's perception of the qemu process by tweaking the capability bits for testing purposes. The

Re: [libvirt] [PATCH 12/15] tests: qemuxml2argv: Test qemu namespace capability tweaking

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:21PM +0200, Peter Krempa wrote: Show that the capability tweaking stuff works by enabling blockdev in the 'qemu-ns' test even in versions where it's not yet fully supported. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/qemu-ns.x86_64-4.0.0.args | 7

Re: [libvirt] [PATCH 10/15] qemu: domain: Add support for modifying qemu capability list via qemu namespace

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:19PM +0200, Peter Krempa wrote: For testing purposes it's sometimes desired to be able to control the presence of capabilities of qemu. This adds the possibility to do this via the qemu namespace. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 8

Re: [libvirt] [PATCH 04/15] qemu: Extract parsing of qemu namespace arguments into separate function

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:13PM +0200, Peter Krempa wrote: Simplify the main function by splitting out how we parse the extra passthrough commandline arguments. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 51 +++--- 1 file changed, 33

Re: [libvirt] [PATCH 14/15] qemu: conf: Add debug option to allow disabling qemu capabilities

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:23PM +0200, Peter Krempa wrote: In cases when e.g. a new feature breaks upstream behaviour it's useful to allow users to disable the new feature to verify the regression and possibly use it as a workaround until a fix is available. The new qemu.conf option named

Re: [libvirt] [PATCH 06/15] qemu: Refactor qemuDomainDefNamespaceParse

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:15PM +0200, Peter Krempa wrote: Rename 'cmd' to 'nsdef' and improve the control flow. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [libvirt] [PATCH 1/3] docs: snapshot: Encourage people ot use disk 'target' to refer to disks

2019-06-20 Thread Eric Blake
On 6/20/19 8:51 AM, Peter Krempa wrote: > Change the example and add a recommendation to use disk target rather > than path. > > Signed-off-by: Peter Krempa > --- > docs/formatsnapshot.html.in | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git

Re: [libvirt] [PATCH 01/15] qemu: Rename qemuDomainCmdlineDefPtr to qemuDomainXmlNsDefPtr

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:10PM +0200, Peter Krempa wrote: The data injected via the namespace may contain also other things than commandline passthrough definitions. Rename it to make it more universal. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 16

Re: [libvirt] [PATCH 08/15] conf: Add taint flag for custom hypervisor features

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:17PM +0200, Peter Krempa wrote: Upcomming patches will allow enabling/disabling custom hypervisor Upcoming features for debugging/testing purposes via the qemu namespace. Add a taint flag where we will flag such a domain so it's obvious what's happening.

Re: [libvirt] [PATCH 15/15] qemu: Implement support for 'capability_filters' config option

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:24PM +0200, Peter Krempa wrote: Filter out the given capabilities and set domain taint if we done so. we've Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 3 ++- src/qemu/qemu_process.c | 15 +++ 2 files changed, 17 insertions(+), 1

Re: [libvirt] [PATCH 13/15] qemu: Remove unused var 'corestr' from virQEMUDriverConfigLoadFile

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:22PM +0200, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_conf.c | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH] test_driver: fix some bugs on testDomainGetDiskErrors

2019-06-20 Thread Ilias Stamatis
The current implementation has the following bugs: - the vm variable is accessed after calling virDomainObjEndAPI on it - if VIR_STRDUP fails and we jump to the cleanup section, we're calling VIR_FREE on pointers for which we haven't allocated memory - the error type VIR_DOMAIN_DISK_ERROR_NONE

[libvirt] [PATCH] docs: Fix Blog Planet links

2019-06-20 Thread Martin Kletzander
They were pointing to the blogs instead, now they point the articles. Signed-off-by: Martin Kletzander --- Pushed as trivial-and-thoroughly-tested. docs/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/js/main.js b/docs/js/main.js index

Re: [libvirt] [PATCH 11/15] tests: qemuxml2argv: Modernize and fork 'qemu-ns' test

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:20PM +0200, Peter Krempa wrote: Use the DO_TEST_CAPS_LATEST/VER infrastructure to run a more modern version of this and also fork it to a pre-blockdev version so that we can check the qemu namespace capability tweaking. Signed-off-by: Peter Krempa ---

Re: [libvirt] [PATCH 07/15] qemu: domain: Split out commandline namespace data formatting

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:16PM +0200, Peter Krempa wrote: Separate it from qemuDomainDefNamespaceFormatXML. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc

Re: [libvirt] [PATCH 05/15] qemu: Extract parsing of qemu namespace env vars into separate function

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:14PM +0200, Peter Krempa wrote: Simplify the main function by splitting out how we parse the extra passthrough environment variables. Note that the validation function checks that the first letter must be a character or underscore which makes the check whether the

Re: [libvirt] [PATCH 02/15] qemu: Move qemuDomainXmlNsDef(Free) from qemu_conf.(ch)

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:11PM +0200, Peter Krempa wrote: qemu_conf.c deals with the configuration file. Better fit for the structure and freeing function will be qemu_domain.c where the rest of the namespace parsing/formatting stuff resides. Signed-off-by: Peter Krempa ---

Re: [libvirt] [PATCH 0/3] snapshots: Allow for snapshot disk source

2019-06-20 Thread Martin Kletzander
On Thu, Jun 20, 2019 at 03:51:02PM +0200, Peter Krempa wrote: This is just a schema improvement, the code actually already does everything. Peter Krempa (3): docs: snapshot: Encourage people ot use disk 'target' to refer to disks docs: schemas: Add 'seclabel' for external disk snapshot

Re: [libvirt] [PATCH 03/15] qemu: domain: Use virStringListFreeCount in qemuDomainXmlNsDefFree

2019-06-20 Thread Ján Tomko
On Tue, Jun 18, 2019 at 03:10:12PM +0200, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature -- libvir-list mailing list

Re: [libvirt] [PATCH] Revert "spec: Bump minimum supported Fedora version to 29"

2019-06-20 Thread Andrea Bolognani
On Wed, 2019-06-19 at 19:21 +0200, Ján Tomko wrote: > On Tue, May 28, 2019 at 01:51:06PM +0200, Andrea Bolognani wrote: > > On Tue, 2019-05-28 at 13:34 +0200, Daniel Veillard wrote: > > > On Tue, May 28, 2019 at 01:14:19PM +0200, Ján Tomko wrote: > > > > This reverts commit

Re: [libvirt] [PATCH] remote: refactor how unprivileged user session connection is identified

2019-06-20 Thread Michal Privoznik
On 6/19/19 3:09 PM, Daniel P. Berrangé wrote: Currently the VIR_DRV_OPEN_REMOTE_USER flag is only set when we identify that we're connecting to a local libvirtd daemon. We would like to be able to set that even if connecting to a remote libvirtd daemon. This entails refactoring the conditional

Re: [libvirt] [PATCH 0/2] error: Allow better reporting of errors in some nested cases

2019-06-20 Thread Michal Privoznik
On 6/11/19 2:01 PM, Peter Krempa wrote: Peter Krempa (2): util: error: Add API for prefixing last set error with a string qemu: process: Report better error when virtlogd connection fails cfg.mk | 1 + src/libvirt_private.syms | 1 + src/qemu/qemu_process.c | 4

Re: [libvirt] [PATCH] virNetworkGetDHCPLeases: fix docstring format

2019-06-20 Thread Michal Privoznik
On 6/18/19 4:21 PM, Ilias Stamatis wrote: The docstring of virNetworkGetDHCPLeases is not correctly formatted and as a result the example code snippet appears as normal text under the "Returns:" section. This patch fixes the problem. Signed-off-by: Ilias Stamatis --- src/libvirt-network.c |

Re: [libvirt] [PATCH 2/2] virsh: snapshot: Don't block --no-metadata with --print-xml

2019-06-20 Thread Ján Tomko
On Thu, Jun 20, 2019 at 03:47:57PM +0200, Peter Krempa wrote: When testing stuff you might want to print the XML. Interlocking it with no metadata adds exactly 0 value to the user. Signed-off-by: Peter Krempa --- tools/virsh-snapshot.c | 8 +--- tools/virsh.pod| 4 ++-- 2 files

Re: [libvirt] [PATCH 1/2] qemu: driver: Fix off-by-one in qemuDomainSnapshotDiskDataCollect

2019-06-20 Thread Ján Tomko
On Thu, Jun 20, 2019 at 03:47:56PM +0200, Peter Krempa wrote: Commit f34397e51c17 introduced a crash-inducing problem when collecting disk snapshot data, where the array would be filled starting from the second element. The code then dereferenced the first one. How did this get past review?

[libvirt] [PATCH 3/3] tests: domainsnapshotxml2xml: make 'disk-seclabel' test operational

2019-06-20 Thread Peter Krempa
Now that we added the seclabels to the schema we can test that they are parsed and formatted correctly. Signed-off-by: Peter Krempa --- tests/domainsnapshotxml2xmlout/disk-seclabel.xml | 15 +++ tests/domainsnapshotxml2xmltest.c| 1 + 2 files changed, 16

[libvirt] [PATCH 0/3] snapshots: Allow for snapshot disk source

2019-06-20 Thread Peter Krempa
This is just a schema improvement, the code actually already does everything. Peter Krempa (3): docs: snapshot: Encourage people ot use disk 'target' to refer to disks docs: schemas: Add 'seclabel' for external disk snapshot tests: domainsnapshotxml2xml: make 'disk-seclabel' test

[libvirt] [PATCH 1/3] docs: snapshot: Encourage people ot use disk 'target' to refer to disks

2019-06-20 Thread Peter Krempa
Change the example and add a recommendation to use disk target rather than path. Signed-off-by: Peter Krempa --- docs/formatsnapshot.html.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/formatsnapshot.html.in b/docs/formatsnapshot.html.in index

[libvirt] [PATCH 2/3] docs: schemas: Add 'seclabel' for external disk snapshot

2019-06-20 Thread Peter Krempa
Allow using seclabels the same way as disk images allow it. Currently the snapshot code copies the seclabels from the original image if no seclabel is provided. Also there's no code change required as the snapshot XML parser actually uses parts of the disk parser thus seclabels are already parsed

[libvirt] [PATCH 2/2] virsh: snapshot: Don't block --no-metadata with --print-xml

2019-06-20 Thread Peter Krempa
When testing stuff you might want to print the XML. Interlocking it with no metadata adds exactly 0 value to the user. Signed-off-by: Peter Krempa --- tools/virsh-snapshot.c | 8 +--- tools/virsh.pod| 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCH 1/2] qemu: driver: Fix off-by-one in qemuDomainSnapshotDiskDataCollect

2019-06-20 Thread Peter Krempa
Commit f34397e51c17 introduced a crash-inducing problem when collecting disk snapshot data, where the array would be filled starting from the second element. The code then dereferenced the first one. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+),

[libvirt] [PATCH 0/2] qemu: fix snapshot crasher bug and improve virsh (blockdev-add saga)

2019-06-20 Thread Peter Krempa
While reviewers liked my story plot, the CPU did not. Fix it to make everyone happy. Peter Krempa (2): qemu: driver: Fix off-by-one in qemuDomainSnapshotDiskDataCollect virsh: snapshot: Don't block --no-metadata with --print-xml src/qemu/qemu_driver.c | 2 +- tools/virsh-snapshot.c | 8

Re: [libvirt] [PATCH RFC] test_driver: check that the domain is running in testDomainGetTime

2019-06-20 Thread Michal Privoznik
On 6/20/19 1:41 PM, Ilias Stamatis wrote: Signed-off-by: Ilias Stamatis --- Currently in the test driver in APIs that would normally require guest agents and similar we are just checking if the domain is active (using virDomainObjCheckActive). But a domain will be active even if stopped, so I

Re: [libvirt] [Qemu-devel] [PATCH] deprecate -mem-path fallback to anonymous RAM

2019-06-20 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > Fallback might affect guest or worse whole host performance > or functionality if backing file were used to share guest RAM > with another process. > > Patch deprecates fallback so that we could remove it in future > and ensure that QEMU will provide

Re: [libvirt] [PATCH v3 1/2] docs: Use our own implementation for fetching the RSS data

2019-06-20 Thread Martin Kletzander
On Thu, Jun 20, 2019 at 03:24:10PM +0200, Andrea Bolognani wrote: On Thu, 2019-06-20 at 15:00 +0200, Martin Kletzander wrote: [...]

Re: [libvirt] [PATCH v3 2/2] docs: Remove unused JS libraries

2019-06-20 Thread Andrea Bolognani
On Thu, 2019-06-20 at 15:00 +0200, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > docs/Makefile.am| 5 + > docs/js/jquery-3.1.1.min.js | 4 > docs/js/jquery.rss.min.js | 11 --- > docs/js/moment.min.js | 7 --- > 4 files changed, 1

[libvirt] [PATCH python 4/5] sanitytest: add some special cases for virNetworkPort APIs

2019-06-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- sanitytest.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sanitytest.py b/sanitytest.py index 68dde6b..9743f6f 100644 --- a/sanitytest.py +++ b/sanitytest.py @@ -220,7 +220,7 @@ for name in sorted(basicklassmap): # The

[libvirt] [PATCH python 2/5] Define virNetworkPortPtr typedef on old libvirt

2019-06-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- typewrappers.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/typewrappers.h b/typewrappers.h index e4983b2..518ad00 100644 --- a/typewrappers.h +++ b/typewrappers.h @@ -30,6 +30,9 @@ typedef ssize_t Py_ssize_t; #if !LIBVIR_CHECK_VERSION(4, 5, 0)

Re: [libvirt] [PATCH v3 1/2] docs: Use our own implementation for fetching the RSS data

2019-06-20 Thread Andrea Bolognani
On Thu, 2019-06-20 at 15:00 +0200, Martin Kletzander wrote: [...] >

[libvirt] [PATCH python 3/5] generator: fix naming of getter APIs for virNetworkPort

2019-06-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- generator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/generator.py b/generator.py index ab5144d..9dedc18 100755 --- a/generator.py +++ b/generator.py @@ -1213,6 +1213,9 @@ def nameFixup(name, classe, type, file): elif name[0:9] ==

[libvirt] [PATCH python 1/5] Fix syntax error with missing ; and too many )

2019-06-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- libvirt-override.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-override.c b/libvirt-override.c index ea14e1e..c73305b 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -10032,7 +10032,7 @@

[libvirt] [PATCH python 5/5] Add missing impl of virNetworkListAllPorts

2019-06-20 Thread Daniel P . Berrangé
This API needs manual impl as the generator cannot cope Signed-off-by: Daniel P. Berrangé --- libvirt-override-virNetwork.py | 11 libvirt-override.c | 46 ++ 2 files changed, 57 insertions(+) create mode 100644

[libvirt] [PATCH python 0/5] Fix many screwups in virNetworkPort

2019-06-20 Thread Daniel P . Berrangé
The awesome thing about the python code generator is how it generates rubbish unless you had the right code hacks in the generator. This series of fixes correct all the screwups missed first time around. Pushed as build fixes. Daniel P. Berrangé (5): Fix syntax error with missing ; and too

[libvirt] [PATCH v3 1/2] docs: Use our own implementation for fetching the RSS data

2019-06-20 Thread Martin Kletzander
It will not be executed when the page is loaded locally. It needs planet.virt-tools.org to supply the right headers (which it does now). Signed-off-by: Martin Kletzander --- docs/index.html.in | 15 ++- docs/js/main.js| 62 ++ 2 files

[libvirt] [PATCH v3 2/2] docs: Remove unused JS libraries

2019-06-20 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- docs/Makefile.am| 5 + docs/js/jquery-3.1.1.min.js | 4 docs/js/jquery.rss.min.js | 11 --- docs/js/moment.min.js | 7 --- 4 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644

[libvirt] [PATCH v3 0/2] Ditch external JavaScript libraries

2019-06-20 Thread Martin Kletzander
This is a response to all the discussions (mainly) other people had about all the JS code we're currently using, bundling, etc. CORS [1] is set up on planet.virt-tools.org, so we can just get the XML and use it. [1] https://en.wikipedia.org/wiki/Cross-origin_resource_sharing Martin Kletzander

Re: [libvirt] [PATCH v4 00/25] Fix and enable owner remembering

2019-06-20 Thread Michal Privoznik
On 6/17/19 3:34 PM, Daniel P. Berrangé wrote: On Mon, Jun 03, 2019 at 06:07:02PM +0200, Michal Privoznik wrote: On 4/25/19 10:19 AM, Michal Privoznik wrote: This is meant for next release to have the most time possible for testing. Some of the patches were ACKed in v3 already but since they

Re: [libvirt] [PATCH 1/2] qemu: monitor: Remove text monitor support for cpu hot(un)plug

2019-06-20 Thread Ján Tomko
On Thu, Jun 20, 2019 at 01:22:26PM +0200, Peter Krempa wrote: The "cpu-add" command is supported in all supported qemu versions and cpu unplug did not work at all until the new cpu unplug approach (using device_add/del) was implemented. Remove the support for falling back to the text monitor.

Re: [libvirt] [PATCH 2/2] qemu: Remove qemuMonitorTextSetCPU

2019-06-20 Thread Ján Tomko
On Thu, Jun 20, 2019 at 01:22:27PM +0200, Peter Krempa wrote: It's not used any more. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_text.c | 30 -- src/qemu/qemu_monitor_text.h | 2 -- 2 files changed, 32 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [libvirt] [PATCH v4 18/25] security: Don't remember owner for shared resources

2019-06-20 Thread Daniel P . Berrangé
On Thu, Jun 20, 2019 at 02:32:40PM +0200, Michal Privoznik wrote: > On 6/20/19 1:58 PM, Daniel P. Berrangé wrote: > > On Thu, Jun 20, 2019 at 12:23:07PM +0200, Michal Privoznik wrote: > > > On 6/17/19 3:29 PM, Daniel P. Berrangé wrote: > > > > On Thu, Apr 25, 2019 at 10:19:54AM +0200, Michal

Re: [libvirt] [security-notice PATCH] notices: fix some typos

2019-06-20 Thread Daniel P . Berrangé
On Thu, Jun 20, 2019 at 02:04:08PM +0200, Ján Tomko wrote: > Signed-off-by: Ján Tomko > --- > notices/2008/0001.xml | 4 ++-- > notices/2010/0004.xml | 2 +- > notices/2011/0001.xml | 2 +- > notices/2011/0003.xml | 2 +- > notices/2013/0001.xml | 2 +- > notices/2013/0007.xml | 2 +- >

Re: [libvirt] [PATCH v4 18/25] security: Don't remember owner for shared resources

2019-06-20 Thread Michal Privoznik
On 6/20/19 1:58 PM, Daniel P. Berrangé wrote: On Thu, Jun 20, 2019 at 12:23:07PM +0200, Michal Privoznik wrote: On 6/17/19 3:29 PM, Daniel P. Berrangé wrote: On Thu, Apr 25, 2019 at 10:19:54AM +0200, Michal Privoznik wrote: This effectively reverts d7420430ce6 and adds new code. Here is the

[libvirt] [security-notice PATCH] notices: fix some typos

2019-06-20 Thread Ján Tomko
Signed-off-by: Ján Tomko --- notices/2008/0001.xml | 4 ++-- notices/2010/0004.xml | 2 +- notices/2011/0001.xml | 2 +- notices/2011/0003.xml | 2 +- notices/2013/0001.xml | 2 +- notices/2013/0007.xml | 2 +- notices/2013/0008.xml | 2 +- notices/2013/0010.xml | 2 +- notices/2017/0001.xml | 4

[libvirt] [PATCH 3/4] api: disallow virConnectGetDomainCapabilities on read-only connections

2019-06-20 Thread Ján Tomko
This API can be used to execute arbitrary emulators. Forbid it on read-only connections. Fixes: CVE-2019-10167 Signed-off-by: Ján Tomko Reviewed-by: Daniel P. Berrangé --- src/libvirt-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index

[libvirt] [PATCH 0/4] disallow multiple APIs on read-only connections

2019-06-20 Thread Ján Tomko
One patch per CVE for: CVE-2019-10161 CVE-2019-10166 CVE-2019-10167 CVE-2019-10168 Ján Tomko (4): api: disallow virDomainSaveImageGetXMLDesc on read-only connections api: disallow virDomainManagedSaveDefineXML on read-only connections api: disallow virConnectGetDomainCapabilities on

[libvirt] [PATCH 4/4] api: disallow virConnect*HypervisorCPU on read-only connections

2019-06-20 Thread Ján Tomko
These APIs can be used to execute arbitrary emulators. Forbid them on read-only connections. Fixes: CVE-2019-10168 Signed-off-by: Ján Tomko Reviewed-by: Daniel P. Berrangé --- src/libvirt-host.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libvirt-host.c b/src/libvirt-host.c index

[libvirt] [PATCH 1/4] api: disallow virDomainSaveImageGetXMLDesc on read-only connections

2019-06-20 Thread Ján Tomko
The virDomainSaveImageGetXMLDesc API is taking a path parameter, which can point to any path on the system. This file will then be read and parsed by libvirtd running with root privileges. Forbid it on read-only connections. Fixes: CVE-2019-10161 Reported-by: Matthias Gerstner Signed-off-by:

[libvirt] [PATCH 2/4] api: disallow virDomainManagedSaveDefineXML on read-only connections

2019-06-20 Thread Ján Tomko
The virDomainManagedSaveDefineXML can be used to alter the domain's config used for managedsave or even execute arbitrary emulator binaries. Forbid it on read-only connections. Fixes: CVE-2019-10166 Reported-by: Matthias Gerstner Signed-off-by: Ján Tomko Reviewed-by: Daniel P. Berrangé ---

Re: [libvirt] [PATCH v4 18/25] security: Don't remember owner for shared resources

2019-06-20 Thread Daniel P . Berrangé
On Thu, Jun 20, 2019 at 12:23:07PM +0200, Michal Privoznik wrote: > On 6/17/19 3:29 PM, Daniel P. Berrangé wrote: > > On Thu, Apr 25, 2019 at 10:19:54AM +0200, Michal Privoznik wrote: > > > This effectively reverts d7420430ce6 and adds new code. > > > > > > Here is the problem: Imagine a file X

Re: [libvirt] [PATCH v3 3/7] cpu_x86: Introduce virCPUx86FeatureFilter*MSR

2019-06-20 Thread Ján Tomko
On Thu, Jun 20, 2019 at 01:48:30PM +0200, Jiri Denemark wrote: This functions may be used as a virCPUDefFeatureFilter callbacks for virCPUDefCheckFeatures, virCPUDefFilerFeatures, and similar functions to select (virCPUx86FeatureFilterSelectMSR) or drop (virCPUx86FeatureFilterDropMSR) features

Re: [libvirt] [Qemu-devel] [PATCH] deprecate -mem-path fallback to anonymous RAM

2019-06-20 Thread Daniel P . Berrangé
On Thu, Jun 20, 2019 at 07:41:16AM -0400, Igor Mammedov wrote: > Fallback might affect guest or worse whole host performance > or functionality if backing file were used to share guest RAM > with another process. > > Patch deprecates fallback so that we could remove it in future > and ensure that

[libvirt] [PATCH v3 3/7] cpu_x86: Introduce virCPUx86FeatureFilter*MSR

2019-06-20 Thread Jiri Denemark
This functions may be used as a virCPUDefFeatureFilter callbacks for virCPUDefCheckFeatures, virCPUDefFilerFeatures, and similar functions to select (virCPUx86FeatureFilterSelectMSR) or drop (virCPUx86FeatureFilterDropMSR) features reported via MSR. Signed-off-by: Jiri Denemark --- Notes:

Re: [libvirt] [PATCH v2 3/7] cpu_x86: Introduce virCPUx86FeatureIsMSR

2019-06-20 Thread Jiri Denemark
On Thu, Jun 20, 2019 at 10:16:36 +0200, Ján Tomko wrote: > On Thu, Jun 20, 2019 at 12:53:38AM +0200, Jiri Denemark wrote: > >This function may be used as a virCPUDefFeatureFilter callback for > >virCPUDefCheckFeatures, virCPUDefFilerFeatures, and similar functions to > >filter or pick out features

[libvirt] [PATCH RFC] test_driver: check that the domain is running in testDomainGetTime

2019-06-20 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- Currently in the test driver in APIs that would normally require guest agents and similar we are just checking if the domain is active (using virDomainObjCheckActive). But a domain will be active even if stopped, so I would say that most of the time this is not

[libvirt] [PATCH] deprecate -mem-path fallback to anonymous RAM

2019-06-20 Thread Igor Mammedov
Fallback might affect guest or worse whole host performance or functionality if backing file were used to share guest RAM with another process. Patch deprecates fallback so that we could remove it in future and ensure that QEMU will provide expected behavior and fail if it can't use user provided

[libvirt] [PATCH 1/5] util: vircgroup: pass parent cgroup into virCgroupDetectControllersCB

2019-06-20 Thread Pavel Hrdina
In cgroups v2 we don't have to detect available controllers every single time if we are creating a new cgroup based on parent cgroup. Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 2 +- src/util/vircgroupbackend.h | 3 ++- src/util/vircgroupv1.c | 3 ++-

[libvirt] [PATCH 5/5] util: vircgroupv2: don't error out if enabling controller fails

2019-06-20 Thread Pavel Hrdina
Currently CPU controller cannot be enabled if there is any real-time task running and is assigned to non-root cgroup which is the case on several distributions with graphical environment. Instead of erroring out treat it as the controller is not available. Signed-off-by: Pavel Hrdina ---

[libvirt] [PATCH 2/5] util: vircgroup: improve controller detection

2019-06-20 Thread Pavel Hrdina
This affects only cgroups v2 where enabled controllers are not based on available mount points but on the list provided in cgroup.controllers file. Before this patch we were assuming that all controllers available in root cgroup where available in all other sub-cgroups which was wrong. In order

[libvirt] [PATCH 3/5] util: vircgroupv2: use any controller to create thread directory

2019-06-20 Thread Pavel Hrdina
The assumption that CPU controller would be always enabled is wrong, we should use any available controller to create a new sub-cgroup. Signed-off-by: Pavel Hrdina --- src/util/vircgroupv2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/vircgroupv2.c

[libvirt] [PATCH 0/5] cgroups v2 fixes and improvements

2019-06-20 Thread Pavel Hrdina
Pavel Hrdina (5): util: vircgroup: pass parent cgroup into virCgroupDetectControllersCB util: vircgroup: improve controller detection util: vircgroupv2: use any controller to create thread directory util: vircgroupv2: enable CPU controller only if it's available util: vircgroupv2: don't

[libvirt] [PATCH 4/5] util: vircgroupv2: enable CPU controller only if it's available

2019-06-20 Thread Pavel Hrdina
It might happen that we are not able to enable CPU controller so we can enable it for thread sub-cgroups only if it's available in parent cgroup. Signed-off-by: Pavel Hrdina --- src/util/vircgroupv2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/vircgroupv2.c

[libvirt] [PATCH 2/2] qemu: Remove qemuMonitorTextSetCPU

2019-06-20 Thread Peter Krempa
It's not used any more. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_text.c | 30 -- src/qemu/qemu_monitor_text.h | 2 -- 2 files changed, 32 deletions(-) diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index 280cc58840..a15c3df76e

[libvirt] [PATCH 0/2] qemu: Delete HMP cpu hotplug code

2019-06-20 Thread Peter Krempa
Peter Krempa (2): qemu: monitor: Remove text monitor support for cpu hot(un)plug qemu: Remove qemuMonitorTextSetCPU src/qemu/qemu_monitor_json.c | 15 --- src/qemu/qemu_monitor_text.c | 30 -- src/qemu/qemu_monitor_text.h | 2 -- 3 files changed, 4

[libvirt] [PATCH 1/2] qemu: monitor: Remove text monitor support for cpu hot(un)plug

2019-06-20 Thread Peter Krempa
The "cpu-add" command is supported in all supported qemu versions and cpu unplug did not work at all until the new cpu unplug approach (using device_add/del) was implemented. Remove the support for falling back to the text monitor. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c |

Re: [libvirt] [PATCH 10/10] qemu: monitor: s/ret/rc/ in UpdateVideoSize functions

2019-06-20 Thread Peter Krempa
On Sat, Jun 15, 2019 at 14:11:39 +0200, Ján Tomko wrote: > Use 'rc' to temporarily store the subfunction return values, > instead of ret. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_monitor.c | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) ACK

Re: [libvirt] [PATCH v2 2/3] docs: Use our own implementation for fetching the RSS data

2019-06-20 Thread Daniel P . Berrangé
On Thu, Jun 20, 2019 at 12:47:57PM +0200, Andrea Bolognani wrote: > On Thu, 2019-06-20 at 12:24 +0200, Martin Kletzander wrote: > > On Thu, Jun 20, 2019 at 11:43:26AM +0200, Martin Kletzander wrote: > > > +var uri = "https://planet.virt-tools.org/atom.xml;; > > > > Oh, this needs to be 'http'

Re: [libvirt] [PATCH 0/3] Ditch external JavaScript libraries

2019-06-20 Thread Daniel P . Berrangé
On Thu, Jun 20, 2019 at 10:04:03AM +0200, Martin Kletzander wrote: > On Wed, Jun 19, 2019 at 06:24:36PM +0100, Daniel P. Berrangé wrote: > > On Wed, Jun 19, 2019 at 05:22:56PM +0200, Martin Kletzander wrote: > > > This is a response to all the discussions (mainly) other people had about > > > all

Re: [libvirt] [PATCH 09/10] qemu: monitor: use VIR_AUTOFREE in qemuMonitor*VideoSize

2019-06-20 Thread Peter Krempa
On Sat, Jun 15, 2019 at 14:11:38 +0200, Ján Tomko wrote: > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_monitor.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) ACK signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 08/10] qemu: monitor: remove the json field

2019-06-20 Thread Peter Krempa
On Sat, Jun 15, 2019 at 14:11:37 +0200, Ján Tomko wrote: > Now that it is no longer used, remove it. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_monitor.c | 2 -- > 1 file changed, 2 deletions(-) ACK signature.asc Description: PGP signature -- libvir-list mailing list

Re: [libvirt] [PATCH 07/10] qemu: monitor: remove mon->json checks

2019-06-20 Thread Peter Krempa
On Sat, Jun 15, 2019 at 14:11:36 +0200, Ján Tomko wrote: > Remove all the mon->json checks in qemuMonitor functions. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_monitor.c | 84 - > 1 file changed, 25 insertions(+), 59 deletions(-) ACK

Re: [libvirt] [PATCH 05/10] qemu: remove json argument from qemuMonitorOpen

2019-06-20 Thread Peter Krempa
On Sat, Jun 15, 2019 at 14:11:34 +0200, Ján Tomko wrote: > Always assume JSON monitor was requested, since all the callers > pass true anyway. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_monitor.c | 13 - > src/qemu/qemu_monitor.h | 2 -- > src/qemu/qemu_process.c

Re: [libvirt] [PATCH 06/10] qemu: monitor: assume JSON in QEMU_CHECK_MONITOR macro

2019-06-20 Thread Peter Krempa
On Sat, Jun 15, 2019 at 14:11:35 +0200, Ján Tomko wrote: > In preparation to removing the json field from qemuMonitor, > stop checking for it in QEMU_CHECK_MONITOR. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_monitor.c | 8 +--- > 1 file changed, 1 insertion(+), 7 deletions(-) ACK

Re: [libvirt] [PATCH 04/10] qemu: stop formatting json='1' in status XML

2019-06-20 Thread Peter Krempa
On Sat, Jun 15, 2019 at 14:11:33 +0200, Ján Tomko wrote: > For quite some time now it is impossible to connect to a domain > using a HMP monitor, so there is no point in formatting it in the status > XML. > > Signed-off-by: Ján Tomko > --- ACK but please push it in the next release cycle so

Re: [libvirt] [PATCH 02/10] qemu: assume monJSON is always true

2019-06-20 Thread Peter Krempa
On Sat, Jun 15, 2019 at 14:11:31 +0200, Ján Tomko wrote: > Now that we no longer support the HMP monitor, remove some dead code. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_command.c | 8 +++- > src/qemu/qemu_domain.c| 10 -- > src/qemu/qemu_driver.c| 3 +-- >

Re: [libvirt] [PATCH 03/10] qemu: domain: remove monJSON field

2019-06-20 Thread Peter Krempa
On Sat, Jun 15, 2019 at 14:11:32 +0200, Ján Tomko wrote: > If we have a monitor, it is a JSON monitor. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_domain.c | 3 --- > src/qemu/qemu_domain.h | 1 - > src/qemu/qemu_process.c | 1 - > tests/qemuhotplugtest.c | 2 -- > 4 files changed, 7

Re: [libvirt] [PATCH v2 2/3] docs: Use our own implementation for fetching the RSS data

2019-06-20 Thread Andrea Bolognani
On Thu, 2019-06-20 at 12:24 +0200, Martin Kletzander wrote: > On Thu, Jun 20, 2019 at 11:43:26AM +0200, Martin Kletzander wrote: > > +var uri = "https://planet.virt-tools.org/atom.xml;; > > Oh, this needs to be 'http' instead of 'https'. The feedrapp returns an error > otherwise. Fixed in

Re: [libvirt] [PATCH 01/10] qemu: also delete qemuProcessAttach

2019-06-20 Thread Peter Krempa
On Sat, Jun 15, 2019 at 14:11:30 +0200, Ján Tomko wrote: > Now that the virDomainQemuAttach API returns an error, we can remove the > unused qemuProcessAttach function as well, deleting the only user > that possibly could have requested to open a non-JSON monitor. > > Signed-off-by: Ján Tomko >

Re: [libvirt] [PATCH v3 0/5] docs: Update third-party JavaScript libraries

2019-06-20 Thread Christophe de Dinechin
> On 20 Jun 2019, at 12:25, Andrea Bolognani wrote: > > On Wed, 2019-06-19 at 17:00 +0200, Christophe de Dinechin wrote: >>> Andrea Bolognani (5): >>> docs: Update jQuery >>> docs: Update Moment.js >>> docs: Update jquery.rss >>> docs: Perform JavaScript minimization at build time >>> spec:

Re: [libvirt] [PATCHv2 9/9] qemu: Move qemuParseKeywords(Free) to the monitor code

2019-06-20 Thread Andrea Bolognani
On Thu, 2019-06-20 at 12:14 +0200, Peter Krempa wrote: > On Mon, Jun 17, 2019 at 17:17:35 +0200, Andrea Bolognani wrote: > > As mentioned with the RFC, please don't push this right away but > > wait a week or so to give everyone a chance to voice their opinion > > about this removal. > > I think

Re: [libvirt] [PATCH v3 0/5] docs: Update third-party JavaScript libraries

2019-06-20 Thread Andrea Bolognani
On Wed, 2019-06-19 at 17:00 +0200, Christophe de Dinechin wrote: > > Andrea Bolognani (5): > > docs: Update jQuery > > docs: Update Moment.js > > docs: Update jquery.rss > > docs: Perform JavaScript minimization at build time > > spec: Require uglifyjs for RPM build > > In the spec file, why

Re: [libvirt] [PATCH v2 2/3] docs: Use our own implementation for fetching the RSS data

2019-06-20 Thread Martin Kletzander
On Thu, Jun 20, 2019 at 11:43:26AM +0200, Martin Kletzander wrote: This is just a small script I wrote. It works the same way as all the libraries together which we are bundling, but with just JS. The only difference is that the day of the date is formatted as 2-digit, but this should be a bug

Re: [libvirt] [PATCH v4 18/25] security: Don't remember owner for shared resources

2019-06-20 Thread Michal Privoznik
On 6/17/19 3:29 PM, Daniel P. Berrangé wrote: On Thu, Apr 25, 2019 at 10:19:54AM +0200, Michal Privoznik wrote: This effectively reverts d7420430ce6 and adds new code. Here is the problem: Imagine a file X that is to be shared between two domains as a disk. Let the first domain (vm1) have

Re: [libvirt] [PATCH v2 0/3] Ditch external JavaScript libraries

2019-06-20 Thread Andrea Bolognani
On Thu, 2019-06-20 at 11:43 +0200, Martin Kletzander wrote: > This is a response to all the discussions (mainly) other people had about all > the JS code we're currently using, bundling, etc. > > Ideally, we'll set up CORS [1] on planet.virt-tools.org, but for now this is > already a nice

Re: [libvirt] [PATCH v2 3/3] docs: Remove unused JS libraries

2019-06-20 Thread Andrea Bolognani
On Thu, 2019-06-20 at 11:43 +0200, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > docs/Makefile.am| 5 + > docs/js/jquery-3.1.1.min.js | 4 > docs/js/jquery.rss.min.js | 11 --- > docs/js/moment.min.js | 7 --- > 4 files changed, 1

  1   2   >