From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 23E22138BEF for ; Sun, 11 Oct 2015 10:48:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6546421C058; Sun, 11 Oct 2015 10:48:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3EDDEE0851 for ; Sun, 11 Oct 2015 10:48:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2735B340685 for ; Sun, 11 Oct 2015 10:48:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5FCE2DF1 for ; Sun, 11 Oct 2015 10:48:35 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1442731978.1b899c0409bfc59f0ff4c03259d658578902b9b3.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/virt.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 1b899c0409bfc59f0ff4c03259d658578902b9b3 X-VCS-Branch: next Date: Sun, 11 Oct 2015 10:48:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3fdaf28b-df76-4ac1-b379-e43c5da3c1b8 X-Archives-Hash: dd2b5ebd4d7d2e15c23b48f5c9353e14 commit: 1b899c0409bfc59f0ff4c03259d658578902b9b3 Author: Alexander Wetzel web de> AuthorDate: Sat Sep 5 07:41:47 2015 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Sep 20 06:52:58 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=1b899c04 add vfio support for libvirt Signed-off-by: Alexander Wetzel web.de> policy/modules/contrib/virt.te | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/policy/modules/contrib/virt.te b/policy/modules/contrib/virt.te index 2966d29..881560f 100644 --- a/policy/modules/contrib/virt.te +++ b/policy/modules/contrib/virt.te @@ -70,6 +70,14 @@ gen_tunable(virt_use_usb, false) ## gen_tunable(virt_use_xserver, false) +## +###

+### Determine whether confined virtual guests +### can use vfio for pci device pass through (vt-d). +###

+###
+gen_tunable(virt_use_vfio, false) + attribute virt_ptynode; attribute virt_domain; attribute virt_image_type; @@ -438,6 +446,10 @@ corenet_tcp_bind_all_ports(svirt_t) corenet_sendrecv_all_client_packets(svirt_t) corenet_tcp_connect_all_ports(svirt_t) +tunable_policy(`virt_use_vfio',` + dev_rw_vfio_dev(svirt_t) +') + ######################################## # # virtd local policy @@ -682,6 +694,13 @@ tunable_policy(`virt_use_samba',` fs_read_cifs_symlinks(virtd_t) ') +tunable_policy(`virt_use_vfio',` + allow virtd_t self:capability sys_resource; + allow virtd_t self:process setrlimit; + allow virtd_t svirt_t:process rlimitinh; + dev_relabelfrom_vfio_dev(virtd_t) +') + optional_policy(` brctl_domtrans(virtd_t) ') From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 89A8F1384AE for ; Sun, 20 Sep 2015 07:00:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 78C1021C021; Sun, 20 Sep 2015 07:00:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EF60E21C02A for ; Sun, 20 Sep 2015 07:00:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BEA9E3406BF for ; Sun, 20 Sep 2015 07:00:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0E00D204 for ; Sun, 20 Sep 2015 07:00:14 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1442731978.1b899c0409bfc59f0ff4c03259d658578902b9b3.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/virt.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 1b899c0409bfc59f0ff4c03259d658578902b9b3 X-VCS-Branch: master Date: Sun, 20 Sep 2015 07:00:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 708cc707-00ba-461c-9305-e8360cf3ea7d X-Archives-Hash: bf16cc054e1aa7fce78cf91594fc6c07 Message-ID: <20150920070014.T5ij6ZC-d9GC4iJdM3j8Tvuvh72SLZANdA-9Fhz7k3Y@z> commit: 1b899c0409bfc59f0ff4c03259d658578902b9b3 Author: Alexander Wetzel web de> AuthorDate: Sat Sep 5 07:41:47 2015 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Sep 20 06:52:58 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=1b899c04 add vfio support for libvirt Signed-off-by: Alexander Wetzel web.de> policy/modules/contrib/virt.te | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/policy/modules/contrib/virt.te b/policy/modules/contrib/virt.te index 2966d29..881560f 100644 --- a/policy/modules/contrib/virt.te +++ b/policy/modules/contrib/virt.te @@ -70,6 +70,14 @@ gen_tunable(virt_use_usb, false) ## gen_tunable(virt_use_xserver, false) +## +###

+### Determine whether confined virtual guests +### can use vfio for pci device pass through (vt-d). +###

+###
+gen_tunable(virt_use_vfio, false) + attribute virt_ptynode; attribute virt_domain; attribute virt_image_type; @@ -438,6 +446,10 @@ corenet_tcp_bind_all_ports(svirt_t) corenet_sendrecv_all_client_packets(svirt_t) corenet_tcp_connect_all_ports(svirt_t) +tunable_policy(`virt_use_vfio',` + dev_rw_vfio_dev(svirt_t) +') + ######################################## # # virtd local policy @@ -682,6 +694,13 @@ tunable_policy(`virt_use_samba',` fs_read_cifs_symlinks(virtd_t) ') +tunable_policy(`virt_use_vfio',` + allow virtd_t self:capability sys_resource; + allow virtd_t self:process setrlimit; + allow virtd_t svirt_t:process rlimitinh; + dev_relabelfrom_vfio_dev(virtd_t) +') + optional_policy(` brctl_domtrans(virtd_t) ')