Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [jolsa-perf:trampoline_multi_10 14/21] kernel/bpf/syscall.c:3216:42: error: incompatible pointer types passing 'struct bpf_tramp_node *' to parameter of type 'struct bpf_tramp_link *'
@ 2024-10-23  9:12 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-23  9:12 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git trampoline_multi_10
head:   48132820c5a21b82d1a4507a86a67b3742fb110e
commit: 265c1db5da4835a0823af297c907ea7961bd6af0 [14/21] bpf: Rename bpf_tramp_link struct to bpf_tramp_node
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241023/202410231731.xZ3KM5Fj-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241023/202410231731.xZ3KM5Fj-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410231731.xZ3KM5Fj-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from kernel/bpf/core.c:21:
   In file included from include/linux/filter.h:9:
>> include/linux/bpf.h:1387:51: warning: declaration of 'struct bpf_tramp_link' will not be visible outside of this function [-Wvisibility]
    1387 | static inline int bpf_trampoline_link_prog(struct bpf_tramp_link *link,
         |                                                   ^
   include/linux/bpf.h:1393:53: warning: declaration of 'struct bpf_tramp_link' will not be visible outside of this function [-Wvisibility]
    1393 | static inline int bpf_trampoline_unlink_prog(struct bpf_tramp_link *link,
         |                                                     ^
   2 warnings generated.
--
   In file included from kernel/bpf/syscall.c:4:
>> include/linux/bpf.h:1387:51: warning: declaration of 'struct bpf_tramp_link' will not be visible outside of this function [-Wvisibility]
    1387 | static inline int bpf_trampoline_link_prog(struct bpf_tramp_link *link,
         |                                                   ^
   include/linux/bpf.h:1393:53: warning: declaration of 'struct bpf_tramp_link' will not be visible outside of this function [-Wvisibility]
    1393 | static inline int bpf_trampoline_unlink_prog(struct bpf_tramp_link *link,
         |                                                     ^
>> kernel/bpf/syscall.c:3216:42: error: incompatible pointer types passing 'struct bpf_tramp_node *' to parameter of type 'struct bpf_tramp_link *' [-Werror,-Wincompatible-pointer-types]
    3216 |         WARN_ON_ONCE(bpf_trampoline_unlink_prog(&tr_link->node,
         |                                                 ^~~~~~~~~~~~~~
   include/asm-generic/bug.h:111:25: note: expanded from macro 'WARN_ON_ONCE'
     111 |         int __ret_warn_on = !!(condition);                      \
         |                                ^~~~~~~~~
   include/linux/bpf.h:1393:69: note: passing argument to parameter 'link' here
    1393 | static inline int bpf_trampoline_unlink_prog(struct bpf_tramp_link *link,
         |                                                                     ^
   kernel/bpf/syscall.c:3432:33: error: incompatible pointer types passing 'struct bpf_tramp_node *' to parameter of type 'struct bpf_tramp_link *' [-Werror,-Wincompatible-pointer-types]
    3432 |         err = bpf_trampoline_link_prog(&link->node, tr, tgt_prog);
         |                                        ^~~~~~~~~~~
   include/linux/bpf.h:1387:67: note: passing argument to parameter 'link' here
    1387 | static inline int bpf_trampoline_link_prog(struct bpf_tramp_link *link,
         |                                                                   ^
   2 warnings and 2 errors generated.


vim +3216 kernel/bpf/syscall.c

  3210	
  3211	static void bpf_tracing_link_release(struct bpf_link *link)
  3212	{
  3213		struct bpf_tracing_link *tr_link =
  3214			container_of(link, struct bpf_tracing_link, link);
  3215	
> 3216		WARN_ON_ONCE(bpf_trampoline_unlink_prog(&tr_link->node,
  3217							tr_link->trampoline,
  3218							tr_link->tgt_prog));
  3219	
  3220		bpf_trampoline_put(tr_link->trampoline);
  3221	
  3222		/* tgt_prog is NULL if target is a kernel function */
  3223		if (tr_link->tgt_prog)
  3224			bpf_prog_put(tr_link->tgt_prog);
  3225	}
  3226	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-23  9:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-23  9:12 [jolsa-perf:trampoline_multi_10 14/21] kernel/bpf/syscall.c:3216:42: error: incompatible pointer types passing 'struct bpf_tramp_node *' to parameter of type 'struct bpf_tramp_link *' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox