Re: [PATCH] apparmor: Add support for local profile customizations

2023-06-23 Thread Christian Ehrhardt
to me to implement those as well. > > > > Do you mind cooking up a patch so that we can have the whole sha-bang > > included in the upcoming release? Thanks in advance! > > I should have time to do that today. > > Regards, > Jim > -- Christian Ehrhardt Senior Staff Engineer and acting Director, Ubuntu Server Canonical Ltd

Re: [PATCH] apparmor: allow getattr on usb devices

2022-11-22 Thread Christian Ehrhardt
On Tue, Nov 22, 2022 at 9:55 AM Michal Prívozník wrote: > > On 11/22/22 09:47, Christian Ehrhardt wrote: > > On Mon, Nov 21, 2022 at 4:51 PM Michal Prívozník > > wrote: > >> > >> On 11/17/22 09:42, christian.ehrha...@canonical.com wrote: > >>&g

Re: [PATCH] apparmor: allow getattr on usb devices

2022-11-22 Thread Christian Ehrhardt
On Mon, Nov 21, 2022 at 4:51 PM Michal Prívozník wrote: > > On 11/17/22 09:42, christian.ehrha...@canonical.com wrote: > > From: Christian Ehrhardt > > > > For the handling of usb we already allow plenty of read access, > > but so far /sys/bus/usb/devices only neede

[PATCH] apparmor: allow getattr on usb devices

2022-11-17 Thread christian . ehrhardt
From: Christian Ehrhardt For the handling of usb we already allow plenty of read access, but so far /sys/bus/usb/devices only needed read access to the directory to enumerate the symlinks in there that point to the actual entries via relative links to ../../../devices/. But in more recent

[PATCH v3] nodedev: ignore EINVAL from libudev in udevEventHandleThread

2022-11-10 Thread christian . ehrhardt
From: Christian Ehrhardt Certain udev entries might be of a size that makes libudev emit EINVAL which right now leads to udevEventHandleThread exiting. Due to no more handling events other elements of libvirt will start pushing for events to be consumed which never happens causing a busy loop

Re: [PATCH] nodedev: ignore EINVAL from libudev in udevEventHandleThread

2022-10-13 Thread Christian Ehrhardt
On Thu, Oct 13, 2022 at 10:06 AM Erik Skultety wrote: > > On Thu, Oct 13, 2022 at 08:05:41AM +0200, christian.ehrha...@canonical.com > wrote: > > From: Christian Ehrhardt > > > > Certiain udev entries might be of a size that makes libudev emit EINVAL &

[PATCH v3] nodedev: ignore EINVAL from libudev in udevEventHandleThread

2022-10-13 Thread christian . ehrhardt
From: Christian Ehrhardt Certain udev entries might be of a size that makes libudev emit EINVAL which right now leads to udevEventHandleThread exiting. Due to no more handling events other elements of libvirt will start pushing for events to be consumed which never happens causing a busy loop

[PATCH v2] nodedev: ignore EINVAL from libudev in udevEventHandleThread

2022-10-13 Thread christian . ehrhardt
From: Christian Ehrhardt Certiain udev entries might be of a size that makes libudev emit EINVAL which right now leads to udevEventHandleThread exiting. Due to no more handling events other elements of libvirt will start pushing for events to be consumed which never happens causing a busy loop

Re: [PATCH] virt-aa-helper: allow common riscv64 loader paths

2022-10-03 Thread Christian Ehrhardt
On Fri, Sep 30, 2022 at 6:37 PM Jim Fehlig wrote: > > On 9/29/22 23:43, Christian Ehrhardt wrote: > > On Thu, Sep 29, 2022 at 11:30 PM Jim Fehlig wrote: > >> > >> On 9/28/22 06:45, christian.ehrha...@canonical.com wrote: > >>> From: Christian Ehrhardt

Re: [PATCH] virpcivpd: reduce errors in log due to invalid VPD

2022-10-03 Thread Christian Ehrhardt
On Thu, Sep 29, 2022 at 2:01 PM Michal Prívozník wrote: > > On 9/27/22 12:17, christian.ehrha...@canonical.com wrote: > > From: Christian Ehrhardt > > > > Sadly some devices provide invalid VPD data even with fully updated > > firmware. Former hardning like 600f5

Re: [PATCH] virt-aa-helper: allow common riscv64 loader paths

2022-09-29 Thread Christian Ehrhardt
On Thu, Sep 29, 2022 at 11:30 PM Jim Fehlig wrote: > > On 9/28/22 06:45, christian.ehrha...@canonical.com wrote: > > From: Christian Ehrhardt > > > > Riscv64 usually uses u-boot as external -kernel and a loader from > > the open implementation of RISC-V SBI. The p

[PATCH] virt-aa-helper: allow common riscv64 loader paths

2022-09-28 Thread christian . ehrhardt
From: Christian Ehrhardt Riscv64 usually uses u-boot as external -kernel and a loader from the open implementation of RISC-V SBI. The paths for those binaries as packaged in Debian and Ubuntu are in paths which are usually forbidden to be added by the user under /usr/lib... People used to start

[PATCH] virpcivpd: reduce errors in log due to invalid VPD

2022-09-27 Thread christian . ehrhardt
From: Christian Ehrhardt Sadly some devices provide invalid VPD data even with fully updated firmware. Former hardning like 600f580d "PCI VPD: Skip fields with invalid values" have already helped for those to some extent. But if one happens to have such a device installed in the syste

Re: [PATCH] Allow VM to read sysfs PCI config, revision files

