Add GSA logs policy

This adds a label to the sysfs files for GSA logs to allow dumpstate to
read them during a bugreport.

Bug: 271125313
Test: adb shell dumpstate
Change-Id: I8842c0bec972c4cfad15ca689f8e4ae7fa99e179
This commit is contained in:
Kenny Root 2023-02-27 17:32:51 -08:00
parent 1731179cf1
commit 076591d107
4 changed files with 14 additions and 0 deletions

6
vendor/dump_gsa.te vendored Normal file
View file

@ -0,0 +1,6 @@
pixel_bugreport(dump_gsa)
userdebug_or_eng(`
allow dump_gsa vendor_toolbox_exec:file execute_no_trans;
allow dump_gsa sysfs_gsa_log:file r_file_perms;
')

3
vendor/file.te vendored
View file

@ -33,3 +33,6 @@ userdebug_or_eng(`
type sysfs_fabric, sysfs_type, fs_type; type sysfs_fabric, sysfs_type, fs_type;
type sysfs_em_profile, sysfs_type, fs_type; type sysfs_em_profile, sysfs_type, fs_type;
# GSA
type sysfs_gsa_log, sysfs_type, fs_type;

View file

@ -17,6 +17,7 @@
/vendor/bin/hw/google\.hardware\.media\.c2@2\.0-service u:object_r:mediacodec_google_exec:s0 /vendor/bin/hw/google\.hardware\.media\.c2@2\.0-service u:object_r:mediacodec_google_exec:s0
/vendor/bin/dump/dump_wlan\.sh u:object_r:dump_wlan_exec:s0 /vendor/bin/dump/dump_wlan\.sh u:object_r:dump_wlan_exec:s0
/vendor/bin/dump/dump_cma\.sh u:object_r:dump_cma_exec:s0 /vendor/bin/dump/dump_cma\.sh u:object_r:dump_cma_exec:s0
/vendor/bin/dump/dump_gsa\.sh u:object_r:dump_gsa_exec:s0
/vendor/bin/dump/dump_power\.sh u:object_r:dump_power_exec:s0 /vendor/bin/dump/dump_power\.sh u:object_r:dump_power_exec:s0
/vendor/bin/rlsservice u:object_r:rlsservice_exec:s0 /vendor/bin/rlsservice u:object_r:rlsservice_exec:s0
/vendor/bin/tcpdump_logger u:object_r:tcpdump_logger_exec:s0 /vendor/bin/tcpdump_logger u:object_r:tcpdump_logger_exec:s0

View file

@ -398,3 +398,7 @@ genfscon sysfs /kernel/pixel_em/active_profile u:obje
# GPU # GPU
genfscon sysfs /devices/platform/1f000000.mali/hint_min_freq u:object_r:sysfs_gpu:s0 genfscon sysfs /devices/platform/1f000000.mali/hint_min_freq u:object_r:sysfs_gpu:s0
# GSA logs
genfscon sysfs /devices/platform/16490000.gsa-ns/log_main u:object_r:sysfs_gsa_log:s0
genfscon sysfs /devices/platform/16490000.gsa-ns/log_intermediate u:object_r:sysfs_gsa_log:s0