Re: [PATCH 10/14] bpf: Implement BTF fixup functionality

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

 



Hi Blaise,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf/master]
[also build test ERROR on linus/master v6.13-rc6]
[cannot apply to bpf-next/master next-20250110]
[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/Blaise-Boscaccy/bpf-Add-data-structures-for-managing-in-kernel-eBPF-relocations/20250110-064354
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
patch link:    https://lore.kernel.org/r/20250109214617.485144-11-bboscaccy%40linux.microsoft.com
patch subject: [PATCH 10/14] bpf: Implement BTF fixup functionality
config: i386-buildonly-randconfig-006-20250111 (https://download.01.org/0day-ci/archive/20250111/202501111043.1XoiVhsx-lkp@xxxxxxxxx/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250111/202501111043.1XoiVhsx-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/202501111043.1XoiVhsx-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   kernel/bpf/syscall.c:6438:22: error: incompatible pointer types passing 'Elf32_Sym *' (aka 'struct elf32_sym *') to parameter of type 'const Elf64_Sym *' (aka 'const struct elf64_sym *') [-Werror,-Wincompatible-pointer-types]
    6438 |                 if (!sym_is_extern(&sym[i]))
         |                                    ^~~~~~~
   kernel/bpf/syscall.c:6082:44: note: passing argument to parameter 'sym' here
    6082 | static bool sym_is_extern(const Elf64_Sym *sym)
         |                                            ^
   kernel/bpf/syscall.c:6463:20: error: call to undeclared function 'bpf_core_essential_name_len'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    6463 |                 ext_essent_len = bpf_core_essential_name_len(ext->name);
         |                                  ^
>> kernel/bpf/syscall.c:6664:11: error: incompatible pointer types returning 'Elf32_Sym *' (aka 'struct elf32_sym *') from a function with result type 'Elf64_Sym *' (aka 'struct elf64_sym *') [-Werror,-Wincompatible-pointer-types]
    6664 |                         return &sym[i];
         |                                ^~~~~~~
   kernel/bpf/syscall.c:7286:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
    7286 |         .arg2_type      = ARG_PTR_TO_MEM | MEM_RDONLY,
         |                           ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
   kernel/bpf/syscall.c:7336:41: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
    7336 |         .arg4_type      = ARG_PTR_TO_FIXED_SIZE_MEM | MEM_UNINIT | MEM_WRITE | MEM_ALIGNED,
         |                           ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
   2 warnings and 3 errors generated.


vim +6664 kernel/bpf/syscall.c

  6648	
  6649	static Elf64_Sym *find_elf_var_sym(const struct bpf_obj *obj, const char *name)
  6650	{
  6651		unsigned int i;
  6652		Elf_Shdr *symsec = &obj->sechdrs[obj->index.sym];
  6653		Elf_Sym *sym = (void *)obj->hdr + symsec->sh_offset;
  6654	
  6655		for (i = 1; i < symsec->sh_size / sizeof(Elf_Sym); i++) {
  6656			if (ELF64_ST_TYPE(sym[i].st_info) != STT_OBJECT)
  6657				continue;
  6658	
  6659			if (ELF64_ST_BIND(sym[i].st_info) != STB_GLOBAL &&
  6660			    ELF64_ST_BIND(sym[i].st_info) != STB_WEAK)
  6661				continue;
  6662	
  6663			if (strcmp(name,  obj->strtab + sym[i].st_name) == 0)
> 6664				return &sym[i];
  6665	
  6666		}
  6667		return ERR_PTR(-ENOENT);
  6668	}
  6669	

-- 
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