Merge "Add read permissoin of proc_meminfo for IOP Hal."
diff --git a/generic/vendor/common/hal_camera_default.te b/generic/vendor/common/hal_camera_default.te
index 4d09d4d..db65465 100644
--- a/generic/vendor/common/hal_camera_default.te
+++ b/generic/vendor/common/hal_camera_default.te
@@ -24,4 +24,4 @@
 # 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.
-vndbinder_use(hal_camera_default);
+vndbinder_use(hal_camera_default);
\ No newline at end of file
diff --git a/generic/vendor/common/surfaceflinger.te b/generic/vendor/common/surfaceflinger.te
index 8ea8e6c..39fbeca 100644
--- a/generic/vendor/common/surfaceflinger.te
+++ b/generic/vendor/common/surfaceflinger.te
@@ -28,6 +28,7 @@
 dontaudit surfaceflinger kernel:system module_request;
 
 allow surfaceflinger vendor_sysfs_graphics:file rw_file_perms;
+allow surfaceflinger hal_graphics_composer_default:dir search;
 
 get_prop(surfaceflinger, vendor_gralloc_prop)
 get_prop(surfaceflinger, vendor_display_prop)
diff --git a/generic/vendor/lahaina/genfs_contexts b/generic/vendor/lahaina/genfs_contexts
index a800b8a..9af37d8 100644
--- a/generic/vendor/lahaina/genfs_contexts
+++ b/generic/vendor/lahaina/genfs_contexts
@@ -157,6 +157,9 @@
 genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qcom,battery_charger/power_supply/wireless/wakeup u:object_r:sysfs_wakeup:s0
 genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qcom,battery_charger/wakeup/wakeup u:object_r:sysfs_wakeup:s0
 
+# Wakeup node needed for a Lahaina variant
+genfscon sysfs /devices/platform/soc/soc:gpio_keys/wakeup/wakeup u:object_r:sysfs_wakeup:s0
+
 # USB device controller and wakeup nodes
 genfscon sysfs /devices/platform/soc/a600000.ssusb/a600000.dwc3/udc/a600000.dwc3 u:object_r:vendor_sysfs_usb_controller:s0
 genfscon sysfs /devices/platform/soc/a600000.ssusb/wakeup/wakeup u:object_r:sysfs_wakeup:s0
@@ -231,3 +234,6 @@
 genfscon sysfs /devices/platform/soc/soc:qcom,msm-audio-apr/soc:qcom,msm-audio-apr:qcom,q6core-audio/soc:qcom,msm-audio-apr:qcom,q6core-audio:bolero-cdc/tx-macro/tx_swr_ctrl/wakeup u:object_r:sysfs_wakeup:s0
 genfscon sysfs /devices/platform/soc/soc:qcom,msm-audio-apr/soc:qcom,msm-audio-apr:qcom,q6core-audio/soc:qcom,msm-audio-apr:qcom,q6core-audio:bolero-cdc/rx-macro/rx_swr_ctrl/wakeup u:object_r:sysfs_wakeup:s0
 genfscon sysfs /devices/platform/soc/soc:qcom,msm-audio-apr/soc:qcom,msm-audio-apr:qcom,q6core-audio/soc:qcom,msm-audio-apr:qcom,q6core-audio:bolero-cdc/wsa-macro/wsa_swr_ctrl/wakeup u:object_r:sysfs_wakeup:s0
+
+#net for kodiak
+genfscon sysfs /devices/platform/soc/17a10040.qcom,wcn6750/net u:object_r:sysfs_net:s0
diff --git a/generic/vendor/lahaina/hal_camera_default.te b/generic/vendor/lahaina/hal_camera_default.te
new file mode 100644
index 0000000..5754a21
--- /dev/null
+++ b/generic/vendor/lahaina/hal_camera_default.te
@@ -0,0 +1,28 @@
+# 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
+# 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.
+
+allow hal_camera_default tee_device:chr_file rw_file_perms;
\ No newline at end of file
diff --git a/qva/vendor/common/file.te b/qva/vendor/common/file.te
index a54aafe..bb6cc61 100644
--- a/qva/vendor/common/file.te
+++ b/qva/vendor/common/file.te
@@ -1,4 +1,4 @@
-# Copyright (c) 2018-2020, 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
@@ -140,3 +140,5 @@
 #slub-debug
 type vendor_sysfs_slab_zshandle_storeuser, fs_type, sysfs_type;
 type vendor_sysfs_slab_zspage_storeuser, fs_type, sysfs_type;
+
+type vendor_sysfs_usb_node, fs_type, sysfs_type;
diff --git a/qva/vendor/common/genfs_contexts b/qva/vendor/common/genfs_contexts
index 9623261..04c694e 100644
--- a/qva/vendor/common/genfs_contexts
+++ b/qva/vendor/common/genfs_contexts
@@ -1,4 +1,4 @@
-# Copyright (c) 2018-2020, 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
@@ -47,3 +47,5 @@
 
 genfscon sysfs /kernel/slab/zs_handle/store_user u:object_r:vendor_sysfs_slab_zshandle_storeuser:s0
 genfscon sysfs /kernel/slab/zspage/store_user u:object_r:vendor_sysfs_slab_zspage_storeuser:s0
+
+genfscon sysfs /devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.2.auto/usb    u:object_r:vendor_sysfs_usb_node:s0
diff --git a/qva/vendor/common/qvrd.te b/qva/vendor/common/qvrd.te
index 79863aa..d0b02c2 100644
--- a/qva/vendor/common/qvrd.te
+++ b/qva/vendor/common/qvrd.te
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
+# Copyright (c) 2016-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
@@ -92,3 +92,7 @@
 get_prop(vendor_qvrd, vendor_qvr_persist_prop)
 get_prop(vendor_qvrd, vendor_qvrd_persist_prop)
 allow vendor_qvrd video_device:chr_file w_file_perms;
+
+#allow qvrd to access hid event
+allow vendor_qvrd vendor_sysfs_usb_node:dir r_dir_perms;
+allow vendor_qvrd vendor_sysfs_usb_node:file r_file_perms;