tree:
https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/attach
head: 309b598ba309017a35c6659304b00395d39c0ecb
commit: 76d2bc34edffed0466fa45da762d30bf14425f40 [14/18] bpf: Add
BPF_TRAMPOLINE_BATCH_DETACH support
config: arm-randconfig-r012-20201018 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
2a75e956e5ce7ea212333a86fe65fc68185cbf48)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
#
https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id...
git remote add jolsa-perf
https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/attach
git checkout 76d2bc34edffed0466fa45da762d30bf14425f40
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> kernel/bpf/syscall.c:2508:28: error: too many arguments to
function call, expected 2, have 3
tr_link->trampoline, NULL));
^~~~
include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
include/asm-generic/bug.h:145:27: note: expanded from macro 'WARN_ON_ONCE'
int __ret_warn_once = !!(condition); \
^~~~~~~~~
include/linux/bpf.h:712:19: note: 'bpf_trampoline_unlink_prog' declared here
static inline int bpf_trampoline_unlink_prog(struct bpf_prog *prog,
^
kernel/bpf/syscall.c:2919:10: error: implicit declaration of function
'bpf_trampoline_batch_alloc' [-Werror,-Wimplicit-function-declaration]
batch = bpf_trampoline_batch_alloc(count);
^
kernel/bpf/syscall.c:2919:10: note: did you mean 'bpf_trampoline_batch'?
kernel/bpf/syscall.c:2885:12: note: 'bpf_trampoline_batch' declared here
static int bpf_trampoline_batch(const union bpf_attr *attr, int cmd)
^
kernel/bpf/syscall.c:2919:8: warning: incompatible integer to pointer conversion
assigning to 'struct bpf_trampoline_batch *' from 'int'
[-Wint-conversion]
batch = bpf_trampoline_batch_alloc(count);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/syscall.c:2960:64: error: too many arguments to function call, expected 2,
have 3
bpf_trampoline_unlink_prog(link->prog,
tr_link->trampoline, batch);
~~~~~~~~~~~~~~~~~~~~~~~~~~
^~~~~
include/linux/bpf.h:712:19: note: 'bpf_trampoline_unlink_prog' declared here
static inline int bpf_trampoline_unlink_prog(struct bpf_prog *prog,
^
kernel/bpf/syscall.c:2966:9: error: implicit declaration of function
'register_ftrace_direct_ips' [-Werror,-Wimplicit-function-declaration]
ret = register_ftrace_direct_ips(batch->ips, batch->addrs,
batch->idx);
^
kernel/bpf/syscall.c:2966:9: note: did you mean 'register_ftrace_direct'?
include/linux/ftrace.h:300:19: note: 'register_ftrace_direct' declared here
static inline int register_ftrace_direct(unsigned long ip, unsigned long addr)
^
> kernel/bpf/syscall.c:2968:9: error: implicit declaration of
function 'unregister_ftrace_direct_ips' [-Werror,-Wimplicit-function-declaration]
ret = unregister_ftrace_direct_ips(batch->ips,
batch->addrs, batch->idx);
^
kernel/bpf/syscall.c:2968:9: note: did you mean 'register_ftrace_direct_ips'?
kernel/bpf/syscall.c:2966:9: note: 'register_ftrace_direct_ips' declared here
ret = register_ftrace_direct_ips(batch->ips, batch->addrs,
batch->idx);
^
kernel/bpf/syscall.c:2974:2: error: implicit declaration of function
'bpf_trampoline_batch_free' [-Werror,-Wimplicit-function-declaration]
bpf_trampoline_batch_free(batch);
^
1 warning and 6 errors generated.
vim +2508 kernel/bpf/syscall.c
2501
2502 static void bpf_tracing_link_release(struct bpf_link *link)
2503 {
2504 struct bpf_tracing_link *tr_link =
2505 container_of(link, struct bpf_tracing_link, link);
2506
2507 WARN_ON_ONCE(bpf_trampoline_unlink_prog(link->prog,
2508 tr_link->trampoline, NULL));
2509
2510 bpf_trampoline_put(tr_link->trampoline);
2511
2512 /* tgt_prog is NULL if target is a kernel function */
2513 if (tr_link->tgt_prog)
2514 bpf_prog_put(tr_link->tgt_prog);
2515 }
2516
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org