2022-05-19 Thread Christian Ehrhardt
On Thu, May 19, 2022 at 3:04 PM Michal Prívozník wrote: > > On 5/19/22 08:09, Christian Ehrhardt wrote: > > On Thu, May 12, 2022 at 3:27 PM Max Goodhart wrote: > >> > >> Oops, I didn't intend for the commit author email to be > >> git...

Re: [PATCH] Allow VM to read sysfs PCI config, revision files

2022-05-18 Thread Christian Ehrhardt
; \"/sys/devices/**/{uevent,vendor,device,subsystem_vendor,subsystem_device,config,revision}\" >> r,\n"); >> virBufferAddLit(&buf, " # dri libs will trigger that, but t is not >> requited and DAC would deny it anyway\n"); >> virBufferAddLit(&buf, " deny \"/var/lib/libvirt/.cache/\" w,\n"); >> } >> -- >> 2.34.1 >> -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

Re: [PATCH] Allow VM to read sysfs PCI config, revision files

2022-05-18 Thread Christian Ehrhardt
On Thu, May 12, 2022 at 3:27 PM Max Goodhart wrote: > > From: Max Goodhart Hi Max, thanks for the work to identify and fix this! It is indeed a natural evolution of my 27a9ebf2818 00fbb9e5167 f2cbb94eabd that made the rules so far. Signed-off-by: Christian Ehrhardt > This fixe

Re: [PATCH] apparmor: Allow swtpm to use its own apparmor profile

2022-04-20 Thread Christian Ehrhardt
+ ptrace (read,trace) peer=swtpm, > >signal (send) peer=dnsmasq, >signal (send) peer=/usr/sbin/dnsmasq, > -- > 2.25.1 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

[PATCH] virt-aa-helper: fix bool initialization

2021-11-16 Thread christian . ehrhardt
From: Christian Ehrhardt Since purged is a bool variable it should be initialized by false instead of 0. Suggested-by: Sergio Durigan Junior Signed-off-by: Christian Ehrhardt --- src/security/virt-aa-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/security

Re: [PATCH v2 0/1] virt-aa-helper: Remove corrupted profile

