summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lee Shombert <shombert@google.com> 2024-11-01 15:18:43 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-11-01 15:18:43 +0000
commitb2b8cee59807206c3acab72df75aed1d6cbfe4dc (patch)
treedb341881eef840118ced3cacd0826c0eea18a2d8
parentc44c73d86abf0c9cf17da434abb9e462835bf9a4 (diff)
parent77c12e0fbd8d7f1eb0976a52f7d8f4849fb87d44 (diff)
Merge "Exclude the PIC key package_info from shared memory" into main
-rw-r--r--core/java/android/app/PropertyInvalidatedCache.java12
-rw-r--r--core/java/android/app/performance.aconfig4
2 files changed, 13 insertions, 3 deletions
diff --git a/core/java/android/app/PropertyInvalidatedCache.java b/core/java/android/app/PropertyInvalidatedCache.java
index 26bfec348a6f..a39cf84a4ebe 100644
--- a/core/java/android/app/PropertyInvalidatedCache.java
+++ b/core/java/android/app/PropertyInvalidatedCache.java
@@ -811,10 +811,20 @@ public class PropertyInvalidatedCache<Query, Result> {
return false; // Always disable shared memory on Ravenwood. (for now)
}
+ /**
+ * Keys that cannot be put in shared memory yet.
+ */
+ private static boolean inSharedMemoryDenyList(@NonNull String name) {
+ final String pkginfo = PREFIX_SYSTEM + "package_info";
+ return name.equals(pkginfo);
+ };
+
// Return true if this cache can use shared memory for its nonce. Shared memory may be used
// if the module is the system.
private static boolean sharedMemoryOkay(@NonNull String name) {
- return sSharedMemoryAvailable && name.startsWith(PREFIX_SYSTEM);
+ return sSharedMemoryAvailable
+ && name.startsWith(PREFIX_SYSTEM)
+ && !inSharedMemoryDenyList(name);
}
/**
diff --git a/core/java/android/app/performance.aconfig b/core/java/android/app/performance.aconfig
index 7484a8558841..f51f748bc71f 100644
--- a/core/java/android/app/performance.aconfig
+++ b/core/java/android/app/performance.aconfig
@@ -7,7 +7,7 @@ flag {
is_exported: true
is_fixed_read_only: true
description: "PropertyInvalidatedCache uses shared memory for nonces."
- bug: "366552454"
+ bug: "360897450"
}
flag {
@@ -16,5 +16,5 @@ flag {
is_exported: true
is_fixed_read_only: true
description: "Enforce PropertyInvalidatedCache.setTestMode() protocol"
- bug: "366552454"
+ bug: "360897450"
}