summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2016-07-28 19:32:32 (GMT)
committerRob Herring <robh@kernel.org>2016-07-28 20:59:33 (GMT)
commit3df718813e904215bcd993ebb295431ce46f11da (patch)
treec04d01f43d091862a542418ed3aadb7fa3f63251
parent5c8168e1eaa9bf5adef434b84e9773aaf874d225 (diff)
downloadandroid-device-linaro-generic-3df718813e904215bcd993ebb295431ce46f11da.tar.gz
android-device-linaro-generic-3df718813e904215bcd993ebb295431ce46f11da.tar.xz
graphics: Add selinux policy files for sw_sync
Eventually these can be removed once DRM explicit fence support is in place. Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r--graphics/drm/device.mk3
-rw-r--r--graphics/drm/sepolicy/file.te1
-rw-r--r--graphics/drm/sepolicy/file_contexts3
-rw-r--r--graphics/drm/sepolicy/surfaceflinger.te1
4 files changed, 8 insertions, 0 deletions
diff --git a/graphics/drm/device.mk b/graphics/drm/device.mk
index 07824d5..b88e453 100644
--- a/graphics/drm/device.mk
+++ b/graphics/drm/device.mk
@@ -3,3 +3,6 @@ PRODUCT_PACKAGES += drm.rc
PRODUCT_PACKAGES += \
libGLES_mesa \
gralloc.drm
+
+BOARD_SEPOLICY_DIRS += \
+ device/linaro/generic/graphics/drm/sepolicy
diff --git a/graphics/drm/sepolicy/file.te b/graphics/drm/sepolicy/file.te
new file mode 100644
index 0000000..0db8b94
--- /dev/null
+++ b/graphics/drm/sepolicy/file.te
@@ -0,0 +1 @@
+type sync_file, fs_type, debugfs_type;
diff --git a/graphics/drm/sepolicy/file_contexts b/graphics/drm/sepolicy/file_contexts
new file mode 100644
index 0000000..b9e1840
--- /dev/null
+++ b/graphics/drm/sepolicy/file_contexts
@@ -0,0 +1,3 @@
+/dev/sw_sync u:object_r:graphics_device:s0
+/sys/kernel/debug/sync u:object_r:device:s0
+/sys/kernel/debug/sync(/.*)? u:object_r:sync_file:s0
diff --git a/graphics/drm/sepolicy/surfaceflinger.te b/graphics/drm/sepolicy/surfaceflinger.te
new file mode 100644
index 0000000..9849b7b
--- /dev/null
+++ b/graphics/drm/sepolicy/surfaceflinger.te
@@ -0,0 +1 @@
+allow surfaceflinger sync_file:file rw_file_perms;