Merge "[MTE] Add device config to control upgrade time" am: 84a30c8526
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2219633 Change-Id: If398225ba6f3499a4f0a4facd7cc0e566f704f71 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
04378de425
1 changed files with 12 additions and 3 deletions
|
|
@ -340,9 +340,18 @@ void Service::Reap(const siginfo_t& siginfo) {
|
||||||
siginfo.si_status == BIONIC_SIGNAL_ART_PROFILER && !upgraded_mte_;
|
siginfo.si_status == BIONIC_SIGNAL_ART_PROFILER && !upgraded_mte_;
|
||||||
|
|
||||||
if (should_upgrade_mte) {
|
if (should_upgrade_mte) {
|
||||||
LOG(INFO) << "Upgrading service " << name_ << " to sync MTE";
|
constexpr int kDefaultUpgradeSecs = 60;
|
||||||
once_environment_vars_.emplace_back("BIONIC_MEMTAG_UPGRADE_SECS", "60");
|
int secs = GetIntProperty("persist.device_config.memory_safety_native.upgrade_secs.default",
|
||||||
upgraded_mte_ = true;
|
kDefaultUpgradeSecs);
|
||||||
|
secs = GetIntProperty(
|
||||||
|
"persist.device_config.memory_safety_native.upgrade_secs.service." + name_, secs);
|
||||||
|
if (secs > 0) {
|
||||||
|
LOG(INFO) << "Upgrading service " << name_ << " to sync MTE for " << secs << " seconds";
|
||||||
|
once_environment_vars_.emplace_back("BIONIC_MEMTAG_UPGRADE_SECS", std::to_string(secs));
|
||||||
|
upgraded_mte_ = true;
|
||||||
|
} else {
|
||||||
|
LOG(INFO) << "Not upgrading service " << name_ << " to sync MTE due to device config";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue