* [linux-next:master 4952/5095] arch/loongarch/net/bpf_jit.c:1322:14: error: implicit declaration of function '__bpf_address_lookup'; did you mean 'bpf_address_lookup'?
@ 2026-01-11 20:54 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-01-11 20:54 UTC (permalink / raw)
To: Andrew Morton; +Cc: oe-kbuild-all, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: f417b7ffcbef7d76b0d8860518f50dae0e7e5eda
commit: 90914704bb11e24b42bd368b91e4a1e69d42e72c [4952/5095] Merge branch 'mm-nonmm-unstable' of https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
config: loongarch-randconfig-002-20260112 (https://download.01.org/0day-ci/archive/20260112/202601120429.Bvdp1mP1-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260112/202601120429.Bvdp1mP1-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601120429.Bvdp1mP1-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/loongarch/net/bpf_jit.c: In function 'bpf_arch_text_poke':
>> arch/loongarch/net/bpf_jit.c:1322:14: error: implicit declaration of function '__bpf_address_lookup'; did you mean 'bpf_address_lookup'? [-Wimplicit-function-declaration]
1322 | if (!__bpf_address_lookup((unsigned long)ip, &size, &offset, namebuf))
| ^~~~~~~~~~~~~~~~~~~~
| bpf_address_lookup
vim +1322 arch/loongarch/net/bpf_jit.c
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1305
ae4a3160d19cd1 Menglong Dong 2025-11-18 1306 int bpf_arch_text_poke(void *ip, enum bpf_text_poke_type old_t,
ae4a3160d19cd1 Menglong Dong 2025-11-18 1307 enum bpf_text_poke_type new_t, void *old_addr,
ae4a3160d19cd1 Menglong Dong 2025-11-18 1308 void *new_addr)
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1309 {
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1310 int ret;
ae4a3160d19cd1 Menglong Dong 2025-11-18 1311 bool is_call;
73721d8676771c Chenghao Duan 2025-12-31 1312 unsigned long size = 0;
73721d8676771c Chenghao Duan 2025-12-31 1313 unsigned long offset = 0;
73721d8676771c Chenghao Duan 2025-12-31 1314 void *image = NULL;
73721d8676771c Chenghao Duan 2025-12-31 1315 char namebuf[KSYM_NAME_LEN];
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1316 u32 old_insns[LOONGARCH_LONG_JUMP_NINSNS] = {[0 ... 4] = INSN_NOP};
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1317 u32 new_insns[LOONGARCH_LONG_JUMP_NINSNS] = {[0 ... 4] = INSN_NOP};
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1318
3d770bd11b9430 Hengqi Chen 2025-10-02 1319 /* Only poking bpf text is supported. Since kernel function entry
3d770bd11b9430 Hengqi Chen 2025-10-02 1320 * is set up by ftrace, we rely on ftrace to poke kernel functions.
3d770bd11b9430 Hengqi Chen 2025-10-02 1321 */
73721d8676771c Chenghao Duan 2025-12-31 @1322 if (!__bpf_address_lookup((unsigned long)ip, &size, &offset, namebuf))
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1323 return -ENOTSUPP;
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1324
73721d8676771c Chenghao Duan 2025-12-31 1325 image = ip - offset;
73721d8676771c Chenghao Duan 2025-12-31 1326
73721d8676771c Chenghao Duan 2025-12-31 1327 /* zero offset means we're poking bpf prog entry */
73721d8676771c Chenghao Duan 2025-12-31 1328 if (offset == 0) {
73721d8676771c Chenghao Duan 2025-12-31 1329 /* skip to the nop instruction in bpf prog entry:
73721d8676771c Chenghao Duan 2025-12-31 1330 * move t0, ra
73721d8676771c Chenghao Duan 2025-12-31 1331 * nop
73721d8676771c Chenghao Duan 2025-12-31 1332 */
73721d8676771c Chenghao Duan 2025-12-31 1333 ip = image + LOONGARCH_INSN_SIZE;
73721d8676771c Chenghao Duan 2025-12-31 1334 }
73721d8676771c Chenghao Duan 2025-12-31 1335
ae4a3160d19cd1 Menglong Dong 2025-11-18 1336 is_call = old_t == BPF_MOD_CALL;
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1337 ret = emit_jump_or_nops(old_addr, ip, old_insns, is_call);
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1338 if (ret)
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1339 return ret;
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1340
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1341 if (memcmp(ip, old_insns, LOONGARCH_LONG_JUMP_NBYTES))
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1342 return -EFAULT;
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1343
ae4a3160d19cd1 Menglong Dong 2025-11-18 1344 is_call = new_t == BPF_MOD_CALL;
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1345 ret = emit_jump_or_nops(new_addr, ip, new_insns, is_call);
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1346 if (ret)
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1347 return ret;
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1348
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1349 mutex_lock(&text_mutex);
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1350 if (memcmp(ip, new_insns, LOONGARCH_LONG_JUMP_NBYTES))
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1351 ret = larch_insn_text_copy(ip, new_insns, LOONGARCH_LONG_JUMP_NBYTES);
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1352 mutex_unlock(&text_mutex);
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1353
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1354 return ret;
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1355 }
9fbd18cf4c69f5 Chenghao Duan 2025-08-05 1356
:::::: The code at line 1322 was first introduced by commit
:::::: 73721d8676771c6c7b06d4e636cc053fc76afefd LoongArch: BPF: Enhance the bpf_arch_text_poke() function
:::::: TO: Chenghao Duan <duanchenghao@kylinos.cn>
:::::: CC: Huacai Chen <chenhuacai@loongson.cn>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-01-11 20:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-11 20:54 [linux-next:master 4952/5095] arch/loongarch/net/bpf_jit.c:1322:14: error: implicit declaration of function '__bpf_address_lookup'; did you mean 'bpf_address_lookup'? kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox