Prefetch: Add sepolicy to control prefetch properties
1: Add prefetch tunable property
2: Default path to store the prefetch record is in /metadata/prefetch/
3: Add policy to control the service
4: Allow init to start/stop the service
Bug: 362507272
Test: Test prefetch record/replay with enforcing mode
Change-Id: I55cbf4f2110da298a8d7df52daad08eaedebd061
Signed-off-by: Akilesh Kailash <akailash@google.com>
diff --git a/private/init.te b/private/init.te
index d1f7c18..15f79e3 100644
--- a/private/init.te
+++ b/private/init.te
@@ -85,6 +85,10 @@
# Allow init to set 16kb app compatibility props
set_prop(init, bionic_linker_16kb_app_compat_prop)
+# Allow init to set/get prefetch boot prop to initiate record/replay
+set_prop(init, ctl_prefetch_prop);
+get_prop(init, prefetch_boot_prop);
+
# Allow accessing /sys/kernel/tracing/instances/bootreceiver to set up tracing.
allow init debugfs_bootreceiver_tracing:file w_file_perms;