gs201-sepolicy: pixelstats: enable pixelstats access to perf-metrics

enable pixelstats access to sysfs path, define sysfs_perfmetrics

Bug: 227809911
Bug: 232541623
Test: Tested perf-metrics
Signed-off-by: Ziyi Cui <ziyic@google.com>
Change-Id: If1b95148b59a6816c6795921018dfae68d80550b
This commit is contained in:
Ziyi Cui 2022-10-21 14:59:31 -07:00
parent 5d03dcc5cf
commit e43c8b3913
3 changed files with 11 additions and 0 deletions

View file

@ -113,3 +113,6 @@ type sysfs_usbc_throttling_stats, sysfs_type, fs_type;
# Touch
type proc_touch, proc_type, fs_type;
#perf-metrics
type sysfs_vendor_metrics, fs_type, sysfs_type;

View file

@ -384,6 +384,10 @@ genfscon sysfs /module/gs_thermal/parameters u:object_r:sysfs_thermal:s0
genfscon sysfs /thermal_zone14/mode u:object_r:sysfs_thermal:s0
#perf-metrics
genfscon sysfs /kernel/metrics/resume_latency/resume_latency_metrics u:object_r:sysfs_vendor_metrics:s0
genfscon sysfs /kernel/metrics/irq/long_irq_metrics u:object_r:sysfs_vendor_metrics:s0
# Camera
genfscon sysfs /devices/platform/17000030.devfreq_intcam/devfreq/17000030.devfreq_intcam/min_freq u:object_r:sysfs_camera:s0
genfscon sysfs /devices/platform/17000060.devfreq_tnr/devfreq/17000060.devfreq_tnr/max_freq u:object_r:sysfs_camera:s0

View file

@ -30,3 +30,7 @@ allow pixelstats_vendor sysfs_thermal:lnk_file r_file_perms;
# BCL
allow pixelstats_vendor sysfs_bcl:dir search;
allow pixelstats_vendor sysfs_bcl:file r_file_perms;
#perf-metrics
r_dir_file(pixelstats_vendor, sysfs_vendor_metrics)
allow pixelstats_vendor sysfs_vendor_metrics:lnk_file r_file_perms;