Fixing denials for easel pmic sysfs

denied { write } for pid=11239 comm="android.hardwar"
name="asr_dual_phase" dev="sysfs" ino=46597
scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:sysfs:s0
tclass=file

avc:  denied  { write } for  pid=528 comm="ueventd" name="uevent"
dev="sysfs" ino=46697 scontext=u:r:ueventd:s0
tcontext=u:object_r:sysfs_easel:s0 tclass=file

Bug: 37941164
Bug: 37927378
Test: Manual build, flash, and look for denials
Change-Id: Ifc5165fb1b5e524805805dd0b0b9816f86a6d048
This commit is contained in:
Trevor Bunker
2017-05-03 13:47:26 -07:00
parent c1ce21d537
commit 1e8cf131ad
4 changed files with 5 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
type sysfs_camera, sysfs_type, fs_type;
type sysfs_easel, sysfs_type, fs_type;
type sysfs_fingerprint, sysfs_type, fs_type;
type sysfs_graphics, sysfs_type, fs_type;
type sysfs_laser, sysfs_type, fs_type;

View File

@@ -148,6 +148,7 @@
/sys/module/subsystem_restart u:object_r:sysfs_msm_subsys_restart:s0
/sys/kernel/boot_adsp/boot u:object_r:sysfs_msm_subsys:s0
/sys/kernel/boot_slpi/boot u:object_r:sysfs_msm_subsys:s0
/sys/devices/soc/c1b7000\.i2c/i2c-9/9-0008(/.*)? u:object_r:sysfs_easel:s0
# files in debugfs
/sys/kernel/debug/rpm_stats u:object_r:debugfs_rpm:s0

View File

@@ -52,3 +52,5 @@ userdebug_or_eng(`
# access easel dev nodes
allow hal_camera easel_device:chr_file { read write ioctl open };
allow hal_camera sysfs_easel:file rw_file_perms;

View File

@@ -1,6 +1,7 @@
allow ueventd sysfs_thermal:file w_file_perms;
allow ueventd sysfs_leds:file w_file_perms;
allow ueventd sysfs_camera:file w_file_perms;
allow ueventd sysfs_easel:file w_file_perms;
allow ueventd sysfs_fingerprint:file w_file_perms;
allow ueventd sysfs_graphics:file w_file_perms;
allow ueventd sysfs_laser:file w_file_perms;