Rename sysprop for MTE mode in system_server.

Move the system property that controls MTE mode in system_server out of
arm64.memtag.process namespace. Process sysprops affect the MTE mode of
any process with the given name; using such property in a product means
that any process or test unfortunately named "system_server" would be
affected.

Bug: 280343521
Test: debuggerd `pidof system_server` | head -30 | grep tagged_addr
      affected by the new property
      not affected by the old property
Change-Id: I1b303803cd470808d493f8fa20a69e84b3906afc
This commit is contained in:
Evgenii Stepanov
2023-06-16 16:47:21 -07:00
parent bb1e865ae4
commit 6d9f5fc6ee

View File

@@ -771,7 +771,7 @@ public class ZygoteInit {
Zygote.applyInvokeWithSystemProperty(parsedArgs);
if (Zygote.nativeSupportsMemoryTagging()) {
String mode = SystemProperties.get("arm64.memtag.process.system_server", "");
String mode = SystemProperties.get("persist.arm64.memtag.system_server", "");
if (mode.isEmpty()) {
/* The system server has ASYNC MTE by default, in order to allow
* system services to specify their own MTE level later, as you