Separate caches for separate UIDs
A cache instance maintains one hashmap for each UID making the binder call. The UID is give by Binder.getCallingUid(). This isolates the UIDs but will likely reduce cache efficacy. Per-UID statistics are collected. An individual cache may choose to keep all UID information in a single hashmap. This is controlled by a configuration flag to the cache constructor. This is also the legacy behavior. Isolation by UID is flag-guarded. Statistics collection is guarded by a separate flag, as statistics turn out to be expensive. This CL reverts an initial update to the default bypass() method, since the check for cross-uid cache access is now part of the cache infrastructure. Flag: android.app.pic_isolate_cache_by_uid Flag: android.app.pic_isolated_cache_statistics Bug: 373752556 Test: atest * FrameworksCoreTests:PropertyInvalidatedCacheTests * FrameworksCoreTests:IpcDataCacheTest * CtsOsTestCases:IpcDataCacheTest * ServiceBluetoothTests Change-Id: I6f3a9df55c820518739814c958a019b04897b42d
Loading
Please register or sign in to comment