Re: [PATCH bpf-next 1/3] bpf: remove unused parameter in bpf_jit_binary_pack_finalize

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

 



Hi Rafael,

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/Rafael-Passos/bpf-remove-unused-parameter-in-__bpf_free_used_btfs/20240613-110048
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/7eaed3dc-28e5-409f-8f73-a1bf8acc2937%40smtp-relay.sendinblue.com
patch subject: [PATCH bpf-next 1/3] bpf: remove unused parameter in bpf_jit_binary_pack_finalize
config: powerpc-mpc885_ads_defconfig (https://download.01.org/0day-ci/archive/20240614/202406140304.4Rf0F9mg-lkp@xxxxxxxxx/config)
compiler: powerpc-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240614/202406140304.4Rf0F9mg-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/202406140304.4Rf0F9mg-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   arch/powerpc/net/bpf_jit_comp.c: In function 'bpf_int_jit_compile':
>> arch/powerpc/net/bpf_jit_comp.c:228:50: error: passing argument 1 of 'bpf_jit_binary_pack_finalize' from incompatible pointer type [-Werror=incompatible-pointer-types]
     228 |                 if (bpf_jit_binary_pack_finalize(fp, fhdr, hdr)) {
         |                                                  ^~
         |                                                  |
         |                                                  struct bpf_prog *
   In file included from arch/powerpc/net/bpf_jit_comp.c:14:
   include/linux/filter.h:1132:60: note: expected 'struct bpf_binary_header *' but argument is of type 'struct bpf_prog *'
    1132 | int bpf_jit_binary_pack_finalize(struct bpf_binary_header *ro_header,
         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
>> arch/powerpc/net/bpf_jit_comp.c:228:21: error: too many arguments to function 'bpf_jit_binary_pack_finalize'
     228 |                 if (bpf_jit_binary_pack_finalize(fp, fhdr, hdr)) {
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/filter.h:1132:5: note: declared here
    1132 | int bpf_jit_binary_pack_finalize(struct bpf_binary_header *ro_header,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/net/bpf_jit_comp.c: In function 'bpf_jit_free':
   arch/powerpc/net/bpf_jit_comp.c:351:54: error: passing argument 1 of 'bpf_jit_binary_pack_finalize' from incompatible pointer type [-Werror=incompatible-pointer-types]
     351 |                         bpf_jit_binary_pack_finalize(fp, jit_data->fhdr, jit_data->hdr);
         |                                                      ^~
         |                                                      |
         |                                                      struct bpf_prog *
   include/linux/filter.h:1132:60: note: expected 'struct bpf_binary_header *' but argument is of type 'struct bpf_prog *'
    1132 | int bpf_jit_binary_pack_finalize(struct bpf_binary_header *ro_header,
         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
   arch/powerpc/net/bpf_jit_comp.c:351:25: error: too many arguments to function 'bpf_jit_binary_pack_finalize'
     351 |                         bpf_jit_binary_pack_finalize(fp, jit_data->fhdr, jit_data->hdr);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/filter.h:1132:5: note: declared here
    1132 | int bpf_jit_binary_pack_finalize(struct bpf_binary_header *ro_header,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/bpf_jit_binary_pack_finalize +228 arch/powerpc/net/bpf_jit_comp.c

4ea76e90a97d22 Christophe Leroy 2021-03-22  222  
90d862f370b6e9 Hari Bathini     2023-10-20  223  	fp->bpf_func = (void *)fimage;
4ea76e90a97d22 Christophe Leroy 2021-03-22  224  	fp->jited = 1;
983bdc0245a29c Ravi Bangoria    2021-10-12  225  	fp->jited_len = proglen + FUNCTION_DESCR_SIZE;
4ea76e90a97d22 Christophe Leroy 2021-03-22  226  
4ea76e90a97d22 Christophe Leroy 2021-03-22  227  	if (!fp->is_func || extra_pass) {
90d862f370b6e9 Hari Bathini     2023-10-20 @228  		if (bpf_jit_binary_pack_finalize(fp, fhdr, hdr)) {
90d862f370b6e9 Hari Bathini     2023-10-20  229  			fp = org_fp;
90d862f370b6e9 Hari Bathini     2023-10-20  230  			goto out_addrs;
90d862f370b6e9 Hari Bathini     2023-10-20  231  		}
4ea76e90a97d22 Christophe Leroy 2021-03-22  232  		bpf_prog_fill_jited_linfo(fp, addrs);
4ea76e90a97d22 Christophe Leroy 2021-03-22  233  out_addrs:
4ea76e90a97d22 Christophe Leroy 2021-03-22  234  		kfree(addrs);
4ea76e90a97d22 Christophe Leroy 2021-03-22  235  		kfree(jit_data);
4ea76e90a97d22 Christophe Leroy 2021-03-22  236  		fp->aux->jit_data = NULL;
4ea76e90a97d22 Christophe Leroy 2021-03-22  237  	} else {
4ea76e90a97d22 Christophe Leroy 2021-03-22  238  		jit_data->addrs = addrs;
4ea76e90a97d22 Christophe Leroy 2021-03-22  239  		jit_data->ctx = cgctx;
4ea76e90a97d22 Christophe Leroy 2021-03-22  240  		jit_data->proglen = proglen;
90d862f370b6e9 Hari Bathini     2023-10-20  241  		jit_data->fimage = fimage;
90d862f370b6e9 Hari Bathini     2023-10-20  242  		jit_data->fhdr = fhdr;
90d862f370b6e9 Hari Bathini     2023-10-20  243  		jit_data->hdr = hdr;
4ea76e90a97d22 Christophe Leroy 2021-03-22  244  	}
4ea76e90a97d22 Christophe Leroy 2021-03-22  245  
4ea76e90a97d22 Christophe Leroy 2021-03-22  246  out:
4ea76e90a97d22 Christophe Leroy 2021-03-22  247  	if (bpf_blinded)
4ea76e90a97d22 Christophe Leroy 2021-03-22  248  		bpf_jit_prog_release_other(fp, fp == org_fp ? tmp_fp : org_fp);
4ea76e90a97d22 Christophe Leroy 2021-03-22  249  
4ea76e90a97d22 Christophe Leroy 2021-03-22  250  	return fp;
4ea76e90a97d22 Christophe Leroy 2021-03-22  251  }
983bdc0245a29c Ravi Bangoria    2021-10-12  252  

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