xref: /aosp_15_r20/system/sepolicy/private/mmd.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1# mmd memory management daemon
2type mmd, domain;
3typeattribute mmd coredomain;
4type mmd_exec, system_file_type, exec_type, file_type;
5
6init_daemon_domain(mmd)
7
8# Set mmd.enabled_aconfig properties.
9set_prop(mmd, mmd_prop)
10get_prop(mmd, device_config_mmd_native_prop)
11
12# mmd binder setup
13add_service(mmd, mmd_service)
14binder_use(mmd)
15
16# Read /proc/swaps
17allow mmd proc_swaps:file r_file_perms;
18
19# zram sysfs access
20allow mmd sysfs_zram:dir search;
21allow mmd sysfs_zram:file rw_file_perms;
22
23# procfs
24allow mmd proc_meminfo:file r_file_perms;
25
26# mkswap /dev/block/zram command
27allow mmd block_device:dir search;
28allow mmd swap_block_device:blk_file rw_file_perms;
29
30# swapon syscall
31allow mmd self:capability sys_admin;
32