Merge "sepolicy :: Addition of sepolicy for cvphal"

This commit is contained in:
qctecmdr Service 2019-01-28 01:02:46 -08:00 committed by Gerrit - the friendly Code Review server
commit 7e7eb94c2d
5 changed files with 68 additions and 2 deletions

View file

@ -71,4 +71,8 @@ attribute hal_esepowermanager_server;
attribute vendor_hal_factory_qti;
attribute vendor_hal_factory_qti_client;
attribute vendor_hal_factory_qti_server;
attribute vendor_hal_factory_qti_server;
attribute hal_cvp;
attribute hal_cvp_client;
attribute hal_cvp_server;

View file

@ -83,6 +83,7 @@
/(vendor|system/vendor)/bin/mmi u:object_r:vendor_mmi_exec:s0
/(vendor|system/vendor)/bin/mmid u:object_r:vendor_mmi_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.qti\.hardware\.factory@1\.0-service u:object_r:vendor_hal_factory_qti_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.qti\.hardware\.cvp@1\.0-service u:object_r:vendor_cvp_exec:s0
###################################
# data files

58
qva/vendor/common/hal_cvp.te vendored Normal file
View file

@ -0,0 +1,58 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
type vendor_cvp, domain;
type vendor_cvp_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(vendor_cvp)
hal_server_domain(vendor_cvp, hal_cvp)
add_hwservice(hal_cvp_server, hal_cvp_hwservice)
allow hal_cvp_client hal_cvp_hwservice:hwservice_manager find;
binder_call(hal_cvp_client, hal_cvp_server)
binder_call(hal_cvp_server, hal_cvp_client)
r_dir_file(vendor_cvp, adsprpcd_file)
# Access for ion memory
allow vendor_cvp ion_device:chr_file rw_file_perms;
# Access for DSP/QDSP device
allow vendor_cvp qdsp_device:chr_file rw_file_perms;
allow vendor_cvp dsp_device:chr_file rw_file_perms;
# Access for sdcard
userdebug_or_eng('
allow vendor_cvp sdcard_type:dir rw_dir_perms;
allow vendor_cvp sdcard_type:file create_file_perms;
')
# Access for video device
allow vendor_cvp video_device:chr_file rw_file_perms;

View file

@ -40,4 +40,5 @@ type hal_latency_hwservice, hwservice_manager_type;
type hal_scve_hwservice, hwservice_manager_type;
type hal_soter_hwservice, hwservice_manager_type;
type hal_esepowermanager_hwservice, hwservice_manager_type;
type vendor_hal_factory_qti_hwservice, hwservice_manager_type;
type vendor_hal_factory_qti_hwservice, hwservice_manager_type;
type hal_cvp_hwservice, hwservice_manager_type;

View file

@ -53,3 +53,5 @@ vendor.qti.hardware.fm::IFmHci u:object_r:hal_blue
vendor.qti.esepowermanager::IEsePowerManager u:object_r:hal_esepowermanager_hwservice:s0
vendor.qti.hardware.wifi.supplicant::ISupplicantVendor u:object_r:hal_wifi_supplicant_hwservice:s0
vendor.qti.hardware.factory::IFactory u:object_r:vendor_hal_factory_qti_hwservice:s0
vendor.qti.hardware.cvp::ICvp u:object_r:hal_cvp_hwservice:s0