[automerger skipped] Merge "pixel_stats: add access to PSI information" into tm-qpr-dev am: cebd482fb4 -s ours am: 2ebe93354f -s ours

am skip reason: Merged-In Ic433cd2ebfdd24694ed63bee118e30e286c11b41 with SHA-1 69d59aa6e7 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/pixel-sepolicy/+/18995079

Change-Id: I6a039e7191fce1888b09fb4f5e9fa31fcbe1d35f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/gs_watchdogd/file_contexts b/gs_watchdogd/file_contexts
new file mode 100644
index 0000000..22dd02b
--- /dev/null
+++ b/gs_watchdogd/file_contexts
@@ -0,0 +1,5 @@
+# Platform watchdogd
+/system_ext/bin/gs_watchdogd            u:object_r:gs_watchdogd_exec:s0
+
+# Devices
+/dev/watchdog[0-9]                      u:object_r:watchdog_device:s0
diff --git a/gs_watchdogd/gs_watchdogd.te b/gs_watchdogd/gs_watchdogd.te
new file mode 100644
index 0000000..0823508
--- /dev/null
+++ b/gs_watchdogd/gs_watchdogd.te
@@ -0,0 +1,10 @@
+# gs_watchdogd seclabel is specified in init.<board>.rc
+type gs_watchdogd, domain, coredomain;
+type gs_watchdogd_exec, system_file_type, exec_type, file_type;
+
+typeattribute gs_watchdogd coredomain;
+init_daemon_domain(gs_watchdogd)
+
+allow gs_watchdogd watchdog_device:chr_file rw_file_perms;
+allow gs_watchdogd kmsg_device:chr_file rw_file_perms;
+allow gs_watchdogd sysfs:dir r_dir_perms;