[MTE] Fix app_default property.
We would decide after checking for TBI, which is enabled for most apps. Test: add log statement to the case, check it gets triggered Bug: 216305376 Change-Id: I79bd9e932ad2fb75a3b68dfa062bb3433fe4784e
This commit is contained in:
@@ -1718,17 +1718,18 @@ public final class ProcessList {
|
||||
return Zygote.MEMORY_TAG_LEVEL_NONE;
|
||||
}
|
||||
|
||||
// Check to see that the compat feature for TBI is enabled.
|
||||
if (mPlatformCompat.isChangeEnabled(NATIVE_HEAP_POINTER_TAGGING, app.info)) {
|
||||
return Zygote.MEMORY_TAG_LEVEL_TBI;
|
||||
}
|
||||
|
||||
String defaultLevel = SystemProperties.get("persist.arm64.memtag.app_default");
|
||||
if ("sync".equals(defaultLevel)) {
|
||||
return Zygote.MEMORY_TAG_LEVEL_SYNC;
|
||||
} else if ("async".equals(defaultLevel)) {
|
||||
return Zygote.MEMORY_TAG_LEVEL_ASYNC;
|
||||
}
|
||||
|
||||
// Check to see that the compat feature for TBI is enabled.
|
||||
if (mPlatformCompat.isChangeEnabled(NATIVE_HEAP_POINTER_TAGGING, app.info)) {
|
||||
return Zygote.MEMORY_TAG_LEVEL_TBI;
|
||||
}
|
||||
|
||||
return Zygote.MEMORY_TAG_LEVEL_NONE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user