From ace4db9a40f3576d56192e54004d89a280e3550f Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 13 Feb 2020 19:45:56 +0100 Subject: [PATCH] ANDROID: gki_defconfig: enable heap and stack initialization. This patch enables CONFIG_INIT_STACK_ALL=y and CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y, effectively turning on stack and heap initialization in GKI kernels. Doing so will help us mitigate information leaks and make code that depends on uninitialized memory execute deterministically. We'll also get coverage for the initialization features on the existing kernel tests. Bug: 144999193 Change-Id: I40ad526b2e595c84b122b0308d967a3874564252 Signed-off-by: Alexander Potapenko --- arch/arm64/configs/gki_defconfig | 2 ++ arch/x86/configs/gki_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm64/configs/gki_defconfig b/arch/arm64/configs/gki_defconfig index e7f857ebba0f..34eb2cda9336 100644 --- a/arch/arm64/configs/gki_defconfig +++ b/arch/arm64/configs/gki_defconfig @@ -464,6 +464,8 @@ CONFIG_SECURITY_NETWORK=y CONFIG_HARDENED_USERCOPY=y CONFIG_FORTIFY_SOURCE=y CONFIG_SECURITY_SELINUX=y +CONFIG_INIT_STACK_ALL=y +CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y CONFIG_CRYPTO_ADIANTUM=y CONFIG_CRYPTO_MD4=y CONFIG_CRYPTO_LZ4=y diff --git a/arch/x86/configs/gki_defconfig b/arch/x86/configs/gki_defconfig index 7e5a746b6d21..daa75143f9bd 100644 --- a/arch/x86/configs/gki_defconfig +++ b/arch/x86/configs/gki_defconfig @@ -400,6 +400,8 @@ CONFIG_SECURITY_NETWORK=y CONFIG_HARDENED_USERCOPY=y CONFIG_FORTIFY_SOURCE=y CONFIG_SECURITY_SELINUX=y +CONFIG_INIT_STACK_ALL=y +CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y CONFIG_CRYPTO_ADIANTUM=y CONFIG_CRYPTO_SHA256_SSSE3=y CONFIG_CRYPTO_AES_NI_INTEL=y