forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
[BUG] linuxA bug that should be fixed in the mainline kernel.A bug that should be fixed in the mainline kernel.[FIXED][LINUX] development cycleThis bug was only present and fixed in a -next or -rc cycleThis bug was only present and fixed in a -next or -rc cycle
Description
Reported by CI with LLVM 11 (newer versions do not show this):
https://builds.tuxbuild.com/2EqpS04tCKn154FmyeYYpl7WJJ2/build.log
$ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KCONFIG_ALLCONFIG=<(echo CONFIG_WERROR=n) LLVM=1 LLVM_IAS=0 allmodconfig all
...
ERROR: modpost: "__mulodi4" [lib/overflow_kunit.ko] undefined!
...
"Caused" by commit d219d2a9a92e ("overflow: Allow mixed type arguments") (cc @kees). A simplified reproducer on top of allnoconfig:
$ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LLVM=1 LLVM_IAS=0 allnoconfig
$ scripts/config -e KUNIT -e RUNTIME_TESTING_MENU -e OVERFLOW_KUNIT_TEST
$ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LLVM=1 LLVM_IAS=0 olddefconfig all
ld.lld: error: undefined symbol: __mulodi4
>>> referenced by overflow_kunit.c
>>> lib/overflow_kunit.o:(u32_u32__int_overflow_test) in archive vmlinux.a
>>> referenced by overflow_kunit.c
>>> lib/overflow_kunit.o:(u32_u32__int_overflow_test) in archive vmlinux.a
My reverse bisect of LLVM shows commit 3203143f1356 ("CodeGen: Improve generated IR for __builtin_mul_overflow(uint, uint, int)") resolved this, which appears to be this exact case. I wonder if it is worth bumping the minimum version of LLVM to 12.0.0 over this?
Metadata
Metadata
Assignees
Labels
[BUG] linuxA bug that should be fixed in the mainline kernel.A bug that should be fixed in the mainline kernel.[FIXED][LINUX] development cycleThis bug was only present and fixed in a -next or -rc cycleThis bug was only present and fixed in a -next or -rc cycle