Merge "Label gpuclk as sysfs_thermal file and add perms."
diff --git a/sepolicy/app.te b/sepolicy/app.te
index d5d0e8d..a184cf6 100644
--- a/sepolicy/app.te
+++ b/sepolicy/app.te
@@ -1,2 +1 @@
-# Grant access to qmux socket that is created by rild
-allow radio rild_qmuxd_socket:sock_file rw_file_perms;
+allow appdomain sysfs_thermal:file r_file_perms;
diff --git a/sepolicy/bootanim.te b/sepolicy/bootanim.te
new file mode 100644
index 0000000..8e44660
--- /dev/null
+++ b/sepolicy/bootanim.te
@@ -0,0 +1 @@
+allow bootanim sysfs_thermal:file r_file_perms;
diff --git a/sepolicy/file.te b/sepolicy/file.te
index 7595419..46bd5eb 100644
--- a/sepolicy/file.te
+++ b/sepolicy/file.te
@@ -26,3 +26,4 @@
 type sysfs_mpdecision, fs_type, sysfs_type;
 type sysfs_surfaceflinger, fs_type, sysfs_type;
 type sysfs_smdcntl_open_timeout, fs_type, sysfs_type;
+type sysfs_thermal, sysfs_type, fs_type;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index d6a337a..00a70cb 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -149,6 +149,9 @@
 /sys/devices/virtual/graphics/fb1/vendor_name  -- u:object_r:sysfs_surfaceflinger:s0
 /sys/devices/virtual/graphics/fb1/product_description       -- u:object_r:sysfs_surfaceflinger:s0
 
+/sys/devices/fdb00000\.qcom,kgsl-3d0/kgsl/kgsl-3d0/gpuclk        u:object_r:sysfs_thermal:s0
+/sys/devices/fdb00000\.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk    u:object_r:sysfs_thermal:s0
+
 # Sysfs files used by qmuxd
 /sys/devices/virtual/smdpkt/smdcntl([0-9])+/open_timeout u:object_r:sysfs_smdcntl_open_timeout:s0
 
diff --git a/sepolicy/radio.te b/sepolicy/radio.te
index 229051b..2d8e62f 100644
--- a/sepolicy/radio.te
+++ b/sepolicy/radio.te
@@ -1,2 +1,5 @@
 # Talk to qmuxd (/dev/socket/qmux_radio)
 qmux_socket(radio)
+
+# Grant access to qmux socket that is created by rild
+allow radio rild_qmuxd_socket:sock_file rw_file_perms;
diff --git a/sepolicy/surfaceflinger.te b/sepolicy/surfaceflinger.te
index 6d10487..02adf8a 100644
--- a/sepolicy/surfaceflinger.te
+++ b/sepolicy/surfaceflinger.te
@@ -1 +1,2 @@
 allow surfaceflinger sysfs_surfaceflinger:file rw_file_perms;
+allow surfaceflinger sysfs_thermal:file r_file_perms;
diff --git a/sepolicy/system_server.te b/sepolicy/system_server.te
index ca327da..782af9b 100644
--- a/sepolicy/system_server.te
+++ b/sepolicy/system_server.te
@@ -23,3 +23,5 @@
 # Reading from /persist/wifi/.macaddr
 allow system_server persist_file:dir r_dir_perms;
 r_dir_file(system_server, persist_wifi_file)
+
+allow system_server sysfs_thermal:file r_file_perms;