diff --git a/generic/vendor/lahaina/hal_perf_default.te b/generic/vendor/lahaina/hal_perf_default.te index 1c17d25cb..fabb1d212 100644 --- a/generic/vendor/lahaina/hal_perf_default.te +++ b/generic/vendor/lahaina/hal_perf_default.te @@ -1,4 +1,4 @@ -# Copyright (c) 2020, The Linux Foundation. All rights reserved. +# Copyright (c) 2020,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,3 +24,5 @@ # 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. + +hal_client_domain(vendor_hal_perf_default, vendor_hal_poweroptservice) diff --git a/generic/vendor/taro/hal_perf_default.te b/generic/vendor/taro/hal_perf_default.te index acad1ac48..b071ec97e 100644 --- a/generic/vendor/taro/hal_perf_default.te +++ b/generic/vendor/taro/hal_perf_default.te @@ -1,4 +1,4 @@ -# Copyright (c) 2020 The Linux Foundation. All rights reserved. +# Copyright (c) 2020,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 @@ -27,3 +27,4 @@ allow vendor_hal_perf_default self:capability kill; allow vendor_hal_perf_default {appdomain}:process sigkill; +hal_client_domain(vendor_hal_perf_default, vendor_hal_poweroptservice) diff --git a/qva/vendor/lahaina/file_contexts b/qva/vendor/lahaina/file_contexts index 682af45ac..60d80771c 100644 --- a/qva/vendor/lahaina/file_contexts +++ b/qva/vendor/lahaina/file_contexts @@ -1,4 +1,4 @@ -# Copyright (c) 2020, The Linux Foundation. All rights reserved. +# Copyright (c) 2020,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 @@ -29,3 +29,5 @@ /data/vendor/face3d_dir(/.*)? u:object_r:vendor_biometricsface_data_file:s0 /(vendor|system/vendor)/bin/hw/vendor\.qti\.hardware\.eid@1\.0-service u:object_r:vendor_hal_eid_qti_exec:s0 + +/sys/devices(/platform)?/soc/[a-f0-9]+.ufshc/spm_lvl u:object_r:vendor_sysfs_scsi_host:s0 diff --git a/qva/vendor/lahaina/powermodule_app.te b/qva/vendor/lahaina/powermodule_app.te new file mode 100644 index 000000000..c45dab51f --- /dev/null +++ b/qva/vendor/lahaina/powermodule_app.te @@ -0,0 +1,36 @@ +# 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. + +#Define Domain for Power module +type vendor_powermodule_app, domain; +app_domain(vendor_powermodule_app); + +hal_client_domain(vendor_powermodule_app, vendor_hal_perf); +hal_client_domain(vendor_powermodule_app, vendor_hal_poweroptservice) + +# Allow invoking activity of vendor_powermodule_app +allow vendor_powermodule_app app_api_service:service_manager find; diff --git a/qva/vendor/lahaina/seapp_contexts b/qva/vendor/lahaina/seapp_contexts index fa3ba70b2..9eba2641c 100644 --- a/qva/vendor/lahaina/seapp_contexts +++ b/qva/vendor/lahaina/seapp_contexts @@ -1,4 +1,4 @@ -# Copyright (c) 2020, The Linux Foundation. All rights reserved. +# Copyright (c) 2020,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 @@ -27,3 +27,6 @@ #Add new domain for eid app user=system seinfo=platform name=.eidservices domain=vendor_eid_app type=system_app_data_file + +#Add new domain for powermodule app +user=_app seinfo=platform name=.powermodule domain=vendor_powermodule_app type=app_data_file levelFrom=all \ No newline at end of file diff --git a/qva/vendor/taro/file_contexts b/qva/vendor/taro/file_contexts index cfd52c555..ad2d18a15 100644 --- a/qva/vendor/taro/file_contexts +++ b/qva/vendor/taro/file_contexts @@ -1,4 +1,4 @@ -# Copyright (c) 2020, The Linux Foundation. All rights reserved. +# Copyright (c) 2020,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 @@ -36,3 +36,5 @@ ################################### #camera /sys/firmware/devicetree/base/memory/ddr_device_type u:object_r:vendor_sysfs_ddr:s0 + +/sys/devices(/platform)?/soc/[a-f0-9]+.ufshc/spm_lvl u:object_r:vendor_sysfs_scsi_host:s0 diff --git a/qva/vendor/taro/powermodule_app.te b/qva/vendor/taro/powermodule_app.te new file mode 100644 index 000000000..c45dab51f --- /dev/null +++ b/qva/vendor/taro/powermodule_app.te @@ -0,0 +1,36 @@ +# 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. + +#Define Domain for Power module +type vendor_powermodule_app, domain; +app_domain(vendor_powermodule_app); + +hal_client_domain(vendor_powermodule_app, vendor_hal_perf); +hal_client_domain(vendor_powermodule_app, vendor_hal_poweroptservice) + +# Allow invoking activity of vendor_powermodule_app +allow vendor_powermodule_app app_api_service:service_manager find; diff --git a/qva/vendor/taro/seapp_contexts b/qva/vendor/taro/seapp_contexts index f20384d86..543eb07ea 100644 --- a/qva/vendor/taro/seapp_contexts +++ b/qva/vendor/taro/seapp_contexts @@ -1,4 +1,4 @@ -# Copyright (c) 2020, The Linux Foundation. All rights reserved. +# Copyright (c) 2020,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 @@ -27,3 +27,6 @@ #Add new domain for eid app user=_app seinfo=platform name=.eidservices domain=vendor_eid_app type=app_data_file levelFrom=all + +#Add new domain for powermodule app +user=_app seinfo=platform name=.powermodule domain=vendor_powermodule_app type=app_data_file levelFrom=all \ No newline at end of file