2021-11-04 Thread Christian Ehrhardt
On Thu, Nov 4, 2021 at 1:07 PM Christian Ehrhardt wrote: > > On Tue, Nov 2, 2021 at 3:04 PM Ioanna Alifieraki > wrote: > > > > This is a v2 of the patches sent previously and hopefully makes things > > simpler. > > (previous patches subject: [PATCH 0/4]

Re: [PATCH v2 0/1] virt-aa-helper: Remove corrupted profile

2021-11-04 Thread Christian Ehrhardt
almost never would have ran there isn't much reason for it as-is. I was unsure at first if this now would have an issue when called with -F triggering ctl->append extending the include_files and then (due to empty profile setting purged) going into create_profile. But since you only detect

Re: [PATCH] apparmor: ceph config file names

2021-10-10 Thread Christian Ehrhardt
On Sat, Oct 9, 2021 at 2:33 PM Jamie Strandboge wrote: > > On Thu, 07 Oct 2021, christian.ehrha...@canonical.com wrote: > > > From: Christian Ehrhardt > > > > If running multiple [1] clusters (uncommon) the ceph config file will be > > derived from the cluster

Re: [PATCH 4/4] virt-aa-helper: test: add test for new option -P

2021-10-10 Thread Christian Ehrhardt
uot;-r -u $valid_uuid" "$test_xml" > + # All the tests are run with the --dry-run option this test is > + # never going to fail because the profile is not going to be loaded. > + # However, since we touch the profile if it's still here after the > test > + # it means that something went wrong, so make the test fail. > + if [ -f "$profile_path/$valid_uuid" ]; then > + echo "FAIL: failed to purge corrupted profile" >$output > + echo " '$extra_args $args': " > + errors=$(($errors + 1)) > + # remove corrupted profile anyways not to interfere with > + # subsequent runs of the tests. > + rm "$profile_path/$valid_uuid" > + fi > +fi > + > testme "0" "help" "-h" > > echo "" >$output > -- > 2.17.1 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

Re: [PATCH 0/4] virt-aa-helper: Add new option to remove corrupted

2021-10-10 Thread Christian Ehrhardt
per.c | 87 ++- > tests/meson.build | 1 + > tests/virt-aa-helper-test | 29 > 3 files changed, 96 insertions(+), 21 deletions(-) > > -- > 2.17.1 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

[PATCH] apparmor: ceph config file names

2021-10-07 Thread christian . ehrhardt
From: Christian Ehrhardt If running multiple [1] clusters (uncommon) the ceph config file will be derived from the cluster name. Therefore the rule to allow to read ceph config files need to be opened up slightly to allow for that condition. [1]: https://docs.ceph.com/en/mimic/rados

Re: [PATCH V2 1/4] Apparmor: Add profile for virtqemud

2021-06-23 Thread Christian Ehrhardt
ad no chance to test it myself it looks exactly as I'd have expected a virtqemud profile. Reviewed-by: Christian Ehrhardt > > diff --git a/src/security/apparmor/libvirt-qemu > b/src/security/apparmor/libvirt-qemu > index 85c9e61d6c..3e31ed4981 100644 > --- a/src/securit

Re: [PATCH V2 4/4] Apparmor: Allow reading /etc/ssl/openssl.cnf

2021-06-23 Thread Christian Ehrhardt
le I don't immediately see which configuration makes virt-aa-helper need openssl it is an abstraction that isn't allowing a lot, so IMHO that should be ok to add. Reviewed-by: Christian Ehrhardt > --- > src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in | 1 + > 1 fil

Re: [PATCH V2 3/4] Apparmor: Allow reading libnl's classid file

2021-06-23 Thread Christian Ehrhardt
n this file, > which are then used by all libnl tools, possibly those used by libvirt. > To be on the safe side, allow read access to the file in the virt-aa-helper > profile and the libvirt-qemu abstraction. > > Signed-off-by: Jim Fehlig While this particular rule would be covered in

Re: generation of virtproxd socket files

2021-02-09 Thread Christian Ehrhardt
efix']) 800 unit_conf.set('deps', unit.get('deps', '')) 801 if conf.has('WITH_POLKIT') 802 unit_conf.set('mode', '0666') 803 else 804 unit_conf.set('mode', '0600') 805 endif ... Also see: https://gitlab.com/libvirt/libvirt/-/commit/dd4f2c73ad7f9fc0eae5325d5bf5786afd3a467e So if not just an error/mistake somewhere, then setting socket_$name_in and providing such a file with your needs could be a start > Regards, > Jim > > [1] https://bugzilla.opensuse.org/show_bug.cgi?id=1181838 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

Re: [PATCH] Revert "remote: Add libvirtd dependency to virt-guest-shutdown.target"

2021-02-01 Thread Christian Ehrhardt
c/remote/virt-guest-shutdown.target > > +++ b/src/remote/virt-guest-shutdown.target > > @@ -1,4 +1,3 @@ > > [Unit] > > Description=Libvirt guests shutdown > > -Requires=libvirtd.service > > Documentation=https://libvirt.org > > Reviewed-by: Daniel P. Berrangé

Re: [PATCH] remote: Add libvirtd dependency to virt-guest-shutdown.target

2021-01-27 Thread Christian Ehrhardt
On Wed, Nov 4, 2020 at 7:47 AM Neal Gompa wrote: > > On Tue, Nov 3, 2020 at 9:26 PM Jim Fehlig wrote: > > > > When restarting libvirt services and sockets *and* libvirt-guests.service > > is running, the latter will sometimes hang when trying to connect to > > libvirtd. Even though libvirt-guests

Re: [PATCH] apparmor: let image label setting loop over backing files

2021-01-19 Thread Christian Ehrhardt
On Tue, Jan 19, 2021 at 11:43 AM Peter Krempa wrote: > > On Tue, Jan 19, 2021 at 11:23:16 +0100, Christian Ehrhardt wrote: > > When adding a rule for an image file and that image file has a chain > > of backing files then we need to add a rule for each of those files. > >

Re: [PATCH] apparmor: let image label setting loop over backing files

2021-01-19 Thread Christian Ehrhardt
On Tue, Jan 19, 2021 at 12:28 PM Peter Krempa wrote: > > On Tue, Jan 19, 2021 at 12:15:31 +0100, Christian Ehrhardt wrote: > > On Tue, Jan 19, 2021 at 11:43 AM Peter Krempa wrote: > > > > > > On Tue, Jan 19, 2021 at 11:23:16 +0100, Christian Ehrhardt wrote: >

Re: [PATCH] apparmor: let image label setting loop over backing files

2021-01-19 Thread Christian Ehrhardt
On Tue, Jan 19, 2021 at 11:43 AM Peter Krempa wrote: > > On Tue, Jan 19, 2021 at 11:23:16 +0100, Christian Ehrhardt wrote: > > When adding a rule for an image file and that image file has a chain > > of backing files then we need to add a rule for each of those files. > >

[PATCH] apparmor: let image label setting loop over backing files

2021-01-19 Thread Christian Ehrhardt
/-/issues/118 Signed-off-by: Christian Ehrhardt --- src/security/security_apparmor.c | 39 ++-- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 29f0956d22..1f309c0c9f 100644 --- a/src

Re: RFC: deprecating/obsoleting netcf package and libvirt virInterface*() APIs

2020-12-03 Thread Christian Ehrhardt
ropriate virInterface*() APIs, reproduced in > virNodeDeviceGetXMLDesc(), or just dropped altogether. > > On the netcf side, there are several small patches that have been > sitting in git for a few years without being in any official release; it > would probably be nice to make one final release before closing up shop. > The mailing list could then be closed down, and some final message put > in a README in the git repo (on pagure.io) before putting it into some > archival state. > > After those things are done, the various distros could be notified of > the newfound irrelevance of netcf, and given the opportunity to remove > the package from their releases. > > Anything else? > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

Re: [PATCH 1/2] apparmor: Allow lxc processes to receive signals from libvirt

2020-12-03 Thread Christian Ehrhardt
at it is the same rule as in libvirt-qemu and therefore should be rather safe. TBH I did not see the denial when testing 6.9.0 [1], but the pattern is known and therefore I think adding the rule is fine. Reviewed-by: Christian Ehrhardt [1]: https://objectstorage.prodstack4-5.canonical.com/v1/AUT

Re: Migration with "--p2p --tunnelled" hanging in v6.9.0

2020-11-26 Thread Christian Ehrhardt
: > > > > On Wed, Nov 25, 2020 at 04:49:14PM +0100, Christian Ehrhardt wrote: > > > > > I found that the same vol-download vs 127.0.0.1 gives the same > > > > > results. > > > > > That in turn makes it easier to gather results as we on

Re: [libvirt PATCH 0/2] fix regression in SSH tunnelling performance

2020-11-26 Thread Christian Ehrhardt
back to netcat (expected and ok). - patched -> 6.9 - slow (as before) - 6.9 -> patched - fast (which is good as upgrade paths use migration and it is sufficient to upgrade the target) Tested-by: Christian Ehrhardt Thank you Daniel! > src/remote/remote_ssh_helper.c | 113 ++

Re: Migration with "--p2p --tunnelled" hanging in v6.9.0

2020-11-25 Thread Christian Ehrhardt
On Wed, Nov 25, 2020 at 2:47 PM Daniel P. Berrangé wrote: > > On Wed, Nov 25, 2020 at 02:33:44PM +0100, Christian Ehrhardt wrote: > > On Wed, Nov 25, 2020 at 1:38 PM Daniel P. Berrangé > > wrote: > > > > > > On Wed, Nov 25, 2020 at 01:28:09PM +0100, Christian

Re: Migration with "--p2p --tunnelled" hanging in v6.9.0

2020-11-25 Thread Christian Ehrhardt
On Wed, Nov 25, 2020 at 1:38 PM Daniel P. Berrangé wrote: > > On Wed, Nov 25, 2020 at 01:28:09PM +0100, Christian Ehrhardt wrote: > > On Wed, Nov 25, 2020 at 10:55 AM Christian Ehrhardt > > wrote: > > > > > > On Tue, Nov 24, 2020 at 4:30 PM Peter Krempa w

Re: Migration with "--p2p --tunnelled" hanging in v6.9.0

2020-11-25 Thread Christian Ehrhardt
On Wed, Nov 25, 2020 at 10:55 AM Christian Ehrhardt wrote: > > On Tue, Nov 24, 2020 at 4:30 PM Peter Krempa wrote: > > > > On Tue, Nov 24, 2020 at 16:05:53 +0100, Christian Ehrhardt wrote: > > > Hi, > > > > [...] > > BTW to reduce the scope what to

Re: Migration with "--p2p --tunnelled" hanging in v6.9.0

2020-11-25 Thread Christian Ehrhardt
On Tue, Nov 24, 2020 at 4:30 PM Peter Krempa wrote: > > On Tue, Nov 24, 2020 at 16:05:53 +0100, Christian Ehrhardt wrote: > > Hi, > > [...] BTW to reduce the scope what to think about - I have rebuilt 6.8 as well it works. Thereby I can confirm that the offending change sh

Migration with "--p2p --tunnelled" hanging in v6.9.0

2020-11-24 Thread Christian Ehrhardt
o debug a hanging migration Thanks in advance! [1]: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1904584/+attachment/5437541/+files/full-log.tgz -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

Re: [PATCH] apparmor: allow kvm-spice compat wrapper

2020-11-18 Thread Christian Ehrhardt
On Wed, Nov 18, 2020 at 10:38 AM Daniel P. Berrangé wrote: > > On Tue, Nov 17, 2020 at 09:11:48PM -0500, Neal Gompa wrote: > > On Tue, Nov 17, 2020 at 11:49 AM Christian Ehrhardt > > wrote: > > > > > > On Mon, Nov 16, 2020 at 3:28 PM Michal Privoznik > &

Re: [PATCH] apparmor: allow kvm-spice compat wrapper

2020-11-17 Thread Christian Ehrhardt
On Mon, Nov 16, 2020 at 3:28 PM Michal Privoznik wrote: > > On 11/16/20 1:26 PM, Christian Ehrhardt wrote: > > 'kvm-spice' is a binary name used to call 'kvm' which actually is a wrapper > > around qemu-system-x86_64 enabling kvm acceleration. This isn'

Re: nwfilter issue with new ebtables

2020-11-16 Thread Christian Ehrhardt
On Mon, Nov 16, 2020 at 4:24 PM Laine Stump wrote: > > On 11/16/20 2:01 AM, Christian Ehrhardt wrote: > > Hi, > > I have last week discussed breakage in nwfilter usage on IRC > > > > > > > > > > virsh start > >error

[PATCH] apparmor: allow kvm-spice compat wrapper

2020-11-16 Thread Christian Ehrhardt
.org/qemu-team/qemu/-/commit/9944836d3 Signed-off-by: Christian Ehrhardt --- src/security/apparmor/libvirt-qemu | 1 + 1 file changed, 1 insertion(+) diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu index a03e9e2c94..85c9e61d6c 100644 --- a/src/security/apparmor/lib

nwfilter issue with new ebtables

2020-11-15 Thread Christian Ehrhardt
testrule3 testrule3-renamed ebtables v1.8.6 (nf_tables): Chain 'testrule3' doesn't exists This led to upstream ebtables bug [1] - for now just FYI in case you want/need to subscribe for your own tracking. [1]: https://bugzilla.netfilter.org/show_bug.cgi?id=1481 -- Christian Ehrhar

Re: [RFC PATCH 2/2] qemu: Add support for max physical address size

2020-11-02 Thread Christian Ehrhardt
@ > + > + foo > + c7a5fdbd-edaf-9455-926a-d65c16db1809 > + 219136 > + 219136 > + 1 > + > +hvm > + > + > + > + > + > + > + destroy > + restart > + destroy > + > + > + > diff --git a/tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.err > b/tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.err > new file mode 100644 > index 00..28f2e43432 > --- /dev/null > +++ b/tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.err > @@ -0,0 +1 @@ > +unsupported configuration: CPU maximum physical address bits number > specification cannot be used with mode='passthrough' > diff --git a/tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.xml > b/tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.xml > new file mode 100644 > index 00..a94e567dcb > --- /dev/null > +++ b/tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.xml > @@ -0,0 +1,20 @@ > + > + foo > + c7a5fdbd-edaf-9455-926a-d65c16db1809 > + 219136 > + 219136 > + 1 > + > +hvm > + > + > + > + > + > + > + destroy > + restart > + destroy > + > + > + > diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c > index c5a0095e0d..fd17fea744 100644 > --- a/tests/qemuxml2argvtest.c > +++ b/tests/qemuxml2argvtest.c > @@ -3409,6 +3409,13 @@ mymain(void) > > DO_TEST_CAPS_LATEST("virtio-9p-multidevs"); > > +DO_TEST("cpu-phys-bits-passthrough", QEMU_CAPS_KVM, > QEMU_CAPS_CPU_PHYS_BITS); > +DO_TEST("cpu-phys-bits-emulate", QEMU_CAPS_KVM, > QEMU_CAPS_CPU_PHYS_BITS); > +DO_TEST("cpu-phys-bits-emulate2", QEMU_CAPS_KVM, > QEMU_CAPS_CPU_PHYS_BITS); > +DO_TEST_PARSE_ERROR("cpu-phys-bits-emulate3", QEMU_CAPS_KVM); > +DO_TEST_PARSE_ERROR("cpu-phys-bits-passthrough2", QEMU_CAPS_KVM); > +DO_TEST_PARSE_ERROR("cpu-phys-bits-passthrough3", QEMU_CAPS_KVM); > + > if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL) > virFileDeleteTree(fakerootdir); > > > > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

