suspend: Allow access to /sys/power/wake_[un]lock

This is needed to prevent autosuspend when the framework is restarting
See: go/no-suspend-deadlocks

Bug: 255898234
Test: Check logcat for avc denials
Change-Id: I6313e28d0f2e4bc553881fcc3742dc74ca319b44
This commit is contained in:
Kalesh Singh 2022-12-14 13:02:50 -08:00
parent ab3a546000
commit a0a55e0e23

View file

@ -29,6 +29,14 @@ allow system_suspend bluetooth:binder call;
allow system_suspend dumpstate:fd use; allow system_suspend dumpstate:fd use;
allow system_suspend dumpstate:fifo_file write; allow system_suspend dumpstate:fifo_file write;
# Allow init to take kernel wakelock and system suspend to
# remove kenel wakelocks and the capability to access these
# files
allow init sysfs_wake_lock:file rw_file_perms;
allow init self:global_capability2_class_set block_suspend;
allow system_suspend sysfs_wake_lock:file rw_file_perms;
allow system_suspend self:global_capability2_class_set block_suspend;
neverallow { neverallow {
domain domain
-atrace # tracing -atrace # tracing