2022-01-20 00:19:20 +01:00
|
|
|
# mtectrl is a tool to request MTE (Memory Tagging Extensions) from the bootloader.
|
2022-01-26 00:45:17 +01:00
|
|
|
type mtectrl, domain, coredomain;
|
2022-01-20 00:19:20 +01:00
|
|
|
type mtectrl_exec, system_file_type, exec_type, file_type;
|
|
|
|
|
|
|
|
init_daemon_domain(mtectrl)
|
|
|
|
|
2022-09-21 23:53:48 +02:00
|
|
|
# to set the sys prop to match the bootloader message state.
|
|
|
|
set_prop(mtectrl, arm64_memtag_prop)
|
|
|
|
|
2022-01-20 00:19:20 +01:00
|
|
|
# mtectrl communicates the request to the bootloader via the misc partition.
|
2022-09-21 23:53:48 +02:00
|
|
|
# needs to write to update the request in misc partition, and read to sync
|
|
|
|
# back to the property.
|
|
|
|
allow mtectrl misc_block_device:blk_file rw_file_perms;
|
2022-01-20 00:19:20 +01:00
|
|
|
allow mtectrl block_device:dir r_dir_perms;
|
|
|
|
read_fstab(mtectrl)
|
2022-09-28 23:44:43 +02:00
|
|
|
|
|
|
|
# bootloader_message tries to find the fstab in the device config path first,
|
|
|
|
# but because we've already booted up we can use the ro.boot properties instead,
|
|
|
|
# so we can just ignore the SELinux denial.
|
|
|
|
dontaudit mtectrl sysfs_dt_firmware_android:dir search;
|
|
|
|
dontaudit mtectrl vendor_property_type:file read;
|