Re: [PATCH] apparmor: Allow /usr/libexec for libxl-save-helper and pygrub

2020-09-23 Thread Christian Ehrhardt
On Wed, Sep 23, 2020 at 6:45 PM Jim Fehlig wrote: > > On 9/23/20 7:51 AM, Jim Fehlig wrote: > > On 9/23/20 7:26 AM, Christian Ehrhardt wrote: > >> On Wed, Sep 23, 2020 at 12:35 AM Jim Fehlig wrote: > >>> > >>> Like other distros, openSUSE Tumblewee

Re: [PATCH] apparmor: Allow /usr/libexec for libxl-save-helper and pygrub

2020-09-23 Thread Christian Ehrhardt
PUx, > + /usr/{lib,libexec}/xen-*/bin/pygrub PUx, >/usr/{lib,lib64,lib/qemu,libexec}/vhost-user-gpu PUx, >/usr/{lib,lib64,lib/qemu,libexec}/virtiofsd PUx, > > -- > 2.28.0 > > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

Re: Various issues when using multiple graphic outputs

2020-09-07 Thread Christian Ehrhardt
literally at https://libvirt.org/formatdomain.html#video-devices "This legacy behaviour can be inconvenient in cases where GPU mediated devices are meant to be the only rendering device within a guest and so specifying another video device along with type none." Thank you Gerd and

Re: Various issues when using multiple graphic outputs

2020-09-04 Thread Christian Ehrhardt
On Fri, Sep 4, 2020 at 12:37 PM Gerd Hoffmann wrote: > > On Fri, Sep 04, 2020 at 12:05:08PM +0200, Christian Ehrhardt wrote: > > Hi, > > I've had continuous issues with this and wanted to reach out > > if that is a common issue everyone has or just me lacking a

Various issues when using multiple graphic outputs

2020-09-04 Thread Christian Ehrhardt
Hi, I've had continuous issues with this and wanted to reach out if that is a common issue everyone has or just me lacking a little detail on my setup. Setup: - tried qemu up to 4.2 - tried libvirt up to 6.0 - virt-viewer up to 7.0-2build1 - virt-manager up to 2.2.1 - I plan to retry with qemu 5.0

Re: [PATCH] storage: only fallocate when allocation matches capacity

2020-09-03 Thread Christian Ehrhardt
On Thu, Sep 3, 2020 at 12:36 PM Daniel P. Berrangé wrote: > > On Thu, Sep 03, 2020 at 12:18:42PM +0200, Christian Ehrhardt wrote: > > On Wed, Sep 2, 2020 at 6:49 PM Michal Privoznik wrote: > > > > > > On 9/2/20 3:58 PM, Christian Ehrhardt wrote: > > > >

Re: [PATCH] storage: only fallocate when allocation matches capacity

2020-09-03 Thread Christian Ehrhardt
On Thu, Sep 3, 2020 at 12:49 PM Richard Laager wrote: > > On 9/3/20 5:18 AM, Christian Ehrhardt wrote: > > Even if my fix lands, we are back to square one and would need > > virt-manager to submit a different XML. > > Remember: my target here would be to come back to pra

Re: [PATCH] storage: only fallocate when allocation matches capacity

2020-09-03 Thread Christian Ehrhardt
On Wed, Sep 2, 2020 at 6:49 PM Michal Privoznik wrote: > > On 9/2/20 3:58 PM, Christian Ehrhardt wrote: > > In c9ec7088 "storage: extend preallocation flags support for qemu-img" > > the option to fallocate was added and meant to be active when (quote): > > "

[PATCH] storage: only fallocate when allocation matches capacity

2020-09-02 Thread Christian Ehrhardt
com/show_bug.cgi?id=1759454 Fixes: https://bugs.launchpad.net/ubuntu/focal/+source/libvirt/+bug/1847105 Signed-off-by: Christian Ehrhardt --- src/storage/storage_util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c in

Re: [PATCH v2] virt-aa-helper: disallow graphics socket read permissions

2020-09-01 Thread Christian Ehrhardt
creates that socket: $ qemu-system-x86_64 -vnc socket:/tmp/foobar creates: srwxrwxr-x 1 paelzer paelzer 0 Sep 1 11:43 /tmp/foobar= Therefore qemu would need the write permission to that value IMHO. And as I said the concern of "VMs can connect to each other" would only be tru

[RFC] apparmor: add subprofile for virtiofsd

2020-08-26 Thread Christian Ehrhardt
after pivot_root need not to allow everything - settle on common paths with the community Signed-off-by: Christian Ehrhardt --- src/security/apparmor/libvirt-qemu | 3 ++ src/security/apparmor/usr.sbin.libvirtd.in | 46 ++ 2 files changed, 49 insertions(+) diff --git a

Re: [PATCH v2] apparmor: allow libvirtd to call virtiofsd

2020-08-26 Thread Christian Ehrhardt
" requested_mask="x" denied_mask="x" > fsuid=0 ouid=0 > > To avoid this, allow execution of virtiofsd from the libvirtd AppArmor > profile. > > [virtiofs]: https://libvirt.org/kbase/virtiofs.html > [virtiofsd]: https://www.qemu.org/docs/master/interop/v

Re: XDR related breakage in libvirt v6.6.0 when using libvirt-lxc

2020-08-25 Thread Christian Ehrhardt
On Tue, Aug 25, 2020 at 4:07 PM Daniel P. Berrangé wrote: > > On Tue, Aug 25, 2020 at 03:16:50PM +0200, Christian Ehrhardt wrote: > > Hi, > > I expect that this falls under the "with meson now everything is > > different anyway" umbrella but wanted to let you

Re: [PATCH] apparmor: allow libvirtd to call virtiofsd

2020-08-25 Thread Christian Ehrhardt
On Mon, Aug 24, 2020 at 2:21 PM Christian Ehrhardt wrote: > > On Mon, Aug 24, 2020 at 2:03 PM Kevin Locke wrote: > > > > When using [virtiofs], libvirtd must launch [virtiofsd] to provide > > filesystem access on the host. When a guest is configured wi

XDR related breakage in libvirt v6.6.0 when using libvirt-lxc

2020-08-25 Thread Christian Ehrhardt
ct-libvirt.sh [4]: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-groovy/groovy/amd64/libv/libvirt/20200825_005918_44b74@/log.gz -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

Re: [PATCH] apparmor: allow libvirtd to call virtiofsd

2020-08-24 Thread Christian Ehrhardt
d=0 > > To avoid this, allow execution of virtiofsd from the libvirtd AppArmor > profile. > > [virtiofs]: https://libvirt.org/kbase/virtiofs.html > [virtiofsd]: https://www.qemu.org/docs/master/interop/virtiofsd.html The added rule and reasoning LGTM, Reviewed-by: Christian Ehrhardt P.

Re: [PATCH] tools: fix libvirt-guests.sh text assignments

2020-08-21 Thread Christian Ehrhardt
On Thu, Aug 20, 2020 at 10:50 AM Michael Chapman wrote: > > On Thu, 20 Aug 2020, Christian Ehrhardt wrote: > > On Wed, Aug 19, 2020 at 12:15 PM Christian Ehrhardt > > wrote: > > > > > > In libvirt 6.6 stopping guests with libvirt-guests.sh is broken. > >

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Christian Ehrhardt
On Thu, Aug 20, 2020 at 5:15 PM Mark Mielke wrote: > > On Thu, Aug 20, 2020 at 8:55 AM Christian Ehrhardt > wrote: >> >> On Thu, Aug 20, 2020 at 12:43 PM Martin Wilck wrote: >> > The simplest approach is to touch the qemu binaries. We discussed this >> &g

Re: qemu modularization of qemu-5.1 vs libvirt domcapabilities cache?

2020-08-20 Thread Christian Ehrhardt
ne a known path in there like /var/run/qemu/last_packaging_change the packages could easily touch it on any install/remove/update as Daniel suggested and libvirt could check this path like it does with the date of the qemu binary already. [1]: https://github.com/qemu/qemu/commit/bd83c861c0628a64997b7bd95c3bcc2e916baf2e > Cheers, > Martin > > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

Re: [PATCH] tools: fix libvirt-guests.sh text assignments

2020-08-19 Thread Christian Ehrhardt
On Wed, Aug 19, 2020 at 12:15 PM Christian Ehrhardt wrote: > > In libvirt 6.6 stopping guests with libvirt-guests.sh is broken. > As soon as there is more than one guest one can see > `systemctl stop libvirt-guests` faiing and in the log we see: > libvirt-guests.sh[2455]: Ru

Re: [PATCH] virdevmapper: Ignore all errors when opening /dev/mapper/control

2020-08-19 Thread Christian Ehrhardt
and as discussed on IRC users are kind of used to trim logs, so it should be ok. Reviewed-by: Christian Ehrhardt > Reported-by: Christian Ehrhardt > Signed-off-by: Michal Privoznik > --- > src/util/virdevmapper.c | 23 +++ > 1 file changed, 15 inserti

Re: [libvirt PATCH 0/2] meson: AppArmor fixes

2020-08-19 Thread Christian Ehrhardt
APPARMOR_DIR Thanks a lot for doing this work early on! Changes LGTM Reviewed-by: Christian Ehrhardt > meson.build | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > -- > 2.26.2 > > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

[PATCH] tools: fix libvirt-guests.sh text assignments

2020-08-19 Thread Christian Ehrhardt
t 'textify' all assignments that are strings or potentially can become such lists (even if they are not using the local qualifier). Fixes: 08071ec0 "tools: variables clean-up in libvirt-guests script" Signed-off-by: Christian Ehrhardt --- tools/libvirt-guests.sh.in | 136 ++

Re: [PATCH v2 0/2] Deal with kernels without DM support

