Hi Jiri,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/master]

url:    
https://github.com/intel-lab-lkp/linux/commits/Jiri-Olsa/ftrace-bpf-Remove-FTRACE_OPS_FL_JMP-ftrace_ops-flag/20251216-052916
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    
https://lore.kernel.org/r/20251215211402.353056-10-jolsa%40kernel.org
patch subject: [PATCHv5 bpf-next 9/9] bpf,x86: Use single ftrace_ops for direct 
calls
config: arc-allyesconfig 
(https://download.01.org/0day-ci/archive/20251221/[email protected]/config)
compiler: arc-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20251221/[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 >>):

   kernel/bpf/trampoline.c: In function 'unregister_fentry':
>> kernel/bpf/trampoline.c:367:23: error: implicit declaration of function 
>> 'direct_ops_del'; did you mean 'direct_ops_free'? 
>> [-Wimplicit-function-declaration]
     367 |                 ret = direct_ops_del(tr, old_addr);
         |                       ^~~~~~~~~~~~~~
         |                       direct_ops_free
   kernel/bpf/trampoline.c: In function 'modify_fentry':
>> kernel/bpf/trampoline.c:381:23: error: implicit declaration of function 
>> 'direct_ops_mod'; did you mean 'direct_ops_free'? 
>> [-Wimplicit-function-declaration]
     381 |                 ret = direct_ops_mod(tr, new_addr, 
lock_direct_mutex);
         |                       ^~~~~~~~~~~~~~
         |                       direct_ops_free
   kernel/bpf/trampoline.c: In function 'register_fentry':
>> kernel/bpf/trampoline.c:404:23: error: implicit declaration of function 
>> 'direct_ops_add'; did you mean 'direct_ops_free'? 
>> [-Wimplicit-function-declaration]
     404 |                 ret = direct_ops_add(tr, new_addr);
         |                       ^~~~~~~~~~~~~~
         |                       direct_ops_free


vim +367 kernel/bpf/trampoline.c

   360  
   361  static int unregister_fentry(struct bpf_trampoline *tr, u32 orig_flags,
   362                               void *old_addr)
   363  {
   364          int ret;
   365  
   366          if (tr->func.ftrace_managed)
 > 367                  ret = direct_ops_del(tr, old_addr);
   368          else
   369                  ret = bpf_trampoline_update_fentry(tr, orig_flags, 
old_addr, NULL);
   370  
   371          return ret;
   372  }
   373  
   374  static int modify_fentry(struct bpf_trampoline *tr, u32 orig_flags,
   375                           void *old_addr, void *new_addr,
   376                           bool lock_direct_mutex)
   377  {
   378          int ret;
   379  
   380          if (tr->func.ftrace_managed) {
 > 381                  ret = direct_ops_mod(tr, new_addr, lock_direct_mutex);
   382          } else {
   383                  ret = bpf_trampoline_update_fentry(tr, orig_flags, 
old_addr,
   384                                                     new_addr);
   385          }
   386          return ret;
   387  }
   388  
   389  /* first time registering */
   390  static int register_fentry(struct bpf_trampoline *tr, void *new_addr)
   391  {
   392          void *ip = tr->func.addr;
   393          unsigned long faddr;
   394          int ret;
   395  
   396          faddr = ftrace_location((unsigned long)ip);
   397          if (faddr) {
   398                  if (!tr->fops)
   399                          return -ENOTSUPP;
   400                  tr->func.ftrace_managed = true;
   401          }
   402  
   403          if (tr->func.ftrace_managed) {
 > 404                  ret = direct_ops_add(tr, new_addr);
   405          } else {
   406                  ret = bpf_trampoline_update_fentry(tr, 0, NULL, 
new_addr);
   407          }
   408  
   409          return ret;
   410  }
   411  

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

Reply via email to