2020-01-18 09:29:32 +08:00
|
|
|
# ==============================================
|
|
|
|
# MTK Policy Rule
|
|
|
|
# ============
|
|
|
|
|
|
|
|
# Data : WK14.42
|
|
|
|
# Operation : Migration
|
|
|
|
# Purpose : Video playback
|
|
|
|
allow surfaceflinger sw_sync_device:chr_file { rw_file_perms };
|
|
|
|
allow surfaceflinger debug_prop:property_service set;
|
|
|
|
|
|
|
|
# Date : WK16.33
|
|
|
|
# Purpose: Allow to access ged for gralloc_extra functions
|
2020-01-18 09:29:41 +08:00
|
|
|
allow surfaceflinger proc_ged:file {open read write ioctl getattr};
|
2020-01-18 09:29:32 +08:00
|
|
|
|
|
|
|
# Date : W16.42
|
|
|
|
# Operation : Integration
|
|
|
|
# Purpose : DRM / DRI GPU driver required
|
|
|
|
|
|
|
|
allow surfaceflinger gpu_device:dir search;
|
|
|
|
|
|
|
|
# Date : WK17.12
|
|
|
|
# Purpose: Fix bootup fail
|
2020-01-18 09:43:36 +08:00
|
|
|
allow surfaceflinger proc_bootprof:file r_file_perms;
|
2020-01-18 09:29:32 +08:00
|
|
|
|
|
|
|
#============= surfaceflinger ==============
|
|
|
|
allow surfaceflinger debugfs_ion:dir search;
|
|
|
|
|
|
|
|
# Date : WK17.30
|
|
|
|
# Operation : O Migration
|
|
|
|
# Purpose: Allow to access cmdq driver
|
|
|
|
allow surfaceflinger mtk_cmdq_device:chr_file { read ioctl open };
|
|
|
|
|
|
|
|
# Date : W17.39
|
|
|
|
# Perform Binder IPC.
|
|
|
|
binder_use(surfaceflinger)
|
|
|
|
binder_call(surfaceflinger, binderservicedomain)
|
|
|
|
binder_call(surfaceflinger, appdomain)
|
|
|
|
binder_call(surfaceflinger, mtkbootanimation)
|
|
|
|
binder_service(surfaceflinger)
|
|
|
|
|
|
|
|
allow surfaceflinger mtkbootanimation:dir search;
|
|
|
|
allow surfaceflinger mtkbootanimation:file { read getattr open };
|
|
|
|
|
|
|
|
# Date : W17.43
|
|
|
|
# Operation : Migration
|
|
|
|
# Purpose: Allow to access perfmgr
|
|
|
|
allow surfaceflinger proc_perfmgr:dir {read search};
|
2020-01-18 09:29:41 +08:00
|
|
|
allow surfaceflinger proc_perfmgr:file {open read ioctl};
|
2020-01-18 10:09:36 +08:00
|
|
|
allowxperm surfaceflinger proc_perfmgr:file ioctl {
|
|
|
|
FPSGO_QUEUE
|
|
|
|
FPSGO_DEQUEUE
|
|
|
|
FPSGO_QUEUE_CONNECT
|
|
|
|
FPSGO_BQID
|
|
|
|
FPSGO_VSYNC
|
|
|
|
};
|
2020-01-18 09:29:32 +08:00
|
|
|
|
|
|
|
# Date : WK17.43
|
|
|
|
# Operation : Debug
|
|
|
|
# Purpose: Allow to dump HWC backtrace
|
|
|
|
get_prop(surfaceflinger, graphics_hwc_pid_prop)
|
2020-01-18 10:05:54 +08:00
|
|
|
get_prop(surfaceflinger, graphics_hwc_latch_unsignaled_prop)
|
2020-01-18 09:29:32 +08:00
|
|
|
allow surfaceflinger hal_graphics_composer_default:dir search;
|
|
|
|
allow surfaceflinger hal_graphics_composer_default:lnk_file read;
|
2020-01-18 10:07:14 +08:00
|
|
|
|
|
|
|
# Date : WK18.36
|
|
|
|
# Operation : Debug
|
|
|
|
# Purpose: Allow to dump buffer queue
|
|
|
|
get_prop(surfaceflinger, debug_bq_dump_prop)
|
2020-01-18 10:09:09 +08:00
|
|
|
|
|
|
|
allowxperm surfaceflinger proc_perfmgr:file ioctl {GED_BRIDGE_IO_LOG_BUF_GET GED_BRIDGE_IO_BOOST_GPU_FREQ GED_BRIDGE_IO_QUERY_INFO};
|
2020-01-18 10:10:36 +08:00
|
|
|
allowxperm surfaceflinger proc_ged:file ioctl {
|
|
|
|
GED_BRIDGE_IO_LOG_BUF_GET
|
|
|
|
GED_BRIDGE_IO_BOOST_GPU_FREQ
|
|
|
|
GED_BRIDGE_IO_QUERY_INFO
|
|
|
|
GED_BRIDGE_IO_GE_GET
|
|
|
|
GED_BRIDGE_IO_LOG_BUF_WRITE
|
2020-01-18 10:10:51 +08:00
|
|
|
GED_BRIDGE_IO_GE_SET
|
|
|
|
GED_BRIDGE_IO_GE_ALLOC
|
|
|
|
GED_BRIDGE_IO_GE_INFO
|
|
|
|
GED_BRIDGE_IO_IOCTLCMD_0F
|
|
|
|
GED_BRIDGE_IO_IOCTLCMD_10
|
|
|
|
GED_BRIDGE_IO_MONITOR_3D_FENCE
|
2020-01-18 10:10:36 +08:00
|
|
|
};
|
2020-01-18 10:12:32 +08:00
|
|
|
|
|
|
|
# Date : WK19.4
|
|
|
|
# Operation : P Migration
|
|
|
|
# Purpose: Allow to access /dev/mdp_device driver
|
|
|
|
allow surfaceflinger mdp_device:chr_file rw_file_perms;
|
|
|
|
|
|
|
|
# Date : WK19.09
|
|
|
|
# Purpose: Allow to access property dev/mdp_sync
|
|
|
|
#============= surfaceflinger ==============
|
|
|
|
allow surfaceflinger mtk_mdp_device:chr_file rw_file_perms;
|