2020-08-19 Thread Christian Ehrhardt
On Tue, Aug 18, 2020 at 12:47 PM Christian Ehrhardt wrote: > > On Tue, Aug 18, 2020 at 12:11 PM Christian Ehrhardt > wrote: > > > > On Tue, Aug 18, 2020 at 11:36 AM Michal Privoznik > > wrote: > > > > > > v2 of: > > > > > > https:

Re: [PATCH v2 0/2] Deal with kernels without DM support

2020-08-18 Thread Christian Ehrhardt
On Tue, Aug 18, 2020 at 12:11 PM Christian Ehrhardt wrote: > > On Tue, Aug 18, 2020 at 11:36 AM Michal Privoznik wrote: > > > > v2 of: > > > > https://www.redhat.com/archives/libvir-list/2020-August/msg00489.html > > > > diff to v1: > > - After dis

Re: [PATCH v2 0/2] Deal with kernels without DM support

2020-08-18 Thread Christian Ehrhardt
fferent. > > Michal Prívozník (2): > virdevmapper: Don't cache device-mapper major > virdevmapper: Handle kernel without device-mapper support Reviewed-by: Christian Ehrhardt Builds have started to re-test it as well ... > src/util/virdevmapper.c | 35 +++

Re: [PATCH 0/2] virdevmapper: Deal with kernels without DM support

2020-08-18 Thread Christian Ehrhardt
your patches a try for this use case as well since I wasn't sure anyone else would. I can confirm that functionally your patches applied on top of 6.6 (as we work on it for Debian&Ubuntu) make it work again. Therefore: Tested-by: Christian Ehrhardt

Re: [PATCH 1/2] apparmor: allow adding permanent per guest rules

2020-08-13 Thread Christian Ehrhardt
On Fri, Aug 7, 2020 at 6:14 PM Daniel P. Berrangé wrote: > On Fri, Aug 07, 2020 at 12:21:19PM +0200, Christian Ehrhardt wrote: > > The design of apparmor in libvirt always had a way to define custom > > per-guest rules as described in docs/drvqemu.html and [1]. > > > &g

Re: [PATCH 2/2] apparmor: allow unmounting .dev entries

2020-08-13 Thread Christian Ehrhardt
On Fri, Aug 7, 2020 at 6:14 PM Daniel P. Berrangé wrote: > On Fri, Aug 07, 2020 at 12:21:20PM +0200, Christian Ehrhardt wrote: > > With qemu 5.0 and libvirt 6.6 there are new apparmor denials: > > apparmor="DENIED" operation="umount" profile="libvirtd&q

Re: [PATCH 3/4] virdevmapper: Don't use libdevmapper to obtain dependencies

2020-08-10 Thread Christian Ehrhardt
ere is an entry in devices (in host and in the container) $ cat /proc/devices | grep map 253 device-mapper But libvirt 6.6 in this case running in a LXD system container (working before) now fails related to this with what seems to be the same high level symptom. # virsh start kvmguest-groovy-normal3 error: Failed to start domain kvmguest-groovy-normal3 error: internal error: Process exited prior to exec: libvirt: QEMU Driver error : Unable to get devmapper targets for /var/lib/uvtool/libvirt/images/kvmguest-groovy-normal3.qcow: No such file or directory > -- > Andrea Bolognani / Red Hat / Virtualization > > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

Re: [PATCH v2 0/5] Further Debian/Ubuntu Apparmor Delta

2020-08-09 Thread Christian Ehrhardt
in the GitLab group with "Developer" role you > should be able to do that on your own. > Thanks for the offer, I planned to push these today giving people who would look more likely to review on the weekend a chance as well. Now pushed with all the review/ack tags I got on these chan

[PATCH 1/2] apparmor: allow adding permanent per guest rules

2020-08-07 Thread Christian Ehrhardt
overrides and thereby break a documented feature. [1]: https://gitlab.com/apparmor/apparmor/-/wikis/Libvirt#advanced-usage Fixes: eba2225b "apparmor: delete profile on VM shutdown" Signed-off-by: Christian Ehrhardt --- src/security/virt-aa-helper.c | 3 +-- 1 file changed, 1 inser

[PATCH 2/2] apparmor: allow unmounting .dev entries

2020-08-07 Thread Christian Ehrhardt
handling [1] and the error path triggered by these issues now causes this new denial. There are already related rules for mounting and it seems right to allow also the related umount. [1]: https://www.redhat.com/archives/libvir-list/2020-August/msg00236.html Signed-off-by: Christian Ehrhardt --- s

[PATCH v2 1/5] apparmor: allow default pki path

2020-08-04 Thread Christian Ehrhardt
://www.qemu.org/docs/master/system/tls.html [2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930100 Signed-off-by: Christian Ehrhardt Acked-by: Jamie Strandboge --- src/security/apparmor/libvirt-qemu | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/security/apparmor/libvirt-qemu b

