sepolicy:Moved NNHAL-1.2v rules to common folder

-Removed target specific data rules
-Added rules to common folder

Change-Id: I935dc8025f98c9cf18db15e01276c9237f6e77eb
This commit is contained in:
vishawar 2019-06-07 14:27:45 +05:30
parent 8ef1adb229
commit 29f7028ff8
6 changed files with 3 additions and 53 deletions

View file

@ -441,6 +441,9 @@
/sys/devices/soc/qpnp-vadc-[0-9]+(/.*)? u:object_r:sysfs_vadc_dev:s0
#Android NN Driver
/vendor/bin/hw/android\.hardware\.neuralnetworks@1\.2-service-qti u:object_r:hal_neuralnetworks_default_exec:s0
/(vendor|system/vendor)/bin/init\.class_main\.sh u:object_r:qti_init_shell_exec:s0
/(vendor|system/vendor)/bin/init\.crda\.sh u:object_r:qti_init_shell_exec:s0
/(vendor|system/vendor)/bin/init\.mdm\.sh u:object_r:qti_init_shell_exec:s0

View file

@ -94,9 +94,6 @@
# Block devices for the drive that holds the xbl_a and xbl_b partitions.
/dev/block/platform/soc/1d84000.ufshc/sd[bc] u:object_r:xbl_block_device:s0
#Android NN Driver
/vendor/bin/hw/android\.hardware\.neuralnetworks@1\.2-service-qti u:object_r:hal_neuralnetworks_default_exec:s0
# Same process file
/vendor/lib(64)?/hw/gralloc\.kona\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/hw/vulkan\.kona\.so u:object_r:same_process_hal_file:s0

View file

@ -103,5 +103,3 @@
# Same process file
/vendor/lib(64)?/hw/gralloc\.msmnile\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/hw/vulkan\.msmnile\.so u:object_r:same_process_hal_file:s0
/vendor/bin/hw/android\.hardware\.neuralnetworks@1\.2-service-qti u:object_r:hal_neuralnetworks_default_exec:s0

View file

@ -1,45 +0,0 @@
# 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 hal_neuralnetworks_default, domain;
hal_server_domain(hal_neuralnetworks_default, hal_neuralnetworks)
type hal_neuralnetworks_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_neuralnetworks_default)
allow hal_neuralnetworks_default fwk_sensor_hwservice:hwservice_manager find;
allow hal_neuralnetworks_default qdsp_device:chr_file r_file_perms;
allow hal_neuralnetworks_default xdsp_device:chr_file r_file_perms;
allow hal_neuralnetworks_default ion_device:chr_file r_file_perms;
allow hal_neuralnetworks_default app_data_file:file { read getattr map };
allow hal_neuralnetworks_default shell_data_file:file { read getattr map };
allow hal_neuralnetworks_default hal_neuralnetworks_data_file:dir create_dir_perms;
allow hal_neuralnetworks_default hal_neuralnetworks_data_file:{ file fifo_file } create_file_perms;
allow hal_neuralnetworks_default gpu_device:chr_file rw_file_perms;
r_dir_file(hal_neuralnetworks_default, adsprpcd_file)

View file

@ -98,7 +98,4 @@
# FBE
/(vendor|system/vendor)/bin/init.qti.qseecomd.sh u:object_r:init-qti-fbe-sh_exec:s0
#Android NN Driver
/vendor/bin/hw/android\.hardware\.neuralnetworks@1\.2-service-qti u:object_r:hal_neuralnetworks_default_exec:s0
/sys/devices/platform/soc/17d41000.qcom,cpucc/17d41000.qcom,cpucc:qcom,wil6210/subsys8/name u:object_r:sysfs_ssr:s0