diff options
author | Raghavendra Prasad Nagaraj <prasr@codeaurora.org> | 2015-08-14 17:47:05 +0530 |
---|---|---|
committer | Raghavendra Prasad Nagaraj <prasr@codeaurora.org> | 2015-08-14 17:47:05 +0530 |
commit | 2ed63806ab782a70416ab141598a730aae09922f (patch) | |
tree | c719628923b4f2ade32ced1642eeb212499dc3f8 | |
parent | 8407f5b0e79e792670ad95f32eefff766e8bc8ee (diff) | |
download | android_device_qcom_sepolicy-2ed63806ab782a70416ab141598a730aae09922f.tar.gz android_device_qcom_sepolicy-2ed63806ab782a70416ab141598a730aae09922f.tar.bz2 android_device_qcom_sepolicy-2ed63806ab782a70416ab141598a730aae09922f.zip |
sepolicy: perf related policy changes
Update policy to
- start mpdecision automatically
- set the perf property
- allow mpdecision to be used by other services
Change-Id: I0e1ec7b9bea90b8d0a83bc6021836ef5e9f10a6f
-rw-r--r-- | common/app.te | 2 | ||||
-rw-r--r-- | common/init_shell.te | 2 | ||||
-rw-r--r-- | common/mpdecision.te | 5 | ||||
-rw-r--r-- | common/property.te | 1 | ||||
-rw-r--r-- | common/property_contexts | 2 | ||||
-rw-r--r-- | common/surfaceflinger.te | 2 | ||||
-rw-r--r-- | common/thermal-engine.te | 2 | ||||
-rw-r--r-- | common/wfdservice.te | 2 |
8 files changed, 18 insertions, 0 deletions
diff --git a/common/app.te b/common/app.te index af122524..a959ce37 100644 --- a/common/app.te +++ b/common/app.te @@ -14,3 +14,5 @@ allow appdomain qdsp_device:chr_file r_file_perms; allow appdomain mpctl_socket:dir r_dir_perms; unix_socket_send(appdomain, mpctl, perfd) unix_socket_connect(appdomain, mpctl, perfd) +unix_socket_send(appdomain, mpctl, mpdecision) +unix_socket_connect(appdomain, mpctl, mpdecision) diff --git a/common/init_shell.te b/common/init_shell.te index fcff31a9..030d1bdb 100644 --- a/common/init_shell.te +++ b/common/init_shell.te @@ -44,6 +44,7 @@ allow qti_init_shell self:capability { # For property starting with hw # freq_prop - for setting frequency from postboot script # perfd_prop - for setting ctl.perfd property from postboot script +# mpdecision_prop - for setting ctl.mpdecision property from postboot script # bluetooth_prop - for setting bt related properties from postboot script # uicc_prop - for access to UICC property # ctl_qmuxd_prop/ctl_netmgrd_prop - Needed in order to set properties on qmuxd and netmgrd processes @@ -51,6 +52,7 @@ allow qti_init_shell { system_prop freq_prop perfd_prop + mpdecision_prop bluetooth_prop config_prop sensors_prop diff --git a/common/mpdecision.te b/common/mpdecision.te index d6873763..e6e65355 100644 --- a/common/mpdecision.te +++ b/common/mpdecision.te @@ -23,6 +23,7 @@ allow mpdecision device_latency:chr_file w_file_perms; r_dir_file(mpdecision, sysfs_rqstats) allow mpdecision sysfs_rqstats:file w_file_perms; r_dir_file(mpdecision, sysfs_thermal) +allow mpdecision sysfs_thermal:file write; #policies for mpctl #mpctl socket @@ -38,3 +39,7 @@ allow mpdecision mpctl_data_file:file create_file_perms; #allow poll of system_server status r_dir_file(mpdecision, system_server) + +#mpdecision set properties +unix_socket_connect(mpdecision, property, init) +allow mpdecision mpdecision_prop:property_service set; diff --git a/common/property.te b/common/property.te index abc04a62..9013cd85 100644 --- a/common/property.te +++ b/common/property.te @@ -16,3 +16,4 @@ type sensors_prop, property_type; type msm_irqbalance_prop, property_type; type camera_prop, property_type; type sf_lcd_density_prop, property_type; +type mpdecision_prop, property_type; diff --git a/common/property_contexts b/common/property_contexts index c041c9b7..066dbf87 100644 --- a/common/property_contexts +++ b/common/property_contexts @@ -20,3 +20,5 @@ camera. u:object_r:camera_prop:s0 persist.camera. u:object_r:camera_prop:s0 sf.lcd_density u:object_r:sf_lcd_density_prop:s0 qualcomm.bt.hci_transport u:object_r:bluetooth_prop:s0 +ctl.mpdecision u:object_r:mpdecision_prop:s0 +qualcomm.perf.cores_online u:object_r:mpdecision_prop:s0 diff --git a/common/surfaceflinger.te b/common/surfaceflinger.te index c14fa6e9..bbbbef0f 100644 --- a/common/surfaceflinger.te +++ b/common/surfaceflinger.te @@ -20,6 +20,8 @@ binder_call(surfaceflinger, tee) allow surfaceflinger mpctl_socket:dir r_dir_perms; unix_socket_send(surfaceflinger, mpctl, perfd) unix_socket_connect(surfaceflinger, mpctl, perfd) +unix_socket_send(surfaceflinger, mpctl, mpdecision) +unix_socket_connect(surfaceflinger, mpctl, mpdecision) # access to /data/misc/display for dumping input frames allow surfaceflinger display_misc_file:dir create_dir_perms; diff --git a/common/thermal-engine.te b/common/thermal-engine.te index 243d6c72..faed9c1a 100644 --- a/common/thermal-engine.te +++ b/common/thermal-engine.te @@ -43,6 +43,8 @@ allow thermal-engine mpctl_socket:dir search; allow thermal-engine mpctl_socket:sock_file write; unix_socket_send(thermal-engine, mpctl, perfd) unix_socket_connect(thermal-engine, mpctl, perfd) +unix_socket_send(thermal-engine, mpctl, mpdecision) +unix_socket_connect(thermal-engine, mpctl, mpdecision) #This is to allow access to uio device allow thermal-engine uio_device:chr_file rw_file_perms; diff --git a/common/wfdservice.te b/common/wfdservice.te index e2509873..cf5bcd26 100644 --- a/common/wfdservice.te +++ b/common/wfdservice.te @@ -76,6 +76,8 @@ allow wfdservice mpctl_socket:dir r_dir_perms; allow wfdservice dpmservice:service_manager add; unix_socket_send(wfdservice, mpctl, perfd) unix_socket_connect(wfdservice, mpctl, perfd) +unix_socket_send(wfdservice, mpctl, mpdecision) +unix_socket_connect(wfdservice, mpctl, mpdecision) # Allow access to input_device for touch input detection allow wfdservice input_device:dir r_dir_perms; |