Merge "Add selinux policies for traced_relay.relay_port sysprop" into main am: 4e263e758c am: 0a20fe5b2a

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/3469959

Change-Id: I6a67d7548ab21fd656c9e30628d9a3f4b622a304
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/private/property.te b/private/property.te
index f42ac47..1ac1230 100644
--- a/private/property.te
+++ b/private/property.te
@@ -58,6 +58,7 @@
 system_internal_prop(system_audio_config_prop)
 system_internal_prop(timezone_metadata_prop)
 system_internal_prop(traced_perf_enabled_prop)
+system_internal_prop(traced_relay_relay_port_prop)
 system_internal_prop(uprobestats_start_with_config_prop)
 system_internal_prop(tuner_server_ctl_prop)
 system_internal_prop(userspace_reboot_log_prop)
diff --git a/private/property_contexts b/private/property_contexts
index a43cfbe..0f86c75 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -88,6 +88,7 @@
 persist.security.       u:object_r:system_prop:s0
 persist.traced.enable   u:object_r:traced_enabled_prop:s0
 traced.lazy.            u:object_r:traced_lazy_prop:s0
+traced_relay.relay_port u:object_r:traced_relay_relay_port_prop:s0
 persist.heapprofd.enable u:object_r:heapprofd_enabled_prop:s0
 persist.traced_perf.enable u:object_r:traced_perf_enabled_prop:s0
 uprobestats.start_with_config u:object_r:uprobestats_start_with_config_prop:s0
diff --git a/private/traced.te b/private/traced.te
index 8a29541..1aaf0d1 100644
--- a/private/traced.te
+++ b/private/traced.te
@@ -56,6 +56,9 @@
 # Allow traced to detect if a process is frozen (b/381089063).
 allow traced cgroup_v2:file r_file_perms;
 
+# Allow traced_relay to read the relay port being used
+get_prop(traced, traced_relay_relay_port_prop)
+
 # Allow setting debug properties which guard initialization of the Perfetto SDK
 # in SurfaceFlinger and HWUI's copy of Skia.
 # Required for the android.sdk_sysprop_guard data source.