blob: e0418bcf0eb8195d89ebec53372486923d5cf5fa [file] [log] [blame]
Florian Mayer23173452022-01-19 15:19:20 -08001# mtectrl is a tool to request MTE (Memory Tagging Extensions) from the bootloader.
Inseob Kim3bd63cc2022-01-26 08:45:17 +09002type mtectrl, domain, coredomain;
Florian Mayer23173452022-01-19 15:19:20 -08003type mtectrl_exec, system_file_type, exec_type, file_type;
4
5init_daemon_domain(mtectrl)
6
Florian Mayer51382a32022-09-21 14:53:48 -07007# to set the sys prop to match the bootloader message state.
8set_prop(mtectrl, arm64_memtag_prop)
9
Florian Mayer23173452022-01-19 15:19:20 -080010# mtectrl communicates the request to the bootloader via the misc partition.
Florian Mayer51382a32022-09-21 14:53:48 -070011# needs to write to update the request in misc partition, and read to sync
12# back to the property.
13allow mtectrl misc_block_device:blk_file rw_file_perms;
Florian Mayer23173452022-01-19 15:19:20 -080014allow mtectrl block_device:dir r_dir_perms;
15read_fstab(mtectrl)
Florian Mayer09f14e92022-09-28 14:44:43 -070016
17# bootloader_message tries to find the fstab in the device config path first,
18# but because we've already booted up we can use the ro.boot properties instead,
19# so we can just ignore the SELinux denial.
20dontaudit mtectrl sysfs_dt_firmware_android:dir search;
21dontaudit mtectrl vendor_property_type:file read;