2018-06-23 13:00:56 +00:00
|
|
|
## <summary>Dump topology and locality information from hardware tables.</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute hwloc dhwd in the hwloc dhwd domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`hwloc_domtrans_dhwd',`
|
|
|
|
gen_require(`
|
|
|
|
type hwloc_dhwd_t, hwloc_dhwd_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
domtrans_pattern($1, hwloc_dhwd_exec_t, hwloc_dhwd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute hwloc dhwd in the hwloc dhwd domain, and
|
|
|
|
## allow the specified role the hwloc dhwd domain,
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`hwloc_run_dhwd',`
|
|
|
|
gen_require(`
|
|
|
|
attribute_role hwloc_dhwd_roles;
|
|
|
|
')
|
|
|
|
|
|
|
|
hwloc_domtrans_dhwd($1)
|
|
|
|
roleattribute $2 hwloc_dhwd_roles;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute hwloc dhwd in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`hwloc_exec_dhwd',`
|
|
|
|
gen_require(`
|
|
|
|
type hwloc_dhwd_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
can_exec($1, hwloc_dhwd_exec_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read hwloc runtime files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`hwloc_read_runtime_files',`
|
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type hwloc_runtime_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
files_search_pids($1)
|
2019-09-08 20:55:02 +00:00
|
|
|
read_files_pattern($1, hwloc_runtime_t, hwloc_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## All of the rules required to
|
|
|
|
## administrate an hwloc environment.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`hwloc_admin',`
|
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type hwloc_dhwd_t, hwloc_runtime_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 hwloc_dhwd_t:process { ptrace signal_perms };
|
|
|
|
ps_process_pattern($1, hwloc_dhwd_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
admin_pattern($1, hwloc_runtime_t)
|
|
|
|
files_pid_filetrans($1, hwloc_runtime_t, dir, "hwloc")
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|