sepolicy: Add rules for mediatek mali memtrack HAL

Change-Id: I0591fea2c492ea2a5613b9af17bcc1384fd31b76
diff --git a/basic/non_plat/file_contexts b/basic/non_plat/file_contexts
index 8370596..f5d07aa 100644
--- a/basic/non_plat/file_contexts
+++ b/basic/non_plat/file_contexts
@@ -988,3 +988,6 @@
 # Power
 /(vendor|system/vendor)/bin/hw/android\.hardware\.power-service\.mediatek-libperfmgr      u:object_r:hal_power_default_exec:s0
 /(vendor|system/vendor)/bin/hw/vendor\.mediatek\.hardware\.mtkpower@1\.2-service\.stub    u:object_r:mtk_hal_power_exec:s0
+
+# Memtrack
+/(vendor|system/vendor)/bin/hw/android\.hardware\.memtrack-service\.mediatek-mali         u:object_r:hal_memtrack_default_exec:s0
diff --git a/basic/non_plat/genfs_contexts b/basic/non_plat/genfs_contexts
index ddbcc01..72d38de 100644
--- a/basic/non_plat/genfs_contexts
+++ b/basic/non_plat/genfs_contexts
@@ -664,3 +664,8 @@
 
 # Vibrator
 genfscon sysfs /kernel/thunderquake_engine    u:object_r:sysfs_vibrator:s0
+
+# GPU
+genfscon sysfs /devices/platform/13040000.mali/dma_buf_gpu_mem u:object_r:sysfs_gpu:s0
+genfscon sysfs /devices/platform/13040000.mali/kprcs u:object_r:sysfs_gpu:s0
+genfscon sysfs /devices/platform/13040000.mali/total_gpu_mem u:object_r:sysfs_gpu:s0
diff --git a/basic/non_plat/hal_memtrack_default.te b/basic/non_plat/hal_memtrack_default.te
new file mode 100644
index 0000000..7554c6f
--- /dev/null
+++ b/basic/non_plat/hal_memtrack_default.te
@@ -0,0 +1 @@
+r_dir_file(hal_memtrack_default, sysfs_gpu)