Add lmkd. property policies

lmkd.reinit property allows vendors to trigger lmkd reinitialization. Add
lmkd_prop to support lmkd.* properties inlcuding lmkd.reinit.

Bug: 155149944
Test: setprop lmkd.reinit 1
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I6ba598bad7ebb40fd6f23de473f25f32e53c996d
diff --git a/private/compat/29.0/29.0.ignore.cil b/private/compat/29.0/29.0.ignore.cil
index fadc7db..e4719f5 100644
--- a/private/compat/29.0/29.0.ignore.cil
+++ b/private/compat/29.0/29.0.ignore.cil
@@ -75,6 +75,7 @@
     mirror_data_file
     light_service
     linkerconfig_file
+    lmkd_prop
     media_variant_prop
     metadata_bootstat_file
     mnt_pass_through_file
diff --git a/private/lmkd.te b/private/lmkd.te
index 7246051..1e7bbde 100644
--- a/private/lmkd.te
+++ b/private/lmkd.te
@@ -4,3 +4,8 @@
 
 # Set sys.lmk.* properties.
 set_prop(lmkd, system_lmk_prop)
+
+# Set lmkd.* properties.
+set_prop(lmkd, lmkd_prop)
+
+neverallow { -init -lmkd -vendor_init } lmkd_prop:property_service set;
diff --git a/private/property_contexts b/private/property_contexts
index dffb3b0..4c1c007 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -440,6 +440,7 @@
 ro.lmk.thrashing_limit_decay    u:object_r:exported3_default_prop:s0 exact int
 ro.lmk.use_minfree_levels       u:object_r:exported3_default_prop:s0 exact bool
 ro.lmk.upgrade_pressure         u:object_r:exported3_default_prop:s0 exact int
+lmkd.reinit                     u:object_r:lmkd_prop:s0 exact int
 
 ro.media.xml_variant.codecs             u:object_r:media_variant_prop:s0 exact string
 ro.media.xml_variant.codecs_performance u:object_r:media_variant_prop:s0 exact string
diff --git a/public/property.te b/public/property.te
index 8e5a7fc..62ad182 100644
--- a/public/property.te
+++ b/public/property.te
@@ -143,6 +143,7 @@
 system_public_prop(exported_wifi_prop)
 system_public_prop(sota_prop)
 system_public_prop(hwservicemanager_prop)
+system_public_prop(lmkd_prop)
 system_public_prop(logd_prop)
 system_public_prop(logpersistd_logging_prop)
 system_public_prop(log_prop)
diff --git a/public/vendor_init.te b/public/vendor_init.te
index cd96643..f95d096 100644
--- a/public/vendor_init.te
+++ b/public/vendor_init.te
@@ -226,6 +226,7 @@
 set_prop(vendor_init, exported3_default_prop)
 set_prop(vendor_init, exported3_radio_prop)
 set_prop(vendor_init, incremental_prop)
+set_prop(vendor_init, lmkd_prop)
 set_prop(vendor_init, logd_prop)
 set_prop(vendor_init, log_tag_prop)
 set_prop(vendor_init, log_prop)