From 5e81b738ca4ad93fd17d78c2aae5f711684b5341 Mon Sep 17 00:00:00 2001 From: Haojie Li Date: Sat, 18 Jan 2020 10:20:59 +0800 Subject: [PATCH] [ALPS04475916] D2+ Add M4U SELinux Permission [Detail] add selinux permission for camera MTK-Commit-Id: f21aac620680035891c6cab33de49a2c02f659eb Change-Id: I4a0134dda8c8411be3bb2c3a9c69f1e91803a91e CR-Id: ALPS04475916 Feature: [Android Default] Camera Application Basic Functions --- non_plat/ioctl_defines | 5 ++++- non_plat/mtk_hal_camera.te | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/non_plat/ioctl_defines b/non_plat/ioctl_defines index f777d82..093ce17 100755 --- a/non_plat/ioctl_defines +++ b/non_plat/ioctl_defines @@ -61,5 +61,8 @@ define(`JPG_BRIDGE_ENC_IO_DEINIT', `0x780e') define(`JPG_BRIDGE_ENC_IO_START', `0x780f') ##################################### # m4u_priv.h -define(`MTK_M4U_T_SEC_INIT', `0x6732') +define(`MTK_M4U_T_ALLOC_MVA', `0x6704') +define(`MTK_M4U_T_DEALLOC_MVA', `0x6705') define(`MTK_M4U_T_CONFIG_PORT', `0x670b') +define(`MTK_M4U_T_DMA_OP', `0x671d') +define(`MTK_M4U_T_SEC_INIT', `0x6732') \ No newline at end of file diff --git a/non_plat/mtk_hal_camera.te b/non_plat/mtk_hal_camera.te index db30551..9bf5adc 100644 --- a/non_plat/mtk_hal_camera.te +++ b/non_plat/mtk_hal_camera.te @@ -344,7 +344,13 @@ allow mtk_hal_camera sysfs_dt_firmware_android:dir search; # Date: 2019/07/09 # Operation : For M4U security allow mtk_hal_camera proc_m4u:file r_file_perms; -allowxperm mtk_hal_camera proc_m4u:file ioctl MTK_M4U_T_SEC_INIT; +allowxperm mtk_hal_camera proc_m4u:file ioctl{ +MTK_M4U_T_ALLOC_MVA +MTK_M4U_T_DEALLOC_MVA +MTK_M4U_T_CONFIG_PORT +MTK_M4U_T_DMA_OP +MTK_M4U_T_SEC_INIT +}; # Date: 2019/08/27 # Operation : For android Q allowing ioctl