[tip:x86/alternatives 38/58] arch/x86/um/../kernel/module.c:209: undefined reference to `smp_text_poke_sync_each_cpu'

From: kernel test robot
Date: Sun Apr 13 2025 - 22:30:22 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/alternatives
head: af8967158f9ad759a93e8e7a933c10e7cbb01ba2
commit: 6e4955a9d73ebdc8496e6bff7f6d2bf83c01959f [38/58] x86/alternatives: Rename 'text_poke_sync()' to 'smp_text_poke_sync_each_cpu()'
config: um-defconfig (https://download.01.org/0day-ci/archive/20250414/202504141003.kc69fVoj-lkp@xxxxxxxxx/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250414/202504141003.kc69fVoj-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504141003.kc69fVoj-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

/usr/bin/ld: warning: .tmp_vmlinux1 has a LOAD segment with RWX permissions
/usr/bin/ld: arch/x86/kernel/module.o: in function `apply_relocate_add':
>> arch/x86/um/../kernel/module.c:209: undefined reference to `smp_text_poke_sync_each_cpu'
clang: error: linker command failed with exit code 1 (use -v to see invocation)


vim +209 arch/x86/um/../kernel/module.c

188
189 static int write_relocate_add(Elf64_Shdr *sechdrs,
190 const char *strtab,
191 unsigned int symindex,
192 unsigned int relsec,
193 struct module *me,
194 bool apply)
195 {
196 int ret;
197 bool early = me->state == MODULE_STATE_UNFORMED;
198 void *(*write)(void *, const void *, size_t) = memcpy;
199
200 if (!early) {
201 write = text_poke;
202 mutex_lock(&text_mutex);
203 }
204
205 ret = __write_relocate_add(sechdrs, strtab, symindex, relsec, me,
206 write, apply);
207
208 if (!early) {
> 209 smp_text_poke_sync_each_cpu();
210 mutex_unlock(&text_mutex);
211 }
212
213 return ret;
214 }
215

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki