Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 839c6897 authored by Florian Mayer's avatar Florian Mayer Committed by Automerger Merge Worker
Browse files

Merge "[MTE] add override for app's MTE mode" into udc-dev am: 556150b1

parents dd003005 556150b1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1270,6 +1270,15 @@ public final class Zygote {
            @NonNull ApplicationInfo info,
            @Nullable ProcessInfo processInfo,
            @Nullable IPlatformCompat platformCompat) {
        String appOverride = SystemProperties.get("persist.arm64.memtag.app." + info.packageName);
        if ("sync".equals(appOverride)) {
            return MEMORY_TAG_LEVEL_SYNC;
        } else if ("async".equals(appOverride)) {
            return MEMORY_TAG_LEVEL_ASYNC;
        } else if ("off".equals(appOverride)) {
            return MEMORY_TAG_LEVEL_NONE;
        }

        // Look at the process attribute first.
        if (processInfo != null && processInfo.memtagMode != ApplicationInfo.MEMTAG_DEFAULT) {
            return memtagModeToZygoteMemtagLevel(processInfo.memtagMode);