SELinux-Refpolicy Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] xen: Allow xenstored to map /proc/xen/xsd_kva
@ 2020-07-14 13:20 Anthony PERARD
  2020-07-16 13:37 ` Chris PeBenito
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony PERARD @ 2020-07-14 13:20 UTC (permalink / raw)
  To: selinux-refpolicy; +Cc: Anthony PERARD

xenstored is using mmap() on /proc/xen/xsd_kva, and when the SELinux
boolean "domain_can_mmap_files" in CentOS is set to false the mmap()
call fails.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 policy/modules/system/xen.te | 1 +
 1 file changed, 1 insertion(+)

diff --git a/policy/modules/system/xen.te b/policy/modules/system/xen.te
index 1b91b5cbc82a..b3df1f627804 100644
--- a/policy/modules/system/xen.te
+++ b/policy/modules/system/xen.te
@@ -459,6 +459,7 @@ files_read_usr_files(xenstored_t)
 
 fs_search_xenfs(xenstored_t)
 fs_manage_xenfs_files(xenstored_t)
+allow xenstored_t xenfs_t:file map;
 
 term_use_generic_ptys(xenstored_t)
 
-- 
Anthony PERARD


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xen: Allow xenstored to map /proc/xen/xsd_kva
  2020-07-14 13:20 [PATCH] xen: Allow xenstored to map /proc/xen/xsd_kva Anthony PERARD
@ 2020-07-16 13:37 ` Chris PeBenito
  0 siblings, 0 replies; 2+ messages in thread
From: Chris PeBenito @ 2020-07-16 13:37 UTC (permalink / raw)
  To: Anthony PERARD, selinux-refpolicy

On 7/14/20 9:20 AM, Anthony PERARD wrote:
> xenstored is using mmap() on /proc/xen/xsd_kva, and when the SELinux
> boolean "domain_can_mmap_files" in CentOS is set to false the mmap()
> call fails.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
>   policy/modules/system/xen.te | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/policy/modules/system/xen.te b/policy/modules/system/xen.te
> index 1b91b5cbc82a..b3df1f627804 100644
> --- a/policy/modules/system/xen.te
> +++ b/policy/modules/system/xen.te
> @@ -459,6 +459,7 @@ files_read_usr_files(xenstored_t)
>   
>   fs_search_xenfs(xenstored_t)
>   fs_manage_xenfs_files(xenstored_t)
> +allow xenstored_t xenfs_t:file map;
>   
>   term_use_generic_ptys(xenstored_t)

You need to add an interface in filesystem.if that allows the caller to map 
xenfs files and call it from xen.te.

-- 
Chris PeBenito

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 13:20 [PATCH] xen: Allow xenstored to map /proc/xen/xsd_kva Anthony PERARD
2020-07-16 13:37 ` Chris PeBenito

SELinux-Refpolicy Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux-refpolicy/0 selinux-refpolicy/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux-refpolicy selinux-refpolicy/ https://lore.kernel.org/selinux-refpolicy \
		selinux-refpolicy@vger.kernel.org
	public-inbox-index selinux-refpolicy

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux-refpolicy


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git