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

Commit 643beefb authored by Evgenii Stepanov's avatar Evgenii Stepanov Committed by Automerger Merge Worker
Browse files

Merge "Pass MTE RuntimeFlags to AppZygote." am: 1db942e7 am: 7842e7f3 am: 9399b998

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1910277

Change-Id: Ib57a9388139da44785a73253ea8c8769961db629
parents 7428a74a 9399b998
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -45,6 +45,8 @@ public class AppZygote {
    // Last UID/GID of the range the AppZygote can setuid()/setgid() to
    // Last UID/GID of the range the AppZygote can setuid()/setgid() to
    private final int mZygoteUidGidMax;
    private final int mZygoteUidGidMax;


    private final int mZygoteRuntimeFlags;

    private final Object mLock = new Object();
    private final Object mLock = new Object();


    /**
    /**
@@ -56,11 +58,13 @@ public class AppZygote {


    private final ApplicationInfo mAppInfo;
    private final ApplicationInfo mAppInfo;


    public AppZygote(ApplicationInfo appInfo, int zygoteUid, int uidGidMin, int uidGidMax) {
    public AppZygote(ApplicationInfo appInfo, int zygoteUid, int uidGidMin, int uidGidMax,
            int runtimeFlags) {
        mAppInfo = appInfo;
        mAppInfo = appInfo;
        mZygoteUid = zygoteUid;
        mZygoteUid = zygoteUid;
        mZygoteUidGidMin = uidGidMin;
        mZygoteUidGidMin = uidGidMin;
        mZygoteUidGidMax = uidGidMax;
        mZygoteUidGidMax = uidGidMax;
        mZygoteRuntimeFlags = runtimeFlags;
    }
    }


    /**
    /**
@@ -110,7 +114,7 @@ public class AppZygote {
                    mZygoteUid,
                    mZygoteUid,
                    mZygoteUid,
                    mZygoteUid,
                    null,  // gids
                    null,  // gids
                    0,  // runtimeFlags
                    mZygoteRuntimeFlags,  // runtimeFlags
                    "app_zygote",  // seInfo
                    "app_zygote",  // seInfo
                    abi,  // abi
                    abi,  // abi
                    abi, // acceptedAbiList
                    abi, // acceptedAbiList
+2 −1
Original line number Original line Diff line number Diff line
@@ -2238,7 +2238,8 @@ public final class ProcessList {
                // not the calling one.
                // not the calling one.
                appInfo.packageName = app.getHostingRecord().getDefiningPackageName();
                appInfo.packageName = app.getHostingRecord().getDefiningPackageName();
                appInfo.uid = uid;
                appInfo.uid = uid;
                appZygote = new AppZygote(appInfo, uid, firstUid, lastUid);
                int runtimeFlags = decideTaggingLevel(app);
                appZygote = new AppZygote(appInfo, uid, firstUid, lastUid, runtimeFlags);
                mAppZygotes.put(app.info.processName, uid, appZygote);
                mAppZygotes.put(app.info.processName, uid, appZygote);
                zygoteProcessList = new ArrayList<ProcessRecord>();
                zygoteProcessList = new ArrayList<ProcessRecord>();
                mAppZygoteProcesses.put(appZygote, zygoteProcessList);
                mAppZygoteProcesses.put(appZygote, zygoteProcessList);