next: arm64: ERROR: modpost: "kunit_running" [drivers/gpu/drm/vc4/vc4.ko] undefined!
From: Naresh Kamboju
Date: Thu Jan 05 2023 - 10:20:19 EST
Following arm64 kunit enabled build failed with gcc-12.
ERROR: modpost: "kunit_running" [drivers/gpu/drm/vc4/vc4.ko] undefined!
Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>
Build error:
-------------
make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/1/build
CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- ARCH=arm64
CROSS_COMPILE=aarch64-linux-gnu- 'CC=sccache aarch64-linux-gnu-gcc'
'HOSTCC=sccache gcc' olddefconfig
.config:10084:warning: override: TRANSPARENT_HUGEPAGE_MADVISE changes
choice state
make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/1/build
CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- ARCH=arm64
CROSS_COMPILE=aarch64-linux-gnu- 'CC=sccache aarch64-linux-gnu-gcc'
'HOSTCC=sccache gcc'
In file included from /builds/linux/include/asm-generic/rwonce.h:26,
from /builds/linux/arch/arm64/include/asm/rwonce.h:71,
from /builds/linux/include/linux/compiler.h:247,
from /builds/linux/include/linux/export.h:33,
from /builds/linux/include/linux/linkage.h:7,
from /builds/linux/include/linux/kernel.h:17,
from /builds/linux/fs/btrfs/ioctl.c:6:
/builds/linux/include/linux/kasan-checks.h: In function 'btrfs_ioctl_wait_sync':
/builds/linux/include/linux/kasan-checks.h:38:27: warning: 'transid'
may be used uninitialized [-Wmaybe-uninitialized]
38 | #define kasan_check_write __kasan_check_write
| ^~~~~~~~~~~~~~~~~~~
/builds/linux/include/linux/kasan-checks.h:20:6: note: by argument 1
of type 'const volatile void *' to '__kasan_check_write' declared here
20 | bool __kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~~~
/builds/linux/fs/btrfs/ioctl.c:3134:13: note: 'transid' declared here
3134 | u64 transid;
| ^~~~~~~
/builds/linux/include/linux/kasan-checks.h: In function 'btrfs_ioctl':
/builds/linux/include/linux/kasan-checks.h:38:27: warning:
'space_args' may be used uninitialized [-Wmaybe-uninitialized]
38 | #define kasan_check_write __kasan_check_write
| ^~~~~~~~~~~~~~~~~~~
/builds/linux/include/linux/kasan-checks.h:20:6: note: by argument 1
of type 'const volatile void *' to '__kasan_check_write' declared here
20 | bool __kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~~~
/builds/linux/fs/btrfs/ioctl.c:2973:39: note: 'space_args' declared here
2973 | struct btrfs_ioctl_space_args space_args;
| ^~~~~~~~~~
/builds/linux/include/linux/kasan-checks.h:38:27: warning: 'args32'
may be used uninitialized [-Wmaybe-uninitialized]
38 | #define kasan_check_write __kasan_check_write
| ^~~~~~~~~~~~~~~~~~~
/builds/linux/include/linux/kasan-checks.h:20:6: note: by argument 1
of type 'const volatile void *' to '__kasan_check_write' declared here
20 | bool __kasan_check_write(const volatile void *p, unsigned int size);
| ^~~~~~~~~~~~~~~~~~~
/builds/linux/fs/btrfs/ioctl.c:4320:49: note: 'args32' declared here
4320 | struct btrfs_ioctl_send_args_32 args32;
| ^~~~~~
ERROR: modpost: "kunit_running" [drivers/gpu/drm/vc4/vc4.ko] undefined!
make[2]: *** [/builds/linux/scripts/Makefile.modpost:137:
Module.symvers] Error 1
make[2]: Target '__modpost' not remade because of errors.
make[1]: *** [/builds/linux/Makefile:1967: modpost] Error 2
build log:
-----------
https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230105/testrun/13988421/suite/build/test/gcc-12-lkftconfig-kunit/log
Easy steps to reproduce with tuxmake:
-------------------------
# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake
#
# See https://docs.tuxmake.org/ for complete documentation.
# Original tuxmake command with fragments listed below.
# tuxmake --runtime podman --target-arch arm64 --toolchain gcc-12
--kconfig defconfig --kconfig-add
https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/lkft.config
--kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/lkft-crypto.config
--kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/distro-overrides.config
--kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/systemd.config
--kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/virtio.config
--kconfig-add CONFIG_ARM64_MODULE_PLTS=y --kconfig-add
CONFIG_SYN_COOKIES=y --kconfig-add CONFIG_SCHEDSTATS=y --kconfig-add
CONFIG_KASAN=y --kconfig-add CONFIG_KUNIT=y --kconfig-add
CONFIG_KUNIT_ALL_TESTS=y CROSS_COMPILE_COMPAT=arm-linux-gnueabihf-
tuxmake --runtime podman --target-arch arm64 --toolchain gcc-12
--kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2JtJj8Fpj9wmxgtyz3nkpqOFHdf/config
CROSS_COMPILE_COMPAT=arm-linux-gnueabihf-
--
Linaro LKFT
https://lkft.linaro.org