Mark Salyzyn | e4b3e0b | 2018-02-20 11:02:39 -0800 | [diff] [blame] | 1 | # llkd Live LocK Daemon |
| 2 | typeattribute llkd coredomain; |
| 3 | |
| 4 | init_daemon_domain(llkd) |
| 5 | |
| 6 | allow llkd self:global_capability_class_set kill; |
| 7 | |
| 8 | # llkd optionally locks itself in memory, to prevent it from being |
| 9 | # swapped out and unable to discover a kernel in live-lock state. |
| 10 | allow llkd self:global_capability_class_set ipc_lock; |
| 11 | |
| 12 | # Send kill signals to _anyone_ suffering from Live Lock |
| 13 | allow llkd domain:process sigkill; |
| 14 | |
| 15 | # live lock watchdog process allowed to look through /proc/ |
| 16 | allow llkd domain:dir r_dir_perms; |
| 17 | allow llkd domain:file r_file_perms; |
| 18 | allow llkd domain:lnk_file read; |
| 19 | # Set /proc/sys/kernel/hung_task_* |
| 20 | allow llkd proc_hung_task:file rw_file_perms; |
| 21 | |
| 22 | # live lock watchdog process allowed to dump process trace and |
| 23 | # reboot because orderly shutdown may not be possible. |
| 24 | allow llkd proc_sysrq:file w_file_perms; |
| 25 | allow llkd kmsg_device:chr_file w_file_perms; |
| 26 | |
| 27 | ### neverallow rules |
| 28 | |
| 29 | neverallow { domain -init } llkd:process { dyntransition transition }; |
| 30 | |
| 31 | # never honor LD_PRELOAD |
| 32 | neverallow * llkd:process noatsecure; |