Re: [libvirt] [PATCH 8/8] apparmor, libvirt-qemu: Add ppc64el related changes

2017-05-22 Thread Stefan Bader
On 22.05.2017 15:12, Andrea Bolognani wrote:
> On Thu, 2017-05-18 at 10:53 +0200, Stefan Bader wrote:
>> @@ -102,6 +103,7 @@
>> /usr/bin/qemu-system-or32 rmix,
>> /usr/bin/qemu-system-ppc rmix,
>> /usr/bin/qemu-system-ppc64 rmix,
>> +  /usr/bin/qemu-system-ppc64le rmix,
> 
> Why does Ubuntu have qemu-system-ppc64le at all?

Hm, apparently it is not really there. It is a soft-link to qemu-system-ppc64.
So that hunk really makes no sense because apparmor is following the link before
checking permissions.

I will refresh that one to drop the ppc64le path.

-Stefan
> 
> qemu-system-ppc64 can run both ppc64 and ppc64le guests just
> fine, it's emulating the same hardware and the endianness is
> decided at runtime AFAIK.
> 
> Upstream QEMU doesn't seem to know anything about this:
> 
>   $ ./configure --target-list=ppc64le-softmmu
>   ERROR: Unknown target name 'ppc64le-softmmu'
> 
> and it's not in the Debian package, so it must have been
> added specifically for Ubuntu.
> 
> -- 
> Andrea Bolognani / Red Hat / Virtualization
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
> 




signature.asc
Description: OpenPGP digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 8/8] apparmor, libvirt-qemu: Add ppc64el related changes

2017-05-22 Thread Andrea Bolognani
On Thu, 2017-05-18 at 10:53 +0200, Stefan Bader wrote:
> @@ -102,6 +103,7 @@
>/usr/bin/qemu-system-or32 rmix,
>/usr/bin/qemu-system-ppc rmix,
>/usr/bin/qemu-system-ppc64 rmix,
> +  /usr/bin/qemu-system-ppc64le rmix,

Why does Ubuntu have qemu-system-ppc64le at all?

qemu-system-ppc64 can run both ppc64 and ppc64le guests just
fine, it's emulating the same hardware and the endianness is
decided at runtime AFAIK.

Upstream QEMU doesn't seem to know anything about this:

  $ ./configure --target-list=ppc64le-softmmu
  ERROR: Unknown target name 'ppc64le-softmmu'

and it's not in the Debian package, so it must have been
added specifically for Ubuntu.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 8/8] apparmor, libvirt-qemu: Add ppc64el related changes

2017-05-22 Thread Stefan Bader
On 19.05.2017 11:03, Christian Ehrhardt wrote:
> 
> On Fri, May 19, 2017 at 9:55 AM, Guido Günther  > wrote:
> 
> LGTM but I don't know much about PPC64, it's SLOF and where the device
> tree should be located.
> 
> 
> Hi those paths for SLOF are the default one for Debian/Ubuntu at least.
> $ dpkg -L qemu-slof
> /.
> /usr
> /usr/share
> /usr/share/doc
> /usr/share/doc/qemu-slof
> /usr/share/doc/qemu-slof/copyright
> /usr/share/doc/qemu-slof/changelog.Debian.gz
> /usr/share/slof
> /usr/share/slof/spapr-rtas.bin
> /usr/share/slof/slof.bin
> 
> The other paths are kernel owned and match the current state:
> (the proc path is a symlink today, not sure if it was a real path back in 
> history)
> $ ll /proc/device-tree
> lrwxrwxrwx 1 root root 29 Mai 19 08:59 /proc/device-tree ->
> /sys/firmware/devicetree/base/
> $ ll  /sys/firmware/devicetree/
> total 0
> drwxr-xr-x  3 root root 0 Mai 19 08:57 ./
> drwxr-xr-x  4 root root 0 Mai 19 08:57 ../
> drwxr-xr-x 51 root root 0 Mai 19 08:57 base/
> (there is much more under this path, but the rule is ** for a reason)
> 
> Hope that helps,

Was that explanation sufficient?

-Stefan

> Christian
> 
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
> 




signature.asc
Description: OpenPGP digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 8/8] apparmor, libvirt-qemu: Add ppc64el related changes

2017-05-19 Thread Christian Ehrhardt
On Fri, May 19, 2017 at 9:55 AM, Guido Günther  wrote:

> LGTM but I don't know much about PPC64, it's SLOF and where the device
> tree should be located.
>

Hi those paths for SLOF are the default one for Debian/Ubuntu at least.
$ dpkg -L qemu-slof
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/qemu-slof
/usr/share/doc/qemu-slof/copyright
/usr/share/doc/qemu-slof/changelog.Debian.gz
/usr/share/slof
/usr/share/slof/spapr-rtas.bin
/usr/share/slof/slof.bin

The other paths are kernel owned and match the current state:
(the proc path is a symlink today, not sure if it was a real path back in
history)
$ ll /proc/device-tree
lrwxrwxrwx 1 root root 29 Mai 19 08:59 /proc/device-tree ->
/sys/firmware/devicetree/base/
$ ll  /sys/firmware/devicetree/
total 0
drwxr-xr-x  3 root root 0 Mai 19 08:57 ./
drwxr-xr-x  4 root root 0 Mai 19 08:57 ../
drwxr-xr-x 51 root root 0 Mai 19 08:57 base/
(there is much more under this path, but the rule is ** for a reason)

Hope that helps,
Christian
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 8/8] apparmor, libvirt-qemu: Add ppc64el related changes

2017-05-19 Thread Guido Günther
On Thu, May 18, 2017 at 10:53:46AM +0200, Stefan Bader wrote:
> From: Serge Hallyn 
> 
> Updates profile to allow running on ppc64el.
> 
> Bug-Ubuntu: https://bugs.launchpad.net/bugs/1374554
> 
> Signed-off-by: Christian Ehrhardt 
> Signed-off-by: Stefan Bader 
> ---
>  examples/apparmor/libvirt-qemu | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/examples/apparmor/libvirt-qemu b/examples/apparmor/libvirt-qemu
> index f04ce04..2791dfc 100644
> --- a/examples/apparmor/libvirt-qemu
> +++ b/examples/apparmor/libvirt-qemu
> @@ -77,6 +77,7 @@
>/usr/share/OVMF/** r,
>/usr/share/AAVMF/** r,
>/usr/share/qemu-efi/** r,
> +  /usr/share/slof/** r,
>  
># access PKI infrastructure
>/etc/pki/libvirt-vnc/** r,
> @@ -102,6 +103,7 @@
>/usr/bin/qemu-system-or32 rmix,
>/usr/bin/qemu-system-ppc rmix,
>/usr/bin/qemu-system-ppc64 rmix,
> +  /usr/bin/qemu-system-ppc64le rmix,
>/usr/bin/qemu-system-ppcemb rmix,
>/usr/bin/qemu-system-s390x rmix,
>/usr/bin/qemu-system-sh4 rmix,
> @@ -158,3 +160,8 @@
>/etc/udev/udev.conf r,
>/sys/bus/ r,
>/sys/class/ r,
> +
> +  # for ppc device-tree access
> +  @{PROC}/device-tree/ r,
> +  @{PROC}/device-tree/** r,
> +  /sys/firmware/devicetree/** r,
> -- 
> 2.7.4

LGTM but I don't know much about PPC64, it's SLOF and where the device
tree should be located.
Cheers,
 -- Guido

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list