Skip to contentSkip to conversation

Initial pstore support:

PATCH Superseded Dominick Grift 1 participant 1 message Sep 11, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Initial pstore support:

Generic interface to platform dependent persistent storage
https://www.kernel.org/doc/Documentation/ABI/testing/pstore

This basically works pretty much the same as cgroup file systems from a SELinux perspective

the genfscon ensures that initial labeling is correct, so we do not have to specify a file context explicitly, instead just use <<none>>

The same applies to /sys/fs/cgroup

I also removed the files_type() calls as they are duplicate (it is already called in files_mountpoint)

policy/modules/kernel/filesystem.fc +5 -3
index 3d67e80..50db308 100644
@@ -11,9 +11,11 @@
 /lib/udev/devices/shm	-d	gen_context(system_u:object_r:tmpfs_t,s0)
 /lib/udev/devices/shm/.*	<<none>>
 
-# for systemd systems:
-/sys/fs/cgroup		-d	gen_context(system_u:object_r:cgroup_t,s0)
-/sys/fs/cgroup/.*		<<none>>
+/sys/fs/cgroup	-d	<<none>>
+/sys/fs/cgroup/.*	<<none>>
+
+/sys/fs/pstore	-d	<<none>>
+/sys/fs/pstore/.*	<<none>>
 
 ifdef(`distro_debian',`
 /var/run/shm		-d	gen_context(system_u:object_r:tmpfs_t,s0)
policy/modules/kernel/filesystem.te +7 -2
index 1c66416..8f1fc04 100644
@@ -70,9 +70,8 @@
 
 type cgroup_t;
 fs_type(cgroup_t)
-files_type(cgroup_t)
 files_mountpoint(cgroup_t)
-dev_associate_sysfs(cgroup_t) # only for systemd systems
+dev_associate_sysfs(cgroup_t)
 genfscon cgroup / gen_context(system_u:object_r:cgroup_t,s0)
 
 type configfs_t;
@@ -125,6 +124,12 @@
 fs_type(oprofilefs_t)
 genfscon oprofilefs / gen_context(system_u:object_r:oprofilefs_t,s0)
 
+type pstore_t;
+fs_type(pstore_t)
+files_mountpoint(pstore_t)
+dev_associate_sysfs(pstore_t)
+genfscon pstore / gen_context(system_u:object_r:pstore_t,s0)
+
 type ramfs_t;
 fs_type(ramfs_t)
 files_mountpoint(ramfs_t)