[ALPS04421353] MtkCam: modify sepolicy for jpeg

[Detail]
add ioctl for camerahalserver jpegnode
jpegnode need to control jpeg io

MTK-Commit-Id: c1adc06defb2aab6e9402f45c0f2b92bcfa83a5e

Change-Id: Ie8f65b38133fc46b3a46e3ed04b42d6f09ad13cc
CR-Id: ALPS04421353
Feature: Cshot (Continuous Shot)
This commit is contained in:
jamy.tseng 2020-01-18 10:11:44 +08:00
parent 3c4854c9f5
commit 142bfb6b36
4 changed files with 15 additions and 0 deletions

View File

@ -53,6 +53,7 @@ type proc_mtktz, fs_type, proc_type;
type proc_slogger, fs_type, proc_type;
type proc_lk_env, fs_type, proc_type;
type proc_ged, fs_type, proc_type;
type proc_mtk_jpeg, fs_type, proc_type;
type proc_perfmgr, fs_type, proc_type;
type proc_wmtdbg, fs_type, proc_type;
type proc_zraminfo, fs_type, proc_type;

View File

@ -18,6 +18,7 @@ genfscon proc /driver/icusb u:object_r:proc_icusb:s0
genfscon proc /mrdump_rst u:object_r:proc_mrdump_rst:s0
genfscon proc /mtk_battery_cmd u:object_r:proc_battery_cmd:s0
genfscon proc /ged u:object_r:proc_ged:s0
genfscon proc /mtk_jpeg u:object_r:proc_mtk_jpeg:s0
genfscon proc /perfmgr u:object_r:proc_perfmgr:s0
genfscon proc /driver/wmt_dbg u:object_r:proc_wmtdbg:s0

View File

@ -21,3 +21,8 @@ define(`EARA_GETUSAGE', `0x6703')
define(`PERFMGR_CPU_PREFER', `0x6701')
define(`MMC_IOCTLCMD', `0xb300')
define(`UFS_IOCTLCMD', `0x5388')
define(`JPG_BRIDGE_ENC_IO_INIT', `0x780b')
define(`JPG_BRIDGE_ENC_IO_CONFIG', `0x780c')
define(`JPG_BRIDGE_ENC_IO_WAIT', `0x780d')
define(`JPG_BRIDGE_ENC_IO_DEINIT', `0x780e')
define(`JPG_BRIDGE_ENC_IO_START', `0x780f')

View File

@ -63,6 +63,14 @@ hal_client_domain(mtk_hal_camera, hal_graphics_allocator)
# Purpose: Camera-related devices (driver)
# -----------------------------------
allow mtk_hal_camera proc:file { read ioctl open };
allow mtk_hal_camera proc_mtk_jpeg:file r_file_perms;
allowxperm mtk_hal_camera proc_mtk_jpeg:file ioctl {
JPG_BRIDGE_ENC_IO_INIT
JPG_BRIDGE_ENC_IO_CONFIG
JPG_BRIDGE_ENC_IO_WAIT
JPG_BRIDGE_ENC_IO_DEINIT
JPG_BRIDGE_ENC_IO_START
};
allow mtk_hal_camera sysfs:file { read write open getattr };
allow mtk_hal_camera camera_sysram_device:chr_file r_file_perms;