From afbfad59d6321e41c4ef6ef1a19f8ad25c3a7359 Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Mon, 5 Jan 2015 17:56:19 -0600 Subject: [PATCH] sepolicy: new label for io scheduler sysfs nodes * needed for io scheduler in performance settings Change-Id: I818340ed62e3e1dd2674b93340b31723c7a985f4 --- sepolicy/file.te | 3 +++ sepolicy/file_contexts | 2 +- sepolicy/system_app.te | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sepolicy/file.te b/sepolicy/file.te index 499ab3f9..44f94785 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -5,3 +5,6 @@ type auditd_log, file_type, data_file_type; # Themes type theme_data_file, file_type, data_file_type; + +# Performance settings +type sysfs_devices_system_iosched, file_type, sysfs_type; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 0668ef5c..ad1c4045 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -15,7 +15,7 @@ ############################# # performance-related sysfs files (CM) /sys/devices/system/cpu.*/cpufreq(/.*)? -- u:object_r:sysfs_devices_system_cpu:s0 -/sys/block/mmcblk0/queue/scheduler -- u:object_r:sysfs_writable:s0 +/sys/block/mmcblk.*/queue/scheduler -- u:object_r:sysfs_devices_system_iosched:s0 /data/hostapd(/.*)? u:object_r:wifi_data_file:s0 /data/misc/radio(/.*)? u:object_r:radio_data_file:s0 diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te index 6ebd1ea8..6c0e059b 100644 --- a/sepolicy/system_app.te +++ b/sepolicy/system_app.te @@ -1,2 +1,3 @@ # For performance settings allow system_app sysfs_devices_system_cpu:file rw_file_perms; +allow system_app sysfs_devices_system_iosched:file rw_file_perms;