Commit 586caea
authored
Add SELinux policy support for Userspace Resource Manager (URM) (#1097)
Add SELinux policy definitions for the URM (Username Resource Manager)
service, which manages CPU, IRQ, and cgroup resources per username for
optimizing system performance.
Changes include:
- urm.fc: File context definitions mapping:
- /etc/urm(/.*)? configuration files to urm_config_t
- /run/restune_sock runtime socket to urm_runtime_t
- /usr/bin/urm binary to urm_exec_t
- urm.te: Type declarations for 4 types:
- urm_config_t: URM configuration files under /etc/urm
- urm_exec_t: URM executable
- urm_t: URM daemon process domain
- urm_runtime_t: URM runtime socket under /run
Policy rules include:
- Suppress spurious capability denials for dac_override,
dac_read_search and net_admin
- Netlink connector socket for kernel-userspace communication
- Unix stream socket for client-server communication
- Config file read/write for per-username CPU frequency
scaling settings e.g. scaling_max_freq.txt
- Runtime socket management under /run for client communication
- Runtime socket transition under /run for client communication
- PM QoS access via /dev/cpu_dma_latency for power and
latency management per username
- sysfs read/write for CPU frequency scaling and IRQ affinity
- All domain process state read from /proc/<pid> for
per-username process resource monitoring
- Cgroup file and directory management for per-username
resource group isolation
- System state read from /proc for per-username resource
usage monitoring
- Kernel module request for netlink connector
- IRQ sysctl read/write for per-username IRQ affinity
management via /proc/irq/*/smp_affinity
- Kernel sysctl read/write e.g. sched_util_clamp_min
- Syslog access for logging
- Config file read via urm_read_config() interface
- urm.if: Two interface definitions:
- urm_read_config(): allows domains to read URM configuration
files under /etc/urm
- urm_stream_connect(): allows domains to connect to URM
via unix domain stream socket
Signed-off-by: Varun Singhal <varusing@qti.qualcomm.com>1 parent 4e360aa commit 586caea
3 files changed
Lines changed: 139 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
0 commit comments