All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC bpf-next 09/16] bpf: Add BPF_TRAMPOLINE_BATCH_ATTACH support
Date: Thu, 22 Oct 2020 19:57:22 +0800	[thread overview]
Message-ID: <202010221955.NyLuvVaX-lkp@intel.com> (raw)
In-Reply-To: <20201022082138.2322434-10-jolsa@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 4800 bytes --]

Hi Jiri,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Jiri-Olsa/bpf-Speed-up-trampoline-attach/20201022-162338
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-r002-20201022 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ee6abef5323d59b983129bf3514ef6775d1d6cd5)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/5ef01502fc4e92b400377ff6a0a497098f7fd7a6
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jiri-Olsa/bpf-Speed-up-trampoline-attach/20201022-162338
        git checkout 5ef01502fc4e92b400377ff6a0a497098f7fd7a6
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All errors (new ones prefixed by >>):

>> 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:2952:2: error: implicit declaration of function 'bpf_trampoline_batch_free' [-Werror,-Wimplicit-function-declaration]
           bpf_trampoline_batch_free(batch);
           ^
   1 warning and 2 errors generated.

vim +/bpf_trampoline_batch_alloc +2919 kernel/bpf/syscall.c

  2884	
  2885	static int bpf_trampoline_batch(const union bpf_attr *attr, int cmd)
  2886	{
  2887		void __user *uout = u64_to_user_ptr(attr->trampoline_batch.out);
  2888		void __user *uin = u64_to_user_ptr(attr->trampoline_batch.in);
  2889		struct bpf_trampoline_batch *batch = NULL;
  2890		struct bpf_prog *prog;
  2891		int count, ret, i, fd;
  2892		u32 *in, *out;
  2893	
  2894		if (CHECK_ATTR(BPF_RAW_TRACEPOINT_OPEN_BATCH))
  2895			return -EINVAL;
  2896	
  2897		if (!uin || !uout)
  2898			return -EINVAL;
  2899	
  2900		count = attr->trampoline_batch.count;
  2901	
  2902		in = kcalloc(count, sizeof(u32), GFP_KERNEL);
  2903		out = kcalloc(count, sizeof(u32), GFP_KERNEL);
  2904		if (!in || !out) {
  2905			kfree(in);
  2906			kfree(out);
  2907			return -ENOMEM;
  2908		}
  2909	
  2910		ret = copy_from_user(in, uin, count * sizeof(u32));
  2911		if (ret)
  2912			goto out_clean;
  2913	
  2914		/* test read out array */
  2915		ret = copy_to_user(uout, out, count * sizeof(u32));
  2916		if (ret)
  2917			goto out_clean;
  2918	
> 2919		batch = bpf_trampoline_batch_alloc(count);
  2920		if (!batch)
  2921			goto out_clean;
  2922	
  2923		for (i = 0; i < count; i++) {
  2924			if (cmd == BPF_TRAMPOLINE_BATCH_ATTACH) {
  2925				prog = bpf_prog_get(in[i]);
  2926				if (IS_ERR(prog)) {
  2927					ret = PTR_ERR(prog);
  2928					goto out_clean;
  2929				}
  2930	
  2931				ret = -EINVAL;
  2932				if (prog->type != BPF_PROG_TYPE_TRACING)
  2933					goto out_clean;
  2934				if (prog->type == BPF_PROG_TYPE_TRACING &&
  2935				    prog->expected_attach_type == BPF_TRACE_RAW_TP)
  2936					goto out_clean;
  2937	
  2938				fd = bpf_tracing_prog_attach(prog, 0, 0, batch);
  2939				if (fd < 0)
  2940					goto out_clean;
  2941	
  2942				out[i] = fd;
  2943			}
  2944		}
  2945	
  2946		ret = register_ftrace_direct_ips(batch->ips, batch->addrs, batch->idx);
  2947		if (!ret)
  2948			WARN_ON_ONCE(copy_to_user(uout, out, count * sizeof(u32)));
  2949	
  2950	out_clean:
  2951		/* XXX cleanup partialy attached array */
> 2952		bpf_trampoline_batch_free(batch);
  2953		kfree(in);
  2954		kfree(out);
  2955		return ret;
  2956	}
  2957	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35931 bytes --]

  parent reply	other threads:[~2020-10-22 11:57 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  8:21 [RFC bpf-next 00/16] bpf: Speed up trampoline attach Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 01/16] ftrace: Add check_direct_entry function Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 02/16] ftrace: Add adjust_direct_size function Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 03/16] ftrace: Add get/put_direct_func function Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 04/16] ftrace: Add ftrace_set_filter_ips function Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 05/16] ftrace: Add register_ftrace_direct_ips function Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 06/16] ftrace: Add unregister_ftrace_direct_ips function Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 07/16] kallsyms: Use rb tree for kallsyms name search Jiri Olsa
