llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [jolsa-perf:bpf/single_direct_ops_ci 11/11] kernel/bpf/trampoline.c:331:9: error: call to undeclared function 'direct_ops_del'; ISO C99 and later do not support implicit function declarations
@ 2025-11-21  8:18 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-21  8:18 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/single_direct_ops_ci
head:   60a0e23f31d3e7eb62bf1ff14f9efef8de96ac0d
commit: 60a0e23f31d3e7eb62bf1ff14f9efef8de96ac0d [11/11] bpf, x86: Use single ftrace_ops for direct calls
config: s390-randconfig-002-20251121 (https://download.01.org/0day-ci/archive/20251121/202511211659.KNKOM3Kt-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251121/202511211659.KNKOM3Kt-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/202511211659.KNKOM3Kt-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/bpf/trampoline.c:331:9: error: call to undeclared function 'direct_ops_del'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     331 |                 ret = direct_ops_del(tr->fops, tr->ip, old_addr);
         |                       ^
   kernel/bpf/trampoline.c:331:9: note: did you mean 'direct_ops_free'?
   kernel/bpf/trampoline.c:281:13: note: 'direct_ops_free' declared here
     281 | static void direct_ops_free(struct bpf_trampoline *tr) { }
         |             ^
>> kernel/bpf/trampoline.c:345:9: error: call to undeclared function 'direct_ops_mod'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     345 |                 ret = direct_ops_mod(tr->fops, tr->ip, new_addr, lock_direct_mutex);
         |                       ^
   kernel/bpf/trampoline.c:345:9: note: did you mean 'direct_ops_free'?
   kernel/bpf/trampoline.c:281:13: note: 'direct_ops_free' declared here
     281 | static void direct_ops_free(struct bpf_trampoline *tr) { }
         |             ^
>> kernel/bpf/trampoline.c:367:9: error: call to undeclared function 'direct_ops_add'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     367 |                 ret = direct_ops_add(tr->fops, tr->ip, new_addr);
         |                       ^
   kernel/bpf/trampoline.c:367:9: note: did you mean 'direct_ops_free'?
   kernel/bpf/trampoline.c:281:13: note: 'direct_ops_free' declared here
     281 | static void direct_ops_free(struct bpf_trampoline *tr) { }
         |             ^
   3 errors generated.


vim +/direct_ops_del +331 kernel/bpf/trampoline.c

   324	
   325	static int unregister_fentry(struct bpf_trampoline *tr, void *old_addr)
   326	{
   327		void *ip = tr->func.addr;
   328		int ret;
   329	
   330		if (tr->func.ftrace_managed)
 > 331			ret = direct_ops_del(tr->fops, tr->ip, old_addr);
   332		else
   333			ret = bpf_arch_text_poke(ip, BPF_MOD_CALL, old_addr, NULL);
   334	
   335		return ret;
   336	}
   337	
   338	static int modify_fentry(struct bpf_trampoline *tr, void *old_addr, void *new_addr,
   339				 bool lock_direct_mutex)
   340	{
   341		void *ip = tr->func.addr;
   342		int ret;
   343	
   344		if (tr->func.ftrace_managed) {
 > 345			ret = direct_ops_mod(tr->fops, tr->ip, new_addr, lock_direct_mutex);
   346		} else {
   347			ret = bpf_arch_text_poke(ip, BPF_MOD_CALL, old_addr, new_addr);
   348		}
   349		return ret;
   350	}
   351	
   352	/* first time registering */
   353	static int register_fentry(struct bpf_trampoline *tr, void *new_addr)
   354	{
   355		void *ip = tr->func.addr;
   356		unsigned long faddr;
   357		int ret;
   358	
   359		faddr = ftrace_location((unsigned long)ip);
   360		if (faddr) {
   361			if (!tr->fops)
   362				return -ENOTSUPP;
   363			tr->func.ftrace_managed = true;
   364		}
   365	
   366		if (tr->func.ftrace_managed) {
 > 367			ret = direct_ops_add(tr->fops, tr->ip, new_addr);
   368		} else {
   369			ret = bpf_arch_text_poke(ip, BPF_MOD_CALL, NULL, new_addr);
   370		}
   371	
   372		return ret;
   373	}
   374	

-- 
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:[~2025-11-21  8:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21  8:18 [jolsa-perf:bpf/single_direct_ops_ci 11/11] kernel/bpf/trampoline.c:331:9: error: call to undeclared function 'direct_ops_del'; ISO C99 and later do not support implicit function declarations 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;
as well as URLs for NNTP newsgroup(s).