Merge a120840ed3 on remote branch

Change-Id: I65a75cfb5024444a9ee65c2bedd5e363e1141c13
This commit is contained in:
Linux Build Service Account 2022-01-05 09:31:32 -08:00
commit 3d9330ba11
20 changed files with 470 additions and 8 deletions

View file

@ -30,9 +30,9 @@ userdebug_or_eng(`
get_prop(domain, vendor_gralloc_prop)
r_dir_file({domain - isolated_app}, vendor_sysfs_soc);
r_dir_file({domain - isolated_app}, vendor_sysfs_esoc);
r_dir_file({domain - isolated_app}, vendor_sysfs_ssr);
r_dir_file({domain - isolated_app - untrusted_app_all }, vendor_sysfs_soc);
r_dir_file({domain - isolated_app - untrusted_app_all }, vendor_sysfs_esoc);
r_dir_file({domain - isolated_app - untrusted_app_all }, vendor_sysfs_ssr);
r_dir_file({domain - isolated_app}, sysfs_thermal);
get_prop(domain, vendor_public_vendor_default_prop)

View file

@ -225,3 +225,6 @@ type vendor_sysfs_devicetree_cpu, sysfs_type, fs_type;
type vendor_sysfs_devicetree_soc, sysfs_type, fs_type;
type vendor_sysfs_microdump, fs_type, sysfs_type;
# display boot param files
type vendor_sysfs_disp_boot_param, fs_type, sysfs_type;

View file

@ -482,6 +482,7 @@
/sys/devices/platform/vfb.([0-3])+/graphics/fb([0-3])+/modes u:object_r:vendor_sysfs_graphics:s0
/sys/devices/platform/vfb.([0-3])+/graphics/fb([0-3])+/mode u:object_r:vendor_sysfs_graphics:s0
/sys/module/drm/parameters/vblankoffdelay u:object_r:vendor_sysfs_graphics:s0
/sys/module/msm_drm/parameters/dsi_display([0-1]) u:object_r:vendor_sysfs_disp_boot_param:s0
/sys/devices/platform/soc/[a-f0-9]+.qcom,mdss_mdp/drm/card([0-3])+/card([0-3])+-DSI-1/modes u:object_r:vendor_sysfs_graphics:s0
/sys/devices/platform/soc/[a-f0-9]+.qcom,mdss_mdp/drm/card([0-3])+/card([0-3])+-DSI-1/status u:object_r:vendor_sysfs_graphics:s0
/sys/class/graphics/fb([0-3])+/mdp/caps u:object_r:vendor_sysfs_graphics:s0

View file

@ -141,3 +141,6 @@ allow hal_graphics_composer self: qipcrtr_socket create_socket_perms_no_ioctl;
hal_attribute_service(hal_graphics_composer, vendor_hal_displayconfig_service);
hal_attribute_service(hal_graphics_composer, vendor_hal_vnddisplayconfig_service);
binder_call(hal_graphics_composer, servicemanager);
# Aloow access to panel boot param node
allow hal_graphics_composer_default vendor_sysfs_disp_boot_param:file r_file_perms;

View file

@ -52,4 +52,4 @@ net_domain(vendor_qtidataservices_app)
hal_client_domain(vendor_qtidataservices_app, vendor_hal_perf)
allow vendor_qtidataservices_app vendor_netmgrd:fd use;
allow vendor_qtidataservices_app vendor_netmgrd:udp_socket { getattr read write };
allow vendor_qtidataservices_app vendor_netmgrd:udp_socket { getattr getopt read write };

View file

@ -1,4 +1,4 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
# Copyright (c) 2018, 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
@ -24,8 +24,45 @@
# 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.
# # Changes from Qualcomm Innovation Center are provided under the following license:
# #
# # Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
# #
# # Redistribution and use in source and binary forms, with or without
# # modification, are permitted (subject to the limitations in the
# # disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
# # contributors may be used to endorse or promote products derived
# # from this software without specific prior written permission.
# #
# # NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
# # GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
# # HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
# # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# # IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
get_prop(vold, vendor_tee_listener_prop)
# Based on the comment from b/111409607 FITRIM might
# be needed
allow vold mnt_vendor_file:dir { open read ioctl };
userdebug_or_eng(`
dontaudit vold vendor_qmcs_file:dir { read };
')

View file

@ -187,4 +187,67 @@ genfscon sysfs /devices/platform/soc/1d84000.ufshc/host0/target0:0:0/0:0:0:5/scs
genfscon sysfs /devices/platform/soc/1d84000.ufshc/host0/target0:0:0/0:0:0:6/scsi_generic u:object_r:vendor_sysfs_scsi_target:s0
genfscon sysfs /devices/platform/soc/1d84000.ufshc/host0/target0:0:0/0:0:0:7/scsi_generic u:object_r:vendor_sysfs_scsi_target:s0
genfscon sysfs /devices/platform/soc/3d00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/gpu_model u:object_r:vendor_sysfs_kgsl_gpu_model:s0
genfscon sysfs /devices/platform/soc/3d00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/gpu_model u:object_r:vendor_sysfs_kgsl_gpu_model:s0
#wakeup sysfs nodes listed by SuspendSepolicyTests.sh
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-03/c440000.qcom,spmi:qcom,pm8350b@3:qcoject_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pmk8350@0:ponject_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/88e0000.qcom,msm-eud/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,qbt_handler/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/fastrpc/adsprpc-smd/wakeup12 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/fastrpc/adsprpc-smd-secure/wakeup13 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pmk8350@0:rtct_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pmk8350@0:rtcp15 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/a600000.ssusb/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/a800000.ssusb/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/1e00000.qcom,ipa/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pmk8350@0:ponobject_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,ipa_fws/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,ipa_fws/subsys0/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/abb0000.qcom,evass/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/abb0000.qcom,evass/subsys1/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,trustedvm@d0800000/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,trustedvm@d0800000/subsys2/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,kgsl-hyp/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,kgsl-hyp/subsys3/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/98900000.qcom,turing/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,smp2p-adsp/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/98900000.qcom,turing/subsys4/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/188101c.qcom,spss/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/188101c.qcom,spss/subsys5/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/17300000.qcom,lpass/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/17300000.qcom,lpass/subsys6/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/5c00000.qcom,ssc/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/5c00000.qcom,ssc/subsys7/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/1c00000.qcom,pcie/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/1c08000.qcom,pcie/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/4080000.qcom,mss/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,smp2p-dsps/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/4080000.qcom,mss/subsys8/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/890000.qcom,qup_uart/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/aab0000.qcom,venus/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/aab0000.qcom,venus/subsys9/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:gpio_keys/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/884000.i2c/i2c-2/2-0028/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/b0000000.qcom,cnss-qca6490/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/b0000000.qcom,cnss-qca6490/subsys10/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/1c00000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/1103_00.01.00/wfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,smp2p-nsp/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_aac/wakeup51 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_alac/wakeup52 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_amrnb/wakeup53 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_amrwb/wakeup54 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_amrwbplus/wakeup55 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_ape/wakeup56 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_evrc/wakeup57 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_g711alaw/wakeup58 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,smp2p-modem/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_mp3/wakeup60 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_qcelp/wakeup62 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_wma/wakeup63 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/misc/msm_wmapro/wakeup64 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,smp2p_sleepstate/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qcom,battery_charger/wakeup u:p:s0
genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/dummy_hcd.0/usb1/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink_log/wakeup u:object_r:sysfs_wakeup:s0

View file

@ -244,6 +244,7 @@
# Feature configs
/sys/devices/platform/soc/780000.qfprom/qfprom0/feat_conf* u:object_r:vendor_sysfs_qfprom:s0
/sys/devices/platform/soc/soc:qfprom@0/feat_conf* u:object_r:vendor_sysfs_qfprom:s0
# mmc device type
/sys/devices/platform/soc/8804000.sdhci/mmc_host/mmc0/mmc0:[a-f0-9]+/type u:object_r:vendor_sysfs_mmc_device_type:s0

View file

@ -134,6 +134,7 @@ genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qco
genfscon sysfs /devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-02/c42d000.qcom,spmi:qcom,pm8350c@2:qcom,leds@ef00/leds/red u:object_r:vendor_sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-02/c42d000.qcom,spmi:qcom,pm8350c@2:qcom,leds@ef00/leds/green u:object_r:vendor_sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-02/c42d000.qcom,spmi:qcom,pm8350c@2:qcom,leds@ef00/leds/blue u:object_r:vendor_sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-09/c42d000.qcom,spmi:qcom,pm7250b@3:qcom,vibrator@5300/leds/vibrator u:object_r:sysfs_leds:s0
#PMIC devices wakeup nodes
genfscon sysfs /devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-00/c42d000.qcom,spmi:qcom,pmk8350@0:pon_hlos@1300/c42d000.qcom,spmi:qcom,pmk8350@0:pon_hlos@1300:pwrkey/wakeup/wakeup u:object_r:sysfs_wakeup:s0
@ -197,13 +198,16 @@ genfscon sysfs /devices/platform/soc/soc:qcom,remoteproc-esoc0/esoc0 u:object_r:
genfscon sysfs /devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable u:object_r:vendor_sysfs_trusted_touch_enable:s0
#genfscon sysfs /devices/platform/soc/988000.i2c/i2c-1/1-0038/trusted_touch_enable u:object_r:vendor_sysfs_trusted_touch_enable:s0
genfscon sysfs /devices/platform/soc/990000.spi/spi_master/spi0/spi0.0/trusted_touch_enable u:object_r:vendor_sysfs_trusted_touch_enable:s0
genfscon sysfs /devices/platform/soc/980000.i2c/i2c-0/0-0062/trusted_touch_enable u:object_r:vendor_sysfs_trusted_touch_enable:s0
#genfscon sysfs /devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_event u:object_r:vendor_sysfs_trusted_touch_event:s0
genfscon sysfs /devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_event u:object_r:vendor_sysfs_trusted_touch_event:s0
#genfscon sysfs /devices/platform/soc/988000.i2c/i2c-1/1-0038/trusted_touch_event u:object_r:vendor_sysfs_trusted_touch_event:s0
genfscon sysfs /devices/platform/soc/990000.spi/spi_master/spi0/spi0.0/trusted_touch_event u:object_r:vendor_sysfs_trusted_touch_event:s0
genfscon sysfs /devices/platform/soc/980000.i2c/i2c-0/0-0062/trusted_touch_event u:object_r:vendor_sysfs_trusted_touch_event:s0
genfscon sysfs /devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_type u:object_r:vendor_sysfs_trusted_touch_type:s0
genfscon sysfs /devices/platform/soc/990000.spi/spi_master/spi0/spi0.0/trusted_touch_type u:object_r:vendor_sysfs_trusted_touch_type:s0
genfscon sysfs /devices/platform/soc/980000.i2c/i2c-0/0-0062/trusted_touch_type u:object_r:vendor_sysfs_trusted_touch_type:s0
# Feature configs for Cedros
genfscon sysfs /devices/platform/soc/soc:qfprom@0/feat_conf_m7 u:object_r:vendor_sysfs_qfprom:s0
@ -216,3 +220,41 @@ genfscon sysfs /kernel/load_guestvm_cpusys_vm/boot_guestvm u:object_r:vendor_sys
genfscon sysfs /kernel/load_guestvm_trustedvm/boot_guestvm u:object_r:vendor_sysfs_guestvm:s0
genfscon sysfs /devices/platform/soc/3d00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/gpu_model u:object_r:vendor_sysfs_kgsl_gpu_model:s0
#net sysfs
genfscon sysfs /devices/platform/soc/17110040.qcom,wcn6750/net u:object_r:sysfs_net:s0
#wakeup sysfs nodes listed by SuspendSepolicyTests.sh
genfscon sysfs /devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-00/c42d000.qcom,spmi:qcom,pmk8350@0:rtc@6100/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-00/c42d000.qcom,spmi:qcom,pmk8350@0:rtc@6100/rtc/rtc0/alarmtimer.0.auto/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/88e0000.qcom,msm-eud/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,qbt_handler/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,smp2p_sleepstate/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink_log/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/188101c.remoteproc-spss/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/894000.qcom,qup_uart/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/b0000000.qcom,cnss-qca6490/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/a84000.i2c/i2c-1/1-0028/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-00/c42d000.qcom,spmi:qcom,pmk8350@0:pon_hlos@1300/c42d000.qcom,spmi:qcom,pmk8350@0:pon_hlos@1300:pwrkey/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/fastrpc/adsprpc-smd/wakeup24 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/virtual/fastrpc/adsprpc-smd-secure/wakeup25 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-00/c42d000.qcom,spmi:qcom,pmk8350@0:pon_hlos@1300/c42d000.qcom,spmi:qcom,pmk8350@0:pon_hlos@1300:resin/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/1c00000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/mhi0/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/a600000.ssusb/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/3000000.remoteproc-adsp/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:gpio_keys/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/32300000.remoteproc-cdsp/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/2400000.remoteproc-slpi/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/4080000.remoteproc-mss/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/3e00000.qcom,ipa/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/1c00000.qcom,pcie/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,smp2p-adsp/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qcom,battery_charger/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:spf_core_platform/soc:spf_core_platform:lpass-cdc/va-macro/va_swr_ctrl/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qcom,ucsi/power_supply/ucsi-source-psy-soc:qcom,pmic_glink:qcom,ucsi1/wakeup58 u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/1c08000.qcom,pcie/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,smp2p-dsps/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,smp2p-cdsp/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,smp2p-modem/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/dummy_hcd.0/usb1/wakeup u:object_r:sysfs_wakeup:s0

69
generic/vendor/test/dlsc.te vendored Normal file
View file

@ -0,0 +1,69 @@
# Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted (subject to the limitations in the
# disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
# GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
# HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER 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_dlsc, domain;
type vendor_dlsc_exec, exec_type, vendor_file_type, file_type;
net_domain(vendor_dlsc)
init_daemon_domain(vendor_dlsc)
allow vendor_dlsc vendor_dlsc_socket:dir w_dir_perms;
allow vendor_dlsc vendor_dlsc_socket:sock_file create_file_perms;
allow vendor_dlsc self:netlink_xfrm_socket { create_socket_perms_no_ioctl nlmsg_write nlmsg_read };
allow vendor_dlsc self:netlink_generic_socket create_socket_perms_no_ioctl;
allow vendor_dlsc self:netlink_route_socket nlmsg_write;
allow vendor_dlsc self:netlink_socket create_socket_perms_no_ioctl;
allow vendor_dlsc self:qipcrtr_socket create_socket_perms_no_ioctl;
allowxperm vendor_dlsc self:udp_socket ioctl priv_sock_ioctls;
sprhd_socket(vendor_dlsc);
allow vendor_dlsc sysfs_net:dir r_dir_perms;
allow vendor_dlsc sysfs_net:file rw_file_perms;
allow vendor_dlsc vendor_sysfs_data:file r_file_perms;
allow vendor_dlsc proc_net:file rw_file_perms;
#Allow netutils usage
domain_auto_trans(vendor_dlsc, netutils_wrapper_exec, netutils_wrapper)
use_netutils(vendor_dlsc)
#Allow diag logging
userdebug_or_eng(`
r_dir_file(vendor_dlsc, vendor_sysfs_diag)
')
allow vendor_dlsc self:capability { net_admin net_raw };
#Allow ifconfig execution
allow vendor_dlsc { vendor_shell_exec vendor_toolbox_exec }:file rx_file_perms;

View file

@ -24,6 +24,39 @@
# 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.
# Changes from Qualcomm Innovation Center are provided under the following license:
#
# Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted (subject to the limitations in the
# disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
# GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
# HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
# kgsl snapshot file type for sysfs access
type vendor_sysfs_kgsl_snapshot, sysfs_type, fs_type;
@ -42,3 +75,7 @@ typeattribute vendor_sensors_vendor_data_file mlstrustedobject;
type vendor_debugfs_bt_tracing, tracefs_type, debugfs_type, fs_type;
type vendor_debugfs_kgsl_fence_tracing, tracefs_type, debugfs_type, fs_type;
type vendor_dlsc_socket, file_type;
type vendor_sprhdd_socket, file_type;

View file

@ -24,6 +24,39 @@
# 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.
# Changes from Qualcomm Innovation Center are provided under the following license:
#
# Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted (subject to the limitations in the
# disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
# GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
# HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
/(vendor|system/vendor)/bin/kernel-tests/smd.* u:object_r:vendor_smd_test_exec:s0
/(vendor|system/vendor)/bin/qmi-framework-tests/qmi_ping.* u:object_r:vendor_qmi_ping_exec:s0
@ -66,6 +99,11 @@
/(vendor|system/vendor)/bin/InstallKeybox u:object_r:vendor_sectest_exec:s0
/(vendor|system/vendor)/bin/tracing_config\.sh u:object_r:vendor_smtrace_tracing_exec:s0
# Sprhd
/vendor/bin/sprhdd u:object_r:vendor_sprhdd_exec:s0
/vendor/bin/dlsc u:object_r:vendor_dlsc_exec:s0
/dev/socket/sprhd(/.*)? u:object_r:vendor_sprhdd_socket:s0
#Authentication and FIDO
/(vendor|system/vendor)/bin/sampleauthdaemon u:object_r:vendor_fidotest_exec:s0
/(vendor|system/vendor)/bin/qseeproxysampledaemon u:object_r:vendor_qseeproxysample_exec:s0
@ -99,6 +137,7 @@
/data/vendor/ts_loopback(/.*)? u:object_r:vendor_ts_loopback_data_file:s0
# snapcam libs
/vendor/lib(64)?/libjni_imageutil\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libjni_mfnrutil\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libjni_aidenoiserutil\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libjni_aidenoiserutilv2\.so u:object_r:same_process_hal_file:s0

3
generic/vendor/test/seapp_contexts vendored Normal file → Executable file
View file

@ -46,3 +46,6 @@ user=system seinfo=platform name=com.qti.diagservices domain=qtidiagservices_app
#Add new domain for VT loopback app
user=_app seinfo=platform name=com.qti.vtloopback domain=vtloopback_app type=app_data_file levelfrom=all
#Add new domain for snapcam app
user=_app isPrivApp=true name=org.codeaurora.snapcam domain=vendor_snapcam_app type=app_data_file levelFrom=all

47
generic/vendor/test/snapcam.te vendored Executable file
View file

@ -0,0 +1,47 @@
#Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
#Redistribution and use in source and binary forms, with or without
#modification, are permitted (subject to the limitations in the
#disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
#GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
#HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
#WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
#IN NO EVENT SHALL THE COPYRIGHT HOLDER 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_snapcam_app, domain;
hal_client_domain(vendor_snapcam_app, vendor_hal_perf);
app_domain(vendor_snapcam_app);
allow vendor_snapcam_app cameraserver_service:service_manager find;
get_prop(vendor_snapcam_app, vendor_persist_camera_prop)
allow vendor_snapcam_app nfc_service:service_manager find;
binder_call(vendor_snapcam_app, gpuservice)
allow vendor_snapcam_app app_api_service:service_manager find;
allow vendor_snapcam_app audioserver_service:service_manager find;
allow vendor_snapcam_app mediaextractor_service:service_manager find;
allow vendor_snapcam_app mediametrics_service:service_manager find;
allow vendor_snapcam_app mediaserver_service:service_manager find;

63
generic/vendor/test/sprhdd.te vendored Normal file
View file

@ -0,0 +1,63 @@
# Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted (subject to the limitations in the
# disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
# GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
# HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER 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_sprhdd, domain;
type vendor_sprhdd_exec, exec_type, vendor_file_type, file_type;
net_domain(vendor_sprhdd)
init_daemon_domain(vendor_sprhdd)
allow vendor_sprhdd vendor_sprhdd_socket:dir w_dir_perms;
allow vendor_sprhdd vendor_sprhdd_socket:sock_file create_file_perms;
allow vendor_sprhdd vendor_sprhdd_socket:sock_file { read write };
allow vendor_sprhdd self:netlink_xfrm_socket { create_socket_perms_no_ioctl nlmsg_write nlmsg_read };
allow vendor_sprhdd self:netlink_generic_socket create_socket_perms_no_ioctl;
allow vendor_sprhdd self:netlink_route_socket nlmsg_write;
allow vendor_sprhdd self:netlink_socket create_socket_perms_no_ioctl;
allow vendor_sprhdd self:socket create_socket_perms;
allow vendor_sprhdd self:qipcrtr_socket create_socket_perms_no_ioctl;
allowxperm vendor_sprhdd self:socket ioctl msm_sock_ipc_ioctls;
allowxperm vendor_sprhdd self:udp_socket ioctl priv_sock_ioctls;
allow vendor_sprhdd vendor_sprhdd:unix_stream_socket connectto;
allow vendor_sprhdd sysfs_net:dir r_dir_perms;
allow vendor_sprhdd sysfs_net:file rw_file_perms;
allow vendor_sprhdd vendor_sysfs_data:file r_file_perms;
use_netutils(vendor_sprhdd)
# Allow diag logging
userdebug_or_eng(`
r_dir_file(vendor_sprhdd, vendor_sysfs_diag)
')
allow vendor_sprhdd self:capability { net_admin net_raw kill };

View file

@ -62,6 +62,9 @@ allow vendor_agmservice_qti vendor_audio_data_file:file create_file_perms;
# agm audio thread needs RT scheduling for LL/ULL audio, allow sys_nice
allow vendor_agmservice_qti self:global_capability_class_set sys_nice;
#Allow to trigger SSR when unable to communicate with ADSP
allow vendor_agmservice_qti vendor_sysfs_adsp_ssr:file w_file_perms;
userdebug_or_eng(`
#Allow for property access
get_prop(vendor_agmservice_qti,vendor_audio_debug_prop)

View file

@ -68,6 +68,9 @@ genfscon sysfs /kernel/msm_performance/parameters/inst u:object_r:vendor_sysfs_m
genfscon sysfs /kernel/msm_performance/parameters/splh_notif u:object_r:vendor_sysfs_msm_perf:s0
genfscon sysfs /kernel/msm_performance/parameters/splh_sample_ms u:object_r:vendor_sysfs_msm_perf:s0
genfscon sysfs /kernel/msm_performance/parameters/splh_log_level u:object_r:vendor_sysfs_msm_perf:s0
genfscon sysfs /kernel/msm_performance/parameters/lplh_notif u:object_r:vendor_sysfs_msm_perf:s0
genfscon sysfs /kernel/msm_performance/parameters/lplh_sample_ms u:object_r:vendor_sysfs_msm_perf:s0
genfscon sysfs /kernel/msm_performance/parameters/lplh_log_level u:object_r:vendor_sysfs_msm_perf:s0
genfscon sysfs /kernel/msm_performance/notify/aggr_big_nr u:object_r:vendor_sysfs_msm_perf:s0
genfscon sysfs /kernel/msm_performance/notify/aggr_top_load u:object_r:vendor_sysfs_msm_perf:s0

View file

@ -1,4 +1,4 @@
# Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
# Copyright (c) 2018-2019, 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
@ -37,3 +37,5 @@ allow hal_camera vendor_sysfs_jpeg:file r_file_perms;
allow hal_camera vendor_sysfs_ddr:file r_file_perms;
allow hal_camera vendor_qdisplay_service:service_manager find;
use_libsoc_helper(hal_camera);

View file

@ -29,6 +29,7 @@
#Allow mediacodec to access service manager wfdnativemm_service
allow mediacodec vendor_wfdnativemm_service:service_manager find;
allow mediacodec audio_device:chr_file rw_file_perms;
allow mediacodec vendor_dmabuf_system_heap_device:chr_file r_file_perms;
allow mediacodec vendor_membuf_dev:chr_file r_file_perms;
allow mediacodec vendor_vm_cp_bitstream_device:chr_file r_file_perms;
binder_call(mediacodec, vendor_wifidisplayhalservice_qti);

View file

@ -24,6 +24,39 @@
# 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.
# Changes from Qualcomm Innovation Center are provided under the following license:
#
# Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted (subject to the limitations in the
# disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
# GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
# HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
#####################################
# use_diag_handler_ffbm(clientdomain)
@ -32,4 +65,16 @@ define(`use_diag_handler_ffbm', `
userdebug_or_eng(`
set_prop($1, vendor_boot_mode_prop);
')
')
')
#####################################
# sprhd_socket(clientdomain)
# Allow client domain to connecto and send
# via a local socket to the sprhdd domain.
# Also allow the client domain to remove
# its own socket.
define(`sprhd_socket', `
allow $1 vendor_sprhdd_socket:dir r_dir_perms;
unix_socket_connect($1, vendor_sprhdd, vendor_sprhdd)
allow $1 vendor_sprhdd_socket:sock_file { read write };
')