QESDK: Add SELinux policy for QESDK

Add sepolicy rules for hidl based qesdhal access from
apps, and QESDK manager rules

Change-Id: I7e6e139f699cd7265e4d1ca10ea2ccbfeb549221
This commit is contained in:
Mulugeta Engdaw 2020-07-22 19:37:27 -07:00 committed by Gerrit - the friendly Code Review server
parent d2c2ac0242
commit 05bbd16e12
4 changed files with 44 additions and 0 deletions

View file

@ -136,6 +136,7 @@
/vendor/bin/hw/android\.hardware\.usb\@1\.[0-2]-service-qti u:object_r:vendor_hal_usb_qti_exec:s0
/vendor/bin/hw/android\.hardware\.usb\.gadget\@1\.[0-2]-service-qti u:object_r:vendor_hal_usb_qti_exec:s0
/vendor/bin/vendor\.qti\.qspmhal@1\.0-service u:object_r:vendor_hal_qspmhal_default_exec:s0
/vendor/bin/qesdk-manager u:object_r:vendor_hal_qesdhal_default_exec:s0
/(vendor|system/vendor)/bin/mutualex u:object_r:vendor_mutualex_exec:s0
/vendor/bin/modemManager u:object_r:vendor_modem_manager_exec:s0

View file

@ -54,6 +54,7 @@ type vendor_hal_srvctracker_hwservice, hwservice_manager_type, protected_hwservi
type vendor_hal_secureprocessor_hwservice, hwservice_manager_type, protected_hwservice;
#untrusted_app_visible_hwservice_violators no longer needed as blacklisting of hwservice is changed
type vendor_hal_qspmhal_hwservice, hwservice_manager_type;
type vendor_hal_qesdhal_hwservice, hwservice_manager_type, protected_hwservice;
type vendor_hal_bluetooth_dun_hwservice, hwservice_manager_type, protected_hwservice;
type vendor_hal_qseecom_hwservice, hwservice_manager_type, protected_hwservice;
type vendor_hal_qccvndhal_hwservice , hwservice_manager_type, protected_hwservice;

View file

@ -71,6 +71,7 @@ vendor.qti.hardware.wifi.hostapd::IHostapdVendor u:object_r:hal_wifi
vendor.qti.hardware.bluetooth_audio::IBluetoothAudioProvidersFactory u:object_r:hal_audio_hwservice:s0
vendor.qti.hardware.wifi.wifilearner::IWifiStats u:object_r:vendor_hal_wifilearner_hwservice:s0
vendor.qti.qspmhal::IQspmhal u:object_r:vendor_hal_qspmhal_hwservice:s0
vendor.qti.qesdhal::IQesdhal u:object_r:vendor_hal_qesdhal_hwservice:s0
vendor.qti.hardware.secureprocessor.device::ISecureProcessor u:object_r:vendor_hal_secureprocessor_hwservice:s0
vendor.qti.hardware.cryptfshw::ICryptfsHw u:object_r:hal_keymaster_hwservice:s0
vendor.qti.hardware.qseecom::IQSEECom u:object_r:vendor_hal_qseecom_hwservice:s0

41
qva/vendor/common/qesdhal.te vendored Normal file
View file

@ -0,0 +1,41 @@
# Copyright (c) 2021, 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_hal_qesdhal_default, domain;
type vendor_hal_qesdhal_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(vendor_hal_qesdhal_default)
hal_server_domain(vendor_hal_qesdhal_default, vendor_hal_qesdhal)
hal_client_domain(vendor_hal_qesdhal_default, hal_allocator)
binder_call(vendor_hal_qesdhal_client, vendor_hal_qesdhal_server)
binder_call(vendor_hal_qesdhal_server, vendor_hal_qesdhal_client)
# Add hwservice related rules
hal_attribute_hwservice(vendor_hal_qesdhal, vendor_hal_qesdhal_hwservice)