diff --git a/domain.te b/domain.te index 74aa9c5e56eb58d2cf26db2b7fc48c37adbc2851..6b025e3ed8ba5f8869515cfdba63f4ab14c1c30b 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 7df06d3989527215c0d66af33d7aafab2d172738..925bc02d6d951870d694164ba53ef14c318d7bf2 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 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 };