Re: [PATCH 2/3] bpf: remove bpf_key reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi James,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master linus/master v6.16-rc7 next-20250725]
[cannot apply to bpf-next/net]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/James-Bottomley/bpf-make-bpf_key-an-opaque-type/20250724-224304
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20250724143428.4416-3-James.Bottomley%40HansenPartnership.com
patch subject: [PATCH 2/3] bpf: remove bpf_key reference
config: i386-randconfig-063-20250725 (https://download.01.org/0day-ci/archive/20250726/202507261944.7ub6moae-lkp@xxxxxxxxx/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250726/202507261944.7ub6moae-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/202507261944.7ub6moae-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
   kernel/trace/bpf_trace.c:834:41: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __user *[addressable] [assigned] [usertype] sival_ptr @@     got void * @@
   kernel/trace/bpf_trace.c:834:41: sparse:     expected void [noderef] __user *[addressable] [assigned] [usertype] sival_ptr
   kernel/trace/bpf_trace.c:834:41: sparse:     got void *
   kernel/trace/bpf_trace.c:3695:52: sparse: sparse: cast removes address space '__user' of expression
   kernel/trace/bpf_trace.c:3709:56: sparse: sparse: cast removes address space '__user' of expression
   kernel/trace/bpf_trace.c:3723:52: sparse: sparse: cast removes address space '__user' of expression
   kernel/trace/bpf_trace.c:3730:56: sparse: sparse: cast removes address space '__user' of expression
   kernel/trace/bpf_trace.c:3738:52: sparse: sparse: cast removes address space '__user' of expression
   kernel/trace/bpf_trace.c:3746:56: sparse: sparse: cast removes address space '__user' of expression
>> kernel/trace/bpf_trace.c:1349:42: sparse: sparse: non size-preserving pointer to integer cast
   kernel/trace/bpf_trace.c:1377:42: sparse: sparse: non size-preserving pointer to integer cast
   kernel/trace/bpf_trace.c: note: in included file (through include/linux/rbtree.h, include/linux/mm_types.h, include/linux/mmzone.h, ...):
   include/linux/rcupdate.h:871:25: sparse: sparse: context imbalance in 'uprobe_prog_run' - unexpected unlock

vim +1349 kernel/trace/bpf_trace.c

  1339	
  1340	/**
  1341	 * bpf_key_put - decrement key reference count if key is valid and free bpf_key
  1342	 * @bkey: bpf_key structure
  1343	 *
  1344	 * Decrement the reference count of the key inside *bkey*, if the pointer
  1345	 * is valid, and free *bkey*.
  1346	 */
  1347	__bpf_kfunc void bpf_key_put(struct bpf_key *bkey)
  1348	{
> 1349		if (system_keyring_id_check((u64)bkey->key) < 0)
  1350			key_put(bkey->key);
  1351	
  1352		kfree(bkey);
  1353	}
  1354	

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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux