From ca7dad50d4b7f4376375d728cd5f5e9771039651 Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Tue, 7 Sep 2021 15:22:48 -0700 Subject: [PATCH] ANDROID: disable BLK_DEV_NBD for allmodconfig commit fad7cd3310db ("nbd: add the check to prevent overflow in __nbd_ioctl()") exposed something that's long been broken for semi-hosted environments like the kernel in Clang: check_mul_overflow() is implemented in terms of __builtin_mul_overflow(). For 64b operands on 32b hosts, LLVM was emitting libcalls to __mulodi4() which assumes that compiler-rt is being linked against. The kernel does not do so, so LLVM was emitting calls to functions that have no definition, resulting in the linkage failure: ERROR: modpost: "__mulodi4" [drivers/block/nbd.ko] undefined! I have been fixing LLVM upstream, see the six fixes linked from: https://bugs.llvm.org/show_bug.cgi?id=28629#c23. I still need to detect older toolchains that we'd still like to support, then find an appropriate workaround for the kernel. Disable network block devices for now, so that we don't lose coverage of 32b ARM allmodconfig builds which are currently red in our CI. Bug: 199191028 Link: https://github.com/ClangBuiltLinux/linux/issues/1438 Signed-off-by: Nick Desaulniers Change-Id: I79a597177f75370f60621b984cb8e21ca2a268d6 --- build.config.allmodconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/build.config.allmodconfig b/build.config.allmodconfig index 5b43e8436631..580dfa183a6d 100644 --- a/build.config.allmodconfig +++ b/build.config.allmodconfig @@ -7,6 +7,7 @@ function update_config() { ${KERNEL_DIR}/scripts/config --file ${OUT_DIR}/.config \ -d TEST_KMOD \ -e UNWINDER_FRAME_POINTER \ + -d BLK_DEV_NBD \ (cd ${OUT_DIR} && \ make O=${OUT_DIR} $archsubarch CROSS_COMPILE=${CROSS_COMPILE} ${TOOL_ARGS} ${MAKE_ARGS} olddefconfig)