diff --git a/domain.te b/domain.te index a3dd217433ef67634cb86a1f94c81ae4202f10dc..23803df1ad2fab741ca8ae604aee8b9c7804e7fa 100644 --- a/domain.te +++ b/domain.te @@ -138,6 +138,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 e50196c4dad6446b894b4532a1c885160df6c940..1eb323e47b858bad9b774fe9f9f0b7f8d0c9e325 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, mlstrustedobject; diff --git a/genfs_contexts b/genfs_contexts index ab4e045a2547f9bc28570f1478130374cf95e68f..31b7e4f6441fc06b450b3a6580eb1ff1eb6199c9 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 c2a23959343b06056254850eb401dcad7e7f7f6d..4c6276c8c5057653a517d3bd9552e82482e1c8b9 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/<ISA>/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 };