blob: 2d09ce53030c5222a8729e57a134985f17627f8e [file] [log] [blame]
Nick Kralevich2b392fc2013-12-05 16:55:34 -08001# lmkd low memory killer daemon
2type lmkd, domain;
3type lmkd_exec, exec_type, file_type;
4
5init_daemon_domain(lmkd)
Nick Kralevich5467fce2014-02-13 12:19:50 -08006
7allow lmkd self:capability dac_override;
8
9## Open and write to /proc/PID/oom_score_adj
10## TODO: maybe scope this down?
11r_dir_file(lmkd, appdomain)
12allow lmkd appdomain:file write;
13r_dir_file(lmkd, system_server)
14allow lmkd system_server:file write;
15
16## Writes to /sys/module/lowmemorykiller/parameters/minfree
17allow lmkd sysfs_lowmemorykiller:file w_file_perms;