Add profcollectd.etr.probe property and associated permissions
It is used by profcollectd to notify vendor_init to trigger
a manual probe of coresight etr.
Bug: 321061072
Test: build and run on device
Change-Id: I5aa65f8d5a25f1284f09111c940f0a2c1a62ac18
diff --git a/private/compat/202404/202404.ignore.cil b/private/compat/202404/202404.ignore.cil
index dbc2a1d..54d5356 100644
--- a/private/compat/202404/202404.ignore.cil
+++ b/private/compat/202404/202404.ignore.cil
@@ -5,4 +5,5 @@
(typeattribute new_objects)
(typeattributeset new_objects
( new_objects
+ profcollectd_etr_prop
))
diff --git a/private/profcollectd.te b/private/profcollectd.te
index f83d4a8..8dc2d89 100644
--- a/private/profcollectd.te
+++ b/private/profcollectd.te
@@ -46,6 +46,9 @@
get_prop(profcollectd, device_config_profcollect_native_boot_prop)
set_prop(profcollectd, profcollectd_node_id_prop)
+ # Allow profcollectd to trigger manual probe of coresight etr.
+ set_prop(profcollectd, profcollectd_etr_prop)
+
# Allow profcollectd to publish a binder service and make binder calls.
binder_use(profcollectd)
# Allow profcollectd to call callbacks registered by system_server when ETM is ready.
diff --git a/private/property_contexts b/private/property_contexts
index fd1b848..b4458ee 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -109,6 +109,7 @@
sys.trace. u:object_r:system_trace_prop:s0
wrap. u:object_r:zygote_wrap_prop:s0 prefix string
persist.wm.debug. u:object_r:persist_wm_debug_prop:s0
+profcollectd.etr.probe u:object_r:profcollectd_etr_prop:s0
# Suspend service properties
suspend.max_sleep_time_millis u:object_r:suspend_prop:s0 exact uint
diff --git a/public/property.te b/public/property.te
index 453a467..95e19b7 100644
--- a/public/property.te
+++ b/public/property.te
@@ -103,6 +103,7 @@
system_restricted_prop(userspace_reboot_exported_prop)
system_restricted_prop(vold_status_prop)
system_restricted_prop(vts_status_prop)
+system_restricted_prop(profcollectd_etr_prop)
compatible_property_only(`
# DO NOT ADD ANY PROPERTIES HERE
diff --git a/public/vendor_init.te b/public/vendor_init.te
index 7a74e7c..2816091 100644
--- a/public/vendor_init.te
+++ b/public/vendor_init.te
@@ -297,6 +297,10 @@
get_prop(vendor_init, device_config_vendor_system_native_prop)
get_prop(vendor_init, device_config_vendor_system_native_boot_prop)
+userdebug_or_eng(`
+get_prop(vendor_init, profcollectd_etr_prop)
+')
+
###
### neverallow rules
###