From 38e508079d37bf1a1fd8d3d178907c29a6ad85a0 Mon Sep 17 00:00:00 2001 From: Lokesh Gidra Date: Wed, 3 Mar 2021 13:09:40 -0800 Subject: [PATCH] ANDROID: GKI: Enable CONFIG_USERFAULTFD Patches for SELinux support and kernel page-fault restriction in userfaultfd have been backported. See references below. So from security perspective it should be safe to enable it in Android. 1) https://android-review.googlesource.com/c/kernel/common/+/1576486 2) https://android-review.googlesource.com/c/kernel/common/+/1576704 3) https://android-review.googlesource.com/c/kernel/common/+/1612597 4) https://android-review.googlesource.com/c/kernel/common/+/1574667 Signed-off-by: Lokesh Gidra Bug: 160737021 Bug: 169683130 Change-Id: Iac5143da76783de57dba229f5761aff9297c17ae --- arch/arm64/configs/gki_defconfig | 1 + arch/x86/configs/gki_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm64/configs/gki_defconfig b/arch/arm64/configs/gki_defconfig index 11e924702759..8c2499999d16 100644 --- a/arch/arm64/configs/gki_defconfig +++ b/arch/arm64/configs/gki_defconfig @@ -37,6 +37,7 @@ CONFIG_BLK_DEV_INITRD=y CONFIG_KALLSYMS_ALL=y CONFIG_BPF_SYSCALL=y CONFIG_BPF_JIT_ALWAYS_ON=y +CONFIG_USERFAULTFD=y # CONFIG_RSEQ is not set CONFIG_EMBEDDED=y # CONFIG_COMPAT_BRK is not set diff --git a/arch/x86/configs/gki_defconfig b/arch/x86/configs/gki_defconfig index 1373eff32888..5f2ab89caaf3 100644 --- a/arch/x86/configs/gki_defconfig +++ b/arch/x86/configs/gki_defconfig @@ -39,6 +39,7 @@ CONFIG_BLK_DEV_INITRD=y CONFIG_KALLSYMS_ALL=y CONFIG_BPF_SYSCALL=y CONFIG_BPF_JIT_ALWAYS_ON=y +CONFIG_USERFAULTFD=y # CONFIG_RSEQ is not set CONFIG_EMBEDDED=y # CONFIG_COMPAT_BRK is not set