2020-10-28 18:25   ` Jiri Olsa
2020-10-28 21:15     ` Alexei Starovoitov
2020-10-29  9:29       ` Jiri Olsa
2020-10-29 22:45         ` Andrii Nakryiko
2020-10-28 22:40     ` Andrii Nakryiko
2020-10-29  9:33       ` Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 08/16] bpf: Use delayed link free in bpf_link_put Jiri Olsa
2020-10-23 19:46   ` Andrii Nakryiko
2020-10-25 19:02     ` Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 09/16] bpf: Add BPF_TRAMPOLINE_BATCH_ATTACH support Jiri Olsa
2020-10-22 11:55   ` kernel test robot
2020-10-22 11:57   ` kernel test robot [this message]
2020-10-23 20:03   ` Andrii Nakryiko
2020-10-23 20:31     ` Steven Rostedt
2020-10-23 22:23       ` Andrii Nakryiko
2020-10-25 19:41         ` Jiri Olsa
2020-10-26 23:19           ` Andrii Nakryiko
2020-10-22  8:21 ` [RFC bpf-next 10/16] bpf: Add BPF_TRAMPOLINE_BATCH_DETACH support Jiri Olsa
2020-10-22 13:00   ` kernel test robot
2020-10-22 13:04   ` kernel test robot
2020-10-22  8:21 ` [RFC bpf-next 11/16] bpf: Sync uapi bpf.h to tools Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 12/16] bpf: Move synchronize_rcu_mult for batch processing (NOT TO BE MERGED) Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 13/16] libbpf: Add trampoline batch attach support Jiri Olsa
2020-10-23 20:09   ` Andrii Nakryiko
2020-10-25 19:11     ` Jiri Olsa
2020-10-26 23:15       ` Andrii Nakryiko
2020-10-27 19:03         ` Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 14/16] libbpf: Add trampoline batch detach support Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 15/16] selftests/bpf: Add trampoline batch test Jiri Olsa
2020-10-22  8:21 ` [RFC bpf-next 16/16] selftests/bpf: Add attach batch test (NOT TO BE MERGED) Jiri Olsa
2020-10-22 13:35 ` [RFC bpf-next 00/16] bpf: Speed up trampoline attach Steven Rostedt
2020-10-22 14:11   ` Jiri Olsa
2020-10-22 14:42     ` Steven Rostedt
2020-10-22 16:21       ` Steven Rostedt
2020-10-22 20:52         ` Steven Rostedt
2020-10-23  6:09           ` Jiri Olsa
2020-10-23 13:50             ` Steven Rostedt
2020-10-25 19:01               ` Jiri Olsa
2020-10-27  4:30       ` Alexei Starovoitov
2020-10-27 13:14         ` Steven Rostedt
2020-10-27 14:28         ` Jiri Olsa
2020-10-28 21:13           ` Alexei Starovoitov
2020-10-29 11:09             ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202010221955.NyLuvVaX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.