Merge "Pass MTE RuntimeFlags to AppZygote." am: 1db942e761 am: 7842e7f363

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

Change-Id: Iaecf2f0ab6145dda58af10bc17f5b171b169e802
This commit is contained in:
Evgenii Stepanov
2021-12-07 19:42:08 +00:00
committed by Automerger Merge Worker
2 changed files with 8 additions and 3 deletions

View File

@@ -45,6 +45,8 @@ public class AppZygote {
// Last UID/GID of the range the AppZygote can setuid()/setgid() to
private final int mZygoteUidGidMax;
private final int mZygoteRuntimeFlags;
private final Object mLock = new Object();
/**
@@ -56,11 +58,13 @@ public class AppZygote {
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;
mZygoteUid = zygoteUid;
mZygoteUidGidMin = uidGidMin;
mZygoteUidGidMax = uidGidMax;
mZygoteRuntimeFlags = runtimeFlags;
}
/**
@@ -110,7 +114,7 @@ public class AppZygote {
mZygoteUid,
mZygoteUid,
null, // gids
0, // runtimeFlags
mZygoteRuntimeFlags, // runtimeFlags
"app_zygote", // seInfo
abi, // abi
abi, // acceptedAbiList

View File

@@ -2238,7 +2238,8 @@ public final class ProcessList {
// not the calling one.
appInfo.packageName = app.getHostingRecord().getDefiningPackageName();
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);
zygoteProcessList = new ArrayList<ProcessRecord>();
mAppZygoteProcesses.put(appZygote, zygoteProcessList);