From b2cea54f9d417d317abb5c8abb2a24ce9cda4b63 Mon Sep 17 00:00:00 2001 From: James Hsu Date: Sat, 18 Jan 2020 10:10:02 +0800 Subject: [PATCH] [ALPS04296234] mrdump_tool: apply new selinux policy [Detail] Add new selinux policy to fix preallocate file failed avc denied log 1. ioctl permission denied mrdump_tool: type=1400 audit(0.0:517): avc: denied { ioctl } for path="/data/vendor/dumpsys/mrdump_preallocated" dev="dm-0" ino=1966 ioctlcmd=0x660b scontext=u:r:aee_aedv:s0 tcontext=u:object_r:aee_dumpsys_vendor_file:s0 tclass=file permissive=0 2. open /dev/block/platform/bootdevice/by-name/para fail [SYSENV]sysenv_get_with_area():317 , get env name=mrdump_output [SYSENV]get_env_info():217 , initialize /vendor/bin/mrdump_tool: [libfs_mgr]Warning: unknown flag: resize [SYSENV]get_partition_path():78 , partition path = /dev/block/platform/bootdevice/by-name/para [SYSENV]read_env_area():136 , open /dev/block/platform/bootdevice/by-name/para fail: Permission denied [SYSENV]get_env_info():238 , read_env_area fail MTK-Commit-Id: 25a78a9e7e593ba2e376b2e243774d5b4dfc6205 Change-Id: I79c62a0f65e1781ca6d0c2eefe77078d168d146a Signed-off-by: James Hsu CR-Id: ALPS04296234 Feature: Memory RAM Dump (MRDUMP) --- non_plat/aee_aedv.te | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/non_plat/aee_aedv.te b/non_plat/aee_aedv.te index 33a452f..6c0b089 100644 --- a/non_plat/aee_aedv.te +++ b/non_plat/aee_aedv.te @@ -401,3 +401,8 @@ allow aee_aedv proc_cmdq_debug:file r_file_perms; # temp solution get_prop(aee_aedv, vendor_default_prop) +# mrdump +allow aee_aedv para_block_device:blk_file rw_file_perms; +allow aee_aedv aee_dumpsys_vendor_file:file ioctl; +allowxperm aee_aedv aee_dumpsys_vendor_file:file ioctl FS_IOC_FIEMAP; +