[PATCH v2 4/5] apparmor: qemu access to @{PROC}/*/auxv for hw_cap

2020-08-04 Thread Christian Ehrhardt
From: Stefan Bader On some architectures (ppc, s390x, sparc, arm) qemu will read auxv to detect hardware capabilities via qemu_getauxval. Allow that access read-only for the entry owned by the current qemu process. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader Acked-by: Jamie

[PATCH v2 2/5] apparmor: allow libvirtd to call pygrub

2020-08-04 Thread Christian Ehrhardt
]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931768 [2]: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1326003 Signed-off-by: Christian Ehrhardt Acked-by: Jamie Strandboge --- src/security/apparmor/usr.sbin.libvirtd.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/security

[PATCH v2 0/5] Further Debian/Ubuntu Apparmor Delta

2020-08-04 Thread Christian Ehrhardt
so one can understand the case a commit tries to fix without knowing too much context. Update since v1: - drop a few commits that in discussion turned out to be not/no-more needed - fixed a few typos - added the ack's that I received by Jamie Strandboge Christian Ehrhardt (1): apparmor: let qemu

[PATCH v2 5/5] apparmor: let qemu load old shared objects after upgrades

2020-08-04 Thread Christian Ehrhardt
feature load [2] after package upgrades. [1]: https://github.com/qemu/qemu/commit/bd83c861 [2]: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1847361 Signed-off-by: Christian Ehrhardt Acked-by: Jamie Strandboge --- src/security/apparmor/libvirt-qemu | 5 + 1 file changed, 5 insertions

[PATCH v2 3/5] apparmor: read only access to overcommit_memory

2020-08-04 Thread Christian Ehrhardt
From: Jamie Strandboge Allow qemu to read @{PROC}/sys/vm/overcommit_memory. This is read on guest start-up and (as read-only) not a critical secret that has to stay hidden. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader Signed-off-by: Jamie Strandboge --- src/security

Re: [PATCH 3/8] apparmor: allow virt-aa-helper nameservices

2020-08-04 Thread Christian Ehrhardt
On Mon, Aug 3, 2020 at 5:05 PM Jamie Strandboge wrote: > On Mon, 03 Aug 2020, Christian Ehrhardt wrote: > > > Since quite a while libvirt-aa-helper triggers nss related apparmor > > denials like: > > operation="open" profile="virt-aa-helper" na

Re: [PATCH 7/8] apparmor: allow virt-aa-helper to read openvswitch sockets

2020-08-04 Thread Christian Ehrhardt
On Mon, Aug 3, 2020 at 5:13 PM Jamie Strandboge wrote: > On Mon, 03 Aug 2020, Christian Ehrhardt wrote: > > > From: Serge Hallyn > > > > Chardevs/sockets configured for openvswitch-dpdk use cases > > might be probed by virt-aa-helper. Allow that access to enable &g

Re: [PATCH 6/8] apparmor: allow virt-aa-helper to read from tmp

2020-08-03 Thread Christian Ehrhardt
On Mon, Aug 3, 2020 at 5:11 PM Jamie Strandboge wrote: > On Mon, 03 Aug 2020, Christian Ehrhardt wrote: > > > From: Stefan Bader > > > > temporary directories are a common place images are placed by users > > for any sort of quick evaluation. Allow virt-aa-he

Re: [PATCH 5/8] apparmor: qemu access to @{PROC}/*/auxv for hw_cap

2020-08-03 Thread Christian Ehrhardt
On Mon, Aug 3, 2020 at 5:07 PM Jamie Strandboge wrote: > On Mon, 03 Aug 2020, Christian Ehrhardt wrote: > > > From: Stefan Bader > > > > On some architectures (ppc, s390x, sparc, arm) qemu will read auxv > > to detect hardware capabilities via qemu_getauxval. >

[PATCH 3/8] apparmor: allow virt-aa-helper nameservices

2020-08-03 Thread Christian Ehrhardt
bin/bugreport.cgi?bug=882979 [2]: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1546674 [3]: https://gitlab.com/apparmor/apparmor Signed-off-by: Christian Ehrhardt --- src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/securit

[PATCH 4/8] apparmor: read only access to overcommit_memory

2020-08-03 Thread Christian Ehrhardt
From: Jamie Strandboge Allow qemu to read @{PROC}/sys/vm/overcommit_memory. This is read on guest start-up and (as read-only) not a critical secret that has to stay hidden. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader Signed-off-by: Jamie Strandboge --- src/security

[PATCH 6/8] apparmor: allow virt-aa-helper to read from tmp

2020-08-03 Thread Christian Ehrhardt
properly probe them e.g. for further backing files in the case of qcow2. Signed-off-by: Christian Ehrhardt --- src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in b/src/security/apparmor

[PATCH 5/8] apparmor: qemu access to @{PROC}/*/auxv for hw_cap

2020-08-03 Thread Christian Ehrhardt
From: Stefan Bader On some architectures (ppc, s390x, sparc, arm) qemu will read auxv to detect hardware capabilities via qemu_getauxval. Allow that access read-only for the entry owned by the current qemu process. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader --- src

[PATCH 2/8] apparmor: allow libvirtd to call pygrub

2020-08-03 Thread Christian Ehrhardt
]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931768 [2]: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1326003 Signed-off-by: Christian Ehrhardt --- src/security/apparmor/usr.sbin.libvirtd.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/security/apparmor

[PATCH 0/8] Further Debian/Ubuntu Apparmor Delta

2020-08-03 Thread Christian Ehrhardt
so one can understand the case a commit tries to fix without knowing too much context. Christian Ehrhardt (2): apparmor: allow virt-aa-helper nameservices apparmor: let qemu load old shared objects after upgrades Jamie Strandboge (1): apparmor: read only access to overcommit_memory Sam

[PATCH 8/8] apparmor: let qemu load old shared objects after upgrades

2020-08-03 Thread Christian Ehrhardt
feature load [2] after package upgrades. [1]: https://github.com/qemu/qemu/commit/bd83c861 [2]: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1847361 Signed-off-by: Christian Ehrhardt --- src/security/apparmor/libvirt-qemu | 5 + 1 file changed, 5 insertions(+) diff --git a/src

[PATCH 1/8] apparmor: allow default pki path

2020-08-03 Thread Christian Ehrhardt
://www.qemu.org/docs/master/system/tls.html [2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930100 Signed-off-by: Christian Ehrhardt --- src/security/apparmor/libvirt-qemu | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt

  1   2   3   4   5   >