diff --git a/domain.te b/domain.te index 74aa9c5..6b025e3 100644 --- a/domain.te +++ b/domain.te @@ -140,6 +140,7 @@ r_dir_file(domain, sysfs_devices_system_cpu) r_dir_file(domain, inotify) r_dir_file(domain, cgroup) r_dir_file(domain, proc_net) +allow domain proc_cpuinfo:file r_file_perms; # debugfs access allow domain debugfs:dir r_dir_perms; diff --git a/file.te b/file.te index 7df06d3..925bc02 100644 --- a/file.te +++ b/file.te @@ -10,6 +10,7 @@ type proc_security, fs_type; type usermodehelper, fs_type, sysfs_type; type qtaguid_proc, fs_type, mlstrustedobject; type proc_bluetooth_writable, fs_type; +type proc_cpuinfo, fs_type; type proc_net, fs_type; type proc_sysrq, fs_type; type selinuxfs, fs_type; diff --git a/genfs_contexts b/genfs_contexts index ab4e045..31b7e4f 100644 --- a/genfs_contexts +++ b/genfs_contexts @@ -4,6 +4,7 @@ genfscon rootfs / u:object_r:rootfs:s0 genfscon proc / u:object_r:proc:s0 genfscon proc /net u:object_r:proc_net:s0 genfscon proc /net/xt_qtaguid/ctrl u:object_r:qtaguid_proc:s0 +genfscon proc /cpuinfo u:object_r:proc_cpuinfo:s0 genfscon proc /sysrq-trigger u:object_r:proc_sysrq:s0 genfscon proc /sys/fs/protected_hardlinks u:object_r:proc_security:s0 genfscon proc /sys/fs/protected_symlinks u:object_r:proc_security:s0 diff --git a/zygote.te b/zygote.te index c2a2395..4c6276c 100644 --- a/zygote.te +++ b/zygote.te @@ -42,6 +42,10 @@ selinux_check_access(zygote) # Read /seapp_contexts and /data/security/seapp_contexts security_access_policy(zygote) +# Native bridge functionality requires that zygote replaces +# /proc/cpuinfo with /system/lib//cpuinfo using a bind mount +allow zygote proc_cpuinfo:file mounton; + # Setting up /storage/emulated. allow zygote rootfs:dir mounton; allow zygote sdcard_type:dir { write search setattr create add_name mounton };