Skip to contentSkip to conversation

xen: Allow xenstored to map /proc/xen/xsd_kva

PATCH Superseded Anthony PERARD 2 participants 2 messages Jul 14, 2020 – Jul 16, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: Allow xenstored to map /proc/xen/xsd_kva

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.

---
 policy/modules/system/xen.te | 1 +
 1 file changed, 1 insertion(+)
policy/modules/system/xen.te +1 -0
index 1b91b5cbc82a..b3df1f627804 100644
@@ -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)
 
Signature · 1 line
Anthony PERARD
#1 lore raw
Quoted 14 lines · 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.

---
  policy/modules/system/xen.te | 1 +
  1 file changed, 1 insertion(+)
policy/modules/system/xen.te +0 -0
index 1b91b5cbc82a..b3df1f627804 100644

policy/modules/system/xen.te files_read_usr_files(xenstored_t) · line 464

Quoted 6 lines
policy/modules/system/xen.te +1 -0
@@ -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.

Signature · 1 line
Chris PeBenito