[tglx-devel:timers/cleanup 47/59] drivers/firmware/efi/libstub/loongarch.c:33:21: error: call to undeclared function 'random_get_entropy'; ISO C99 and later do not support implicit function declarations
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git timers/cleanup head: 0ad363c8e014568032d53fe2c7ab288de68373f4 commit: 57c8b40ef1bde63f63d6983319dde6d1626a3537 [47/59] loongarch: Select ARCH_HAS_RANDOM_ENTROPY config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20260713/[email protected]/config) compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project b3e6e6dabdc02153552a64fc74ff5c7532447eed) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260713/[email protected]/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All errors (new ones prefixed by >>): >> drivers/firmware/efi/libstub/loongarch.c:33:21: error: call to undeclared function 'random_get_entropy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 33 | random_offset ^= (random_get_entropy() << 16); | ^ 1 error generated. vim +/random_get_entropy +33 drivers/firmware/efi/libstub/loongarch.c ad6f4f3ea72f86 WANG Rui 2026-04-27 25 03d8273542146f WANG Rui 2026-05-21 26 unsigned long efi_get_kimg_kaslr_address(void) 03d8273542146f WANG Rui 2026-05-21 27 { 03d8273542146f WANG Rui 2026-05-21 28 unsigned int random_offset = 0; 03d8273542146f WANG Rui 2026-05-21 29 03d8273542146f WANG Rui 2026-05-21 30 #ifdef CONFIG_RANDOMIZE_BASE 03d8273542146f WANG Rui 2026-05-21 31 if (!efi_nokaslr) { 03d8273542146f WANG Rui 2026-05-21 32 efi_get_random_bytes(sizeof(random_offset), (u8 *)&random_offset); 03d8273542146f WANG Rui 2026-05-21 @33 random_offset ^= (random_get_entropy() << 16); 03d8273542146f WANG Rui 2026-05-21 34 random_offset &= (CONFIG_RANDOMIZE_BASE_MAX_OFFSET - 1); 03d8273542146f WANG Rui 2026-05-21 35 random_offset = ALIGN(random_offset + SZ_64K, SZ_64K); 03d8273542146f WANG Rui 2026-05-21 36 } 03d8273542146f WANG Rui 2026-05-21 37 #endif 03d8273542146f WANG Rui 2026-05-21 38 03d8273542146f WANG Rui 2026-05-21 39 return PHYSADDR(VMLINUX_LOAD_ADDRESS) + random_offset; 03d8273542146f WANG Rui 2026-05-21 40 } 03d8273542146f WANG Rui 2026-05-21 41 :::::: The code at line 33 was first introduced by commit :::::: 03d8273542146f228c0019f08b57545fdee79704 efi/loongarch: Randomize kernel preferred address for KASLR :::::: TO: WANG Rui <[email protected]> :::::: CC: Huacai Chen <[email protected]> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki