Hi Jiayuan,

kernel test robot noticed the following build warnings:

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

url:    
https://github.com/intel-lab-lkp/linux/commits/Jiayuan-Chen/bpf-Add-kfuncs-for-detecting-execution-context/20251022-193551
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    
https://lore.kernel.org/r/20251022113412.352307-2-jiayuan.chen%40linux.dev
patch subject: [PATCH bpf-next v1 1/2] bpf: Add kfuncs for detecting execution 
context
config: alpha-randconfig-r123-20251023 
(https://download.01.org/0day-ci/archive/20251024/[email protected]/config)
compiler: alpha-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20251024/[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]/

sparse warnings: (new ones prefixed by >>)
   kernel/bpf/helpers.c:1199:21: sparse: sparse: incorrect type in assignment 
(different address spaces) @@     expected unsigned long long ( *[usertype] 
callback_fn )( ... ) @@     got void [noderef] __rcu * @@
   kernel/bpf/helpers.c:1199:21: sparse:     expected unsigned long long ( 
*[usertype] callback_fn )( ... )
   kernel/bpf/helpers.c:1199:21: sparse:     got void [noderef] __rcu *
   kernel/bpf/helpers.c:2480:18: sparse: sparse: symbol 'bpf_task_release_dtor' 
was not declared. Should it be static?
   kernel/bpf/helpers.c:2510:18: sparse: sparse: symbol 
'bpf_cgroup_release_dtor' was not declared. Should it be static?
>> kernel/bpf/helpers.c:4260:18: sparse: sparse: symbol 'bpf_in_nmi_context' 
>> was not declared. Should it be static?
   kernel/bpf/helpers.c:2976:18: sparse: sparse: context imbalance in 
'bpf_rcu_read_lock' - wrong count at exit
   kernel/bpf/helpers.c:2981:18: sparse: sparse: context imbalance in 
'bpf_rcu_read_unlock' - unexpected unlock

vim +/bpf_in_nmi_context +4260 kernel/bpf/helpers.c

  4254  
  4255  /**
  4256   * bpf_in_nmi_context - Check whether we are serving NMI
  4257   *
  4258   * Return: true if we are serving NMI
  4259   */
> 4260  __bpf_kfunc bool bpf_in_nmi_context(void)
  4261  {
  4262          return in_nmi();
  4263  }
  4264  

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

Reply via email to