From: kernel test robot <lkp@intel.com>
To: Yafang Shao <laoar.shao@gmail.com>,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, song@kernel.org, yhs@fb.com,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org, quentin@isovalent.com
Cc: oe-kbuild-all@lists.linux.dev, bpf@vger.kernel.org,
Yafang Shao <laoar.shao@gmail.com>
Subject: Re: [PATCH bpf-next 1/6] bpf: Support ->fill_link_info for kprobe_multi
Date: Sat, 3 Jun 2023 14:38:02 +0800 [thread overview]
Message-ID: <202306031438.0X2HPFQl-lkp@intel.com> (raw)
In-Reply-To: <20230602085239.91138-2-laoar.shao@gmail.com>
Hi Yafang,
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-fill_link_info-for-kprobe_multi/20230602-165455
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20230602085239.91138-2-laoar.shao%40gmail.com
patch subject: [PATCH bpf-next 1/6] bpf: Support ->fill_link_info for kprobe_multi
config: i386-randconfig-s002-20230601 (https://download.01.org/0day-ci/archive/20230603/202306031438.0X2HPFQl-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/270f3eb6c142f1f0ec7d800b8ecaab1b101682a0
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yafang-Shao/bpf-Support-fill_link_info-for-kprobe_multi/20230602-165455
git checkout 270f3eb6c142f1f0ec7d800b8ecaab1b101682a0
# 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=i386 olddefconfig
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 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/202306031438.0X2HPFQl-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> kernel/trace/bpf_trace.c:2554:24: sparse: sparse: cast removes address space '__user' of expression
>> kernel/trace/bpf_trace.c:2571:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got unsigned long long [usertype] *uaddrs @@
kernel/trace/bpf_trace.c:2571:26: sparse: expected void [noderef] __user *to
kernel/trace/bpf_trace.c:2571:26: sparse: got unsigned long long [usertype] *uaddrs
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 +/__user +2554 kernel/trace/bpf_trace.c
2550
2551 static int bpf_kprobe_multi_link_fill_link_info(const struct bpf_link *link,
2552 struct bpf_link_info *info)
2553 {
> 2554 u64 *uaddrs = (u64 *)u64_to_user_ptr(info->kprobe_multi.addrs);
2555 struct bpf_kprobe_multi_link *kmulti_link;
2556 u32 ucount = info->kprobe_multi.count;
2557
2558 if (!uaddrs ^ !ucount)
2559 return -EINVAL;
2560
2561 kmulti_link = container_of(link, struct bpf_kprobe_multi_link, link);
2562 if (!uaddrs) {
2563 info->kprobe_multi.count = kmulti_link->cnt;
2564 return 0;
2565 }
2566
2567 if (!ucount)
2568 return 0;
2569 if (ucount != kmulti_link->cnt)
2570 return -EINVAL;
> 2571 if (copy_to_user(uaddrs, kmulti_link->addrs, ucount * sizeof(u64)))
2572 return -EFAULT;
2573 return 0;
2574 }
2575
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-06-03 6:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 8:52 [PATCH bpf-next 0/6] bpf: Support ->fill_link_info for kprobe prog Yafang Shao
2023-06-02 8:52 ` [PATCH bpf-next 1/6] bpf: Support ->fill_link_info for kprobe_multi Yafang Shao
2023-06-02 16:45 ` Stanislav Fomichev
2023-06-04 3:21 ` Yafang Shao
2023-06-03 6:38 ` kernel test robot [this message]
2023-06-04 3:22 ` Yafang Shao
2023-06-02 8:52 ` [PATCH bpf-next 2/6] bpftool: Show probed function in kprobe_multi link info Yafang Shao
2023-06-02 20:36 ` Alexei Starovoitov
2023-06-04 3:24 ` Yafang Shao
2023-06-02 22:16 ` Andrii Nakryiko
2023-06-04 3:26 ` Yafang Shao
2023-06-02 8:52 ` [PATCH bpf-next 3/6] bpf: Always expose the probed address Yafang Shao
2023-06-02 8:52 ` [PATCH bpf-next 4/6] bpf: Add a common helper bpf_copy_to_user() Yafang Shao
2023-06-02 8:52 ` [PATCH bpf-next 5/6] bpf: Support ->fill_link_info for perf_event Yafang Shao
2023-06-02 22:19 ` Andrii Nakryiko
2023-06-04 3:28 ` Yafang Shao
2023-06-02 8:52 ` [PATCH bpf-next 6/6] bpftool: Show probed function in perf_event link info Yafang Shao
2023-06-02 20:38 ` Alexei Starovoitov
2023-06-04 3:23 ` 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=202306031438.0X2HPFQl-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=martin.lau@linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quentin@isovalent.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).