Re: [PATCH bpf-next v4 1/5] bpf, x86: Generate trampolines from bpf_tramp_links

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

 



Hi Kui-Feng,

Thank you for the patch! Yet something to improve:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Kui-Feng-Lee/Attach-a-cookie-to-a-tracing-program/20220412-013832
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: hexagon-randconfig-r041-20220411 (https://download.01.org/0day-ci/archive/20220412/202204120650.7IbxkPWZ-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c6e83f560f06cdfe8aa47b248d8bdc58f947274b)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/2f80aef15065fec24c46badf374a2e72d989fa16
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Kui-Feng-Lee/Attach-a-cookie-to-a-tracing-program/20220412-013832
        git checkout 2f80aef15065fec24c46badf374a2e72d989fa16
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/bpf/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> kernel/bpf/syscall.c:2648:42: error: incompatible pointer types passing 'struct bpf_tramp_link *' to parameter of type 'struct bpf_link *' [-Werror,-Wincompatible-pointer-types]
           WARN_ON_ONCE(bpf_trampoline_unlink_prog(&tr_link->link,
                                                   ^~~~~~~~~~~~~~
   include/asm-generic/bug.h:179:41: note: expanded from macro 'WARN_ON_ONCE'
   #define WARN_ON_ONCE(condition) WARN_ON(condition)
                                           ^~~~~~~~~
   include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON'
           int __ret_warn_on = !!(condition);                              \
                                  ^~~~~~~~~
   include/linux/bpf.h:867:63: note: passing argument to parameter 'link' here
   static inline int bpf_trampoline_unlink_prog(struct bpf_link *link,
                                                                 ^
   kernel/bpf/syscall.c:2836:33: error: incompatible pointer types passing 'struct bpf_tramp_link *' to parameter of type 'struct bpf_link *' [-Werror,-Wincompatible-pointer-types]
           err = bpf_trampoline_link_prog(&link->link, tr);
                                          ^~~~~~~~~~~
   include/linux/bpf.h:862:61: note: passing argument to parameter 'link' here
   static inline int bpf_trampoline_link_prog(struct bpf_link *link,
                                                               ^
   2 errors generated.


vim +2648 kernel/bpf/syscall.c

  2642	
  2643	static void bpf_tracing_link_release(struct bpf_link *link)
  2644	{
  2645		struct bpf_tracing_link *tr_link =
  2646			container_of(link, struct bpf_tracing_link, link.link);
  2647	
> 2648		WARN_ON_ONCE(bpf_trampoline_unlink_prog(&tr_link->link,
  2649							tr_link->trampoline));
  2650	
  2651		bpf_trampoline_put(tr_link->trampoline);
  2652	
  2653		/* tgt_prog is NULL if target is a kernel function */
  2654		if (tr_link->tgt_prog)
  2655			bpf_prog_put(tr_link->tgt_prog);
  2656	}
  2657	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[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