Skip to content
Snippets Groups Projects
Commit f6f51e0b authored by Tao Bao's avatar Tao Bao
Browse files

recovery.te: Allow writing to sysfs_devices_system_cpu.

recovery (update_binary) may need to set up cpufreq during an update.

avc:  denied  { write } for  pid=335 comm="update_binary" name="scaling_max_freq" dev="sysfs" ino=7410 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=file permissive=0

Bug: 32463933
Test: Build a recovery image and apply an OTA package that writes to
      /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq.

Change-Id: Ia90af9dd15e162dd94bcd4722b66aa296e3058c5
(cherry picked from commit ee7960c0)
parent 8fc02652
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,9 @@ recovery_only(`
# TODO: create more specific label?
allow recovery sysfs:file w_file_perms;
# Write to /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq.
allow recovery sysfs_devices_system_cpu:file w_file_perms;
allow recovery sysfs_batteryinfo:file r_file_perms;
allow recovery kernel:system syslog_read;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment