Skip to contentSkip to conversation

Allow hugetlbfs_t to be associated to /dev

PATCH Superseded Laurent Bigonville 2 participants 3 messages Apr 16, 2014 – Apr 21, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow hugetlbfs_t to be associated to /dev

From: Laurent Bigonville <[email protected]>

Even if there is not FHS provision for this, systemd is using /dev/hugepages to mount the hugetlbfs fs by default.

The needed file contexts are already present

---
 policy/modules/kernel/filesystem.te | 1 +
 1 file changed, 1 insertion(+)
policy/modules/kernel/filesystem.te +1 -0
index e7e34bf..c8b7e26 100644
@@ -98,6 +98,7 @@ type hugetlbfs_t;
 fs_xattr_type(hugetlbfs_t)
 files_mountpoint(hugetlbfs_t)
 fs_use_trans hugetlbfs gen_context(system_u:object_r:hugetlbfs_t,s0);
+dev_associate(hugetlbfs_t)
 
 type ibmasmfs_t;
 fs_type(ibmasmfs_t)
Signature · 1 line
1.9.2
#1 lore raw

PATCH v2 1/1 Allow hugetlbfs_t to be associated to /dev

From: Laurent Bigonville <[email protected]>

Even if there is not FHS provision for this, systemd is using /dev/hugepages to mount the hugetlbfs fs by default.

The needed file contexts are already present

---
 policy/modules/kernel/filesystem.te | 1 +
 1 file changed, 1 insertion(+)
policy/modules/kernel/filesystem.te +1 -0
index e7e34bf..7a44522 100644
@@ -97,6 +97,7 @@ genfscon futexfs / gen_context(system_u:object_r:futexfs_t,s0)
 type hugetlbfs_t;
 fs_xattr_type(hugetlbfs_t)
 files_mountpoint(hugetlbfs_t)
+dev_associate(hugetlbfs_t)
 fs_use_trans hugetlbfs gen_context(system_u:object_r:hugetlbfs_t,s0);
 
 type ibmasmfs_t;
Signature · 1 line
1.9.2
#2 lore raw

PATCH v2 1/1 Allow hugetlbfs_t to be associated to /dev

Quoted 15 lines · Laurent Bigonville

From: Laurent Bigonville <[email protected]>

Even if there is not FHS provision for this, systemd is using /dev/hugepages to mount the hugetlbfs fs by default.

The needed file contexts are already present

---
 policy/modules/kernel/filesystem.te | 1 +
 1 file changed, 1 insertion(+)
policy/modules/kernel/filesystem.te +0 -0
index e7e34bf..7a44522 100644

policy/modules/kernel/filesystem.te genfscon futexfs / gen_context(system_u:object_r:futexfs_t,s0) · line 103

Quoted 7 lines
policy/modules/kernel/filesystem.te +1 -0
@@ -97,6 +97,7 @@ genfscon futexfs / gen_context(system_u:object_r:futexfs_t,s0)
 type hugetlbfs_t;
 fs_xattr_type(hugetlbfs_t)
 files_mountpoint(hugetlbfs_t)
+dev_associate(hugetlbfs_t)
 fs_use_trans hugetlbfs gen_context(system_u:object_r:hugetlbfs_t,s0);
 
 type ibmasmfs_t;

Merged.

Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com