From: kernel test robot <lkp@intel.com>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH bpf-next 2/8] bpf: Support ->fill_link_info for kprobe_multi
Date: Mon, 29 May 2023 10:44:53 +0800 [thread overview]
Message-ID: <202305291024.nGHfS0BE-lkp@intel.com> (raw)
In-Reply-To: <20230528142027.5585-3-laoar.shao@gmail.com>
Hi Yafang,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Yafang-Shao/bpf-Support-show_fdinfo-for-kprobe_multi/20230528-222347
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20230528142027.5585-3-laoar.shao%40gmail.com
patch subject: [RFC PATCH bpf-next 2/8] bpf: Support ->fill_link_info for kprobe_multi
config: x86_64-randconfig-s043-20230528 (https://download.01.org/0day-ci/archive/20230529/202305291024.nGHfS0BE-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/025a35eef533c935bbcad95fd50bd973538ef4f7
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yafang-Shao/bpf-Support-show_fdinfo-for-kprobe_multi/20230528-222347
git checkout 025a35eef533c935bbcad95fd50bd973538ef4f7
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 olddefconfig
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/trace/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305291024.nGHfS0BE-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> kernel/trace/bpf_trace.c:2571:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [usertype] *uaddrs @@ got void [noderef] __user * @@
kernel/trace/bpf_trace.c:2571:23: sparse: expected unsigned long long [usertype] *uaddrs
kernel/trace/bpf_trace.c:2571:23: sparse: got void [noderef] __user *
>> kernel/trace/bpf_trace.c:2591:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got unsigned long long [usertype] * @@
kernel/trace/bpf_trace.c:2591:41: sparse: expected void [noderef] __user *to
kernel/trace/bpf_trace.c:2591:41: sparse: got unsigned long long [usertype] *
kernel/trace/bpf_trace.c:2492:21: sparse: sparse: dereference of noderef expression
kernel/trace/bpf_trace.c:2496:66: sparse: sparse: dereference of noderef expression
vim +2571 kernel/trace/bpf_trace.c
2566
2567 static int bpf_kprobe_multi_link_fill_link_info(const struct bpf_link *link,
2568 struct bpf_link_info *info)
2569 {
2570 struct bpf_kprobe_multi_link *kmulti_link;
> 2571 u64 *uaddrs = u64_to_user_ptr(info->kprobe_multi.addrs);
2572 u32 ucount = info->kprobe_multi.count;
2573 int i;
2574
2575 if (!uaddrs ^ !ucount)
2576 return -EINVAL;
2577
2578 kmulti_link = container_of(link, struct bpf_kprobe_multi_link, link);
2579 if (!uaddrs) {
2580 info->kprobe_multi.count = kmulti_link->cnt;
2581 return 0;
2582 }
2583
2584 if (!ucount)
2585 return 0;
2586
2587 if (ucount != kmulti_link->cnt)
2588 return -EINVAL;
2589
2590 for (i = 0; i < ucount; i++)
> 2591 if (copy_to_user(uaddrs + i, kmulti_link->addrs + i,
2592 sizeof(u64)))
2593 return -EFAULT;
2594 return 0;
2595 }
2596
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-05-29 2:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-28 14:20 [RFC PATCH bpf-next 0/8] bpf: Support ->show_fdinfo and ->fill_link_info for kprobe prog Yafang Shao
2023-05-28 14:20 ` [RFC PATCH bpf-next 1/8] bpf: Support ->show_fdinfo for kprobe_multi Yafang Shao
2023-05-29 12:06 ` Jiri Olsa
2023-05-30 1:39 ` Yafang Shao
2023-05-31 0:28 ` Alexei Starovoitov
2023-05-31 3:14 ` Yafang Shao
2023-05-28 14:20 ` [RFC PATCH bpf-next 2/8] bpf: Support ->fill_link_info " Yafang Shao
2023-05-29 2:44 ` kernel test robot [this message]
2023-05-30 1:42 ` Yafang Shao
2023-05-29 12:49 ` Jiri Olsa
2023-05-30 1:41 ` Yafang Shao
2023-05-28 14:20 ` [RFC PATCH bpf-next 3/8] bpftool: Show probed function in kprobe_multi link info Yafang Shao
2023-05-30 11:15 ` Quentin Monnet
2023-05-31 3:16 ` Yafang Shao
2023-05-31 0:31 ` Alexei Starovoitov
2023-05-31 3:17 ` Yafang Shao
2023-05-28 14:20 ` [RFC PATCH bpf-next 4/8] bpf: Always expose the probed address Yafang Shao
2023-05-28 14:20 ` [RFC PATCH bpf-next 5/8] bpf: Support ->show_fdinfo for perf_event Yafang Shao
2023-05-28 14:20 ` [RFC PATCH bpf-next 6/8] bpf: Add a common helper bpf_copy_to_user() Yafang Shao
2023-05-28 14:20 ` [RFC PATCH bpf-next 7/8] bpf: Support ->fill_link_info for perf_event Yafang Shao
2023-05-31 0:37 ` Alexei Starovoitov
2023-05-31 3:24 ` Yafang Shao
2023-05-28 14:20 ` [RFC PATCH bpf-next 8/8] bpftool: Show probed function in perf_event link info Yafang Shao
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=202305291024.nGHfS0BE-lkp@intel.com \
--to=lkp@intel.com \
--cc=laoar.shao@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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.