All of lore.kernel.org
 help / color / mirror / Atom feed
From: grzegorz.andrejczuk@intel.com (gandrejc)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [Patch V2 1/1] Update refpolicy to handle hwloc
Date: Wed, 27 Apr 2016 17:21:54 +0200	[thread overview]
Message-ID: <1461770515-13153-1-git-send-email-grzegorz.andrejczuk@intel.com> (raw)
In-Reply-To: <1461745535-6857-1-git-send-email-grzegorz.andrejczuk@intel.com>

The Portable Hardware Locality (hwloc) software package provides a
portable abstraction (across OS, versions, architectures, ...) of the
hierarchical topology of modern architectures, including NUMA memory
nodes, sockets, shared caches, cores and simultaneous multithreading. It
also gathers various system attributes such as cache and memory
information as well as the locality of I/O devices such as network
interfaces, InfiniBand HCAs or GPUs.

Following changes enable:
- add interface to change dirs in /var/run
- add optional policies for hwloc-dump-hwdata

Signed-off-by: Grzegorz Andrejczuk <grzegorz.andrejczuk@intel.com>
---
 policy/modules/kernel/files.if      | 19 +++++++++++++++++++
 policy/modules/roles/sysadm.te      |  5 +++++
 policy/modules/system/userdomain.if |  5 +++++
 3 files changed, 29 insertions(+)

diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if
index fc007b4..d942d8a 100644
--- a/policy/modules/kernel/files.if
+++ b/policy/modules/kernel/files.if
@@ -6077,6 +6077,25 @@ interface(`files_dontaudit_getattr_pid_dirs',`
 
 ########################################
 ## <summary>
+##	Read and write generic runtime directories.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`files_rw_pid_dirs',`
+	gen_require(`
+		type var_run_t;
+	')
+
+	files_search_var($1)
+	rw_dirs_pattern($1, var_run_t, var_run_t)
+')
+
+########################################
+## <summary>
 ##	Set the attributes of the /var/run directory.
 ## </summary>
 ## <param name="domain">
diff --git a/policy/modules/roles/sysadm.te b/policy/modules/roles/sysadm.te
index ceaa4cb..807c139 100644
--- a/policy/modules/roles/sysadm.te
+++ b/policy/modules/roles/sysadm.te
@@ -458,6 +458,11 @@ optional_policy(`
 ')
 
 optional_policy(`
+	hwloc_manage_runtime(sysadm_t)
+	hwloc_run_hwloc_dhwd(sysadm_t, sysadm_r)
+')
+
+optional_policy(`
 	howl_admin(sysadm_t, sysadm_r)
 ')
 
diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if
index cbb6e09..0a46fda 100644
--- a/policy/modules/system/userdomain.if
+++ b/policy/modules/system/userdomain.if
@@ -619,6 +619,11 @@ template(`userdom_common_user_template',`
 	')
 
 	optional_policy(`
+		hwloc_exec_hwloc_dhwd($1_t)
+		hwloc_read_runtime_files($1_t)
+	')
+
+	optional_policy(`
 		inetd_use_fds($1_t)
 		inetd_rw_tcp_sockets($1_t)
 	')
-- 
2.5.1

--------------------------------------------------------------------

Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.

  parent reply	other threads:[~2016-04-27 15:21 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27  8:25 [refpolicy] [PATCH 1/1] Add hwloc-dump-hwdata SELinux policy gandrejc
2016-04-27  9:40 ` Dominick Grift
2016-04-27  9:42   ` Dominick Grift
2016-04-27 10:35 ` [refpolicy] [PATCH] Add hwloc skel Dominick Grift
2016-04-27 10:36 ` [refpolicy] [PATCH] Add support for hwloc Dominick Grift
2016-04-27 10:59 ` [refpolicy] [PATCH 1/1] Add hwloc-dump-hwdata SELinux policy Dominick Grift
2016-04-27 13:07   ` Andrejczuk, Grzegorz
2016-04-27 13:12     ` Dominick Grift
2016-04-27 15:21 ` gandrejc [this message]
2016-04-27 15:21   ` [refpolicy] [Patch V2 " gandrejc
2016-04-27 16:47     ` Jason Zaman
2016-04-27 16:51       ` Dominick Grift
2016-04-27 16:56         ` Dominick Grift
2016-04-27 17:33     ` Christopher J. PeBenito
2016-04-27 17:42       ` Dominick Grift
2016-04-27 18:09         ` Christopher J. PeBenito
2016-04-27 18:12           ` Dominick Grift
2016-04-27 18:30           ` Dominick Grift
2016-04-27 18:39             ` Christopher J. PeBenito
2016-04-27 18:44               ` Dominick Grift
2016-04-28 10:02     ` [refpolicy] [PATCH V3] " Dominick Grift
2016-04-27 19:17   ` [refpolicy] [Patch V2 1/1] Update refpolicy to handle hwloc Dominick Grift
2016-04-28  8:24     ` Andrejczuk, Grzegorz
2016-04-28  8:56       ` Dominick Grift
2016-05-02  8:33         ` Andrejczuk, Grzegorz
2016-04-28 10:04   ` [refpolicy] [PATCH] " Dominick Grift
2016-05-02 12:33     ` Christopher J. PeBenito
2016-04-28 10:06   ` [refpolicy] [PATCH V3 RESENT] " Dominick Grift
2016-05-02 12:33     ` Christopher J. PeBenito

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461770515-13153-1-git-send-email-grzegorz.andrejczuk@intel.com \
    --to=grzegorz.andrejczuk@intel.com \
    --cc=refpolicy@oss.tresys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.