From 92d0030e6a9120820c1afb7d2065be7347d792b9 Mon Sep 17 00:00:00 2001 From: Denny cy Lee Date: Tue, 25 Jan 2022 16:21:32 +0800 Subject: [PATCH] hardwareinfo: add sepolicy for SoC Bug: 208721710 Test: search avc in logcat Change-Id: I3828d39981666db98e6a34aa70ae39b7f126e495 Signed-off-by: Denny cy Lee --- tracking_denials/hardware_info_app.te | 4 ---- whitechapel_pro/file.te | 1 + whitechapel_pro/genfs_contexts | 3 +++ whitechapel_pro/hardware_info_app.te | 4 ++++ 4 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 tracking_denials/hardware_info_app.te diff --git a/tracking_denials/hardware_info_app.te b/tracking_denials/hardware_info_app.te deleted file mode 100644 index a79e1d94..00000000 --- a/tracking_denials/hardware_info_app.te +++ /dev/null @@ -1,4 +0,0 @@ -# b/208721710 -dontaudit hardware_info_app sysfs:file { getattr }; -dontaudit hardware_info_app sysfs:file { open }; -dontaudit hardware_info_app sysfs:file { read }; diff --git a/whitechapel_pro/file.te b/whitechapel_pro/file.te index 2aa1cf06..3b498495 100644 --- a/whitechapel_pro/file.te +++ b/whitechapel_pro/file.te @@ -43,6 +43,7 @@ type sysfs_chargelevel, sysfs_type, fs_type; type sysfs_mfc, sysfs_type, fs_type; type sysfs_cpu, sysfs_type, fs_type; type sysfs_odpm, sysfs_type, fs_type; +type sysfs_soc, sysfs_type, fs_type; # debugfs type debugfs_f2fs, debugfs_type, fs_type; diff --git a/whitechapel_pro/genfs_contexts b/whitechapel_pro/genfs_contexts index c88c56dd..71edacdb 100644 --- a/whitechapel_pro/genfs_contexts +++ b/whitechapel_pro/genfs_contexts @@ -24,6 +24,9 @@ genfscon sysfs /devices/platform/17000080.devfreq_bo/devfreq/17000080.devfreq_bo genfscon sysfs /devices/platform/28000000.mali/time_in_state u:object_r:sysfs_cpu:s0 genfscon sysfs /devices/platform/28000000.mali/uid_time_in_state u:object_r:sysfs_cpu:s0 +genfscon sysfs /devices/soc0/machine u:object_r:sysfs_soc:s0 +genfscon sysfs /devices/soc0/revision u:object_r:sysfs_soc:s0 + # Touch genfscon sysfs /devices/platform/10d10000.spi/spi_master/spi0/spi0.0/synaptics_tcm.0/sysfs u:object_r:sysfs_touch:s0 genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_touch:s0 diff --git a/whitechapel_pro/hardware_info_app.te b/whitechapel_pro/hardware_info_app.te index 1da5b988..41a08577 100644 --- a/whitechapel_pro/hardware_info_app.te +++ b/whitechapel_pro/hardware_info_app.te @@ -17,3 +17,7 @@ allow hardware_info_app sysfs_batteryinfo:file r_file_perms; # Display allow hardware_info_app sysfs_display:dir search; allow hardware_info_app sysfs_display:file r_file_perms; + +# SoC +allow hardware_info_app sysfs_soc:file r_file_perms; +allow hardware_info_app sysfs_chip_id:file r_file_perms;