From 9300488ba6d1d2a72c3badcb0ca2b64c515afe41 Mon Sep 17 00:00:00 2001 From: Mitch Phillips Date: Wed, 26 Feb 2020 09:53:34 -0800 Subject: [PATCH] [GWP-ASan] Disable for apps. Disable GWP-ASan for all applications by default. Long-term R-release goals are that GWP-ASan is: 1. Enabled by default for the system. 2. Enabled by default for system apps. 3. Disabled by default (with manifest opt-in) for user apps. At DP2 cut point, we were enabled by default for the system, system apps, and user apps. We were intending to downgrade user apps to be disabled-by-default with the manifest changes in ag/10329607, but we didn't manage to get that through by DP2 cut. Because we want GWP-ASan to be less aggressive on user apps, it's safest to just disable GWP-ASan for all apps. Bug: 135634846 Test: Build and verify no GWP-ASan for apps. Change-Id: If92cafb49b1484d173a4eadb377d18b29d217cd4 --- core/jni/com_android_internal_os_Zygote.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index e4141e02ab1ca..359fd48ade361 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -626,12 +626,6 @@ static void PreApplicationInit() { // Set the jemalloc decay time to 1. mallopt(M_DECAY_TIME, 1); - - // Maybe initialize GWP-ASan here. Must be called after - // mallopt(M_SET_ZYGOTE_CHILD). - bool ForceEnableGwpAsan = false; - android_mallopt(M_INITIALIZE_GWP_ASAN, &ForceEnableGwpAsan, - sizeof(ForceEnableGwpAsan)); } static void SetUpSeccompFilter(uid_t uid, bool is_child_zygote) {