From 97da0753316050fa58734c5d83e6bbc4147e4b22 Mon Sep 17 00:00:00 2001 From: Aleksei Vetrov Date: Fri, 4 Oct 2024 20:58:10 +0000 Subject: [PATCH] ANDROID: temporary disable UBSAN_TRAP After a Clang update, UBSAN began detecting signed integer overflow, despite the "-fwrapv" flag which defines the behavior for this. This detection aims to find unintentional overflows, however, there's currently no effective mechanism to mark overflows as intentional in certain cases. This change disables kernel panic when UBSAN detects undefined behavior, leaving only a warning in the kernel log. UBSAN_TRAP will be re-enabled once all intentional undefined behavior is annotated (bug 375156207). Bug: 354745907 Bug: 375156207 Change-Id: I64b35b8cb03be6c87910bec939039d1edc67a998 Signed-off-by: Aleksei Vetrov --- arch/arm64/configs/gki_defconfig | 1 - arch/x86/configs/gki_defconfig | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/arm64/configs/gki_defconfig b/arch/arm64/configs/gki_defconfig index 46b3d22259a5..7799c59554e2 100644 --- a/arch/arm64/configs/gki_defconfig +++ b/arch/arm64/configs/gki_defconfig @@ -712,7 +712,6 @@ CONFIG_HEADERS_INSTALL=y # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set CONFIG_MAGIC_SYSRQ=y CONFIG_UBSAN=y -CONFIG_UBSAN_TRAP=y # CONFIG_UBSAN_BOOL is not set # CONFIG_UBSAN_ENUM is not set CONFIG_PAGE_OWNER=y diff --git a/arch/x86/configs/gki_defconfig b/arch/x86/configs/gki_defconfig index 06826b8ecd09..0f9d5a050d66 100644 --- a/arch/x86/configs/gki_defconfig +++ b/arch/x86/configs/gki_defconfig @@ -658,7 +658,6 @@ CONFIG_HEADERS_INSTALL=y # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set CONFIG_MAGIC_SYSRQ=y CONFIG_UBSAN=y -CONFIG_UBSAN_TRAP=y # CONFIG_UBSAN_BOOL is not set # CONFIG_UBSAN_ENUM is not set CONFIG_PAGE_OWNER=y