From: kernel test robot <lkp@intel.com>
To: Geliang Tang <geliang.tang@suse.com>, mptcp@lists.linux.dev
Cc: kbuild-all@lists.01.org, Geliang Tang <geliang.tang@suse.com>
Subject: Re: [PATCH mptcp-next v12 07/10] mptcp: add last_snd write access
Date: Thu, 21 Apr 2022 14:42:25 +0800 [thread overview]
Message-ID: <202204210456.03kTcuXu-lkp@intel.com> (raw)
In-Reply-To: <396f8edcbf8e4f65a1d76c228dc3d12aa4dd2f11.1650430389.git.geliang.tang@suse.com>
Hi Geliang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mptcp/export]
[cannot apply to bpf-next/master bpf/master linus/master v5.18-rc3 next-20220420]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Geliang-Tang/BPF-packet-scheduler/20220420-130015
base: https://github.com/multipath-tcp/mptcp_net-next.git export
config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220421/202204210456.03kTcuXu-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/c711e7d26efa699f1cfe5e2c9619bbf5cc98a7a7
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Geliang-Tang/BPF-packet-scheduler/20220420-130015
git checkout c711e7d26efa699f1cfe5e2c9619bbf5cc98a7a7
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash net/mptcp/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
net/mptcp/bpf.c: In function 'bpf_mptcp_sched_btf_struct_access':
>> net/mptcp/bpf.c:69:85: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
69 | bpf_log(log, "access beyond mptcp_sock at off %u size %u ended at %lu",
| ~~^
| |
| long unsigned int
| %u
70 | off, size, end);
| ~~~
| |
| size_t {aka unsigned int}
vim +69 net/mptcp/bpf.c
33
34 static int bpf_mptcp_sched_btf_struct_access(struct bpf_verifier_log *log,
35 const struct btf *btf,
36 const struct btf_type *t, int off,
37 int size, enum bpf_access_type atype,
38 u32 *next_btf_id,
39 enum bpf_type_flag *flag)
40 {
41 const struct btf_type *state;
42 u32 type_id;
43 size_t end;
44
45 if (atype == BPF_READ)
46 return btf_struct_access(log, btf, t, off, size, atype,
47 next_btf_id, flag);
48
49 type_id = btf_find_by_name_kind(btf, "mptcp_sock", BTF_KIND_STRUCT);
50 if (type_id < 0)
51 return -EINVAL;
52
53 state = btf_type_by_id(btf, type_id);
54 if (t != state) {
55 bpf_log(log, "only read is supported\n");
56 return -EACCES;
57 }
58
59 switch (off) {
60 case offsetof(struct mptcp_sock, last_snd):
61 end = offsetofend(struct mptcp_sock, last_snd);
62 break;
63 default:
64 bpf_log(log, "no write support to mptcp_sock at off %d\n", off);
65 return -EACCES;
66 }
67
68 if (off + size > end) {
> 69 bpf_log(log, "access beyond mptcp_sock at off %u size %u ended at %lu",
70 off, size, end);
71 return -EACCES;
72 }
73
74 return NOT_INIT;
75 }
76
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-04-21 6:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 4:56 [PATCH mptcp-next v12 00/10] BPF packet scheduler Geliang Tang
2022-04-20 4:57 ` [PATCH mptcp-next v12 01/10] mptcp: add struct mptcp_sched_ops Geliang Tang
2022-04-20 16:22 ` Matthieu Baerts
2022-04-20 4:57 ` [PATCH mptcp-next v12 02/10] mptcp: register default scheduler Geliang Tang
2022-04-20 4:57 ` [PATCH mptcp-next v12 03/10] mptcp: add a new sysctl scheduler Geliang Tang
2022-04-20 4:57 ` [PATCH mptcp-next v12 04/10] mptcp: add sched in mptcp_sock Geliang Tang
2022-04-20 4:57 ` [PATCH mptcp-next v12 05/10] mptcp: add get_subflow wrapper Geliang Tang
2022-04-20 4:57 ` [PATCH mptcp-next v12 06/10] mptcp: add bpf_mptcp_sched_ops Geliang Tang
2022-04-20 4:57 ` [PATCH mptcp-next v12 07/10] mptcp: add last_snd write access Geliang Tang
2022-04-20 16:23 ` Matthieu Baerts
2022-04-20 16:44 ` Matthieu Baerts
2022-04-21 6:42 ` kernel test robot [this message]
2022-04-20 4:57 ` [PATCH mptcp-next v12 08/10] mptcp: add call_me_again flag Geliang Tang
2022-04-20 16:40 ` Matthieu Baerts
2022-04-20 4:57 ` [PATCH mptcp-next v12 09/10] selftests: bpf: add bpf_first scheduler Geliang Tang
2022-04-20 4:57 ` [PATCH mptcp-next v12 10/10] selftests: bpf: add bpf_first test Geliang Tang
2022-04-20 5:14 ` selftests: bpf: add bpf_first test: Build Failure MPTCP CI
2022-04-20 6:49 ` selftests: bpf: add bpf_first test: Tests Results MPTCP CI
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=202204210456.03kTcuXu-lkp@intel.com \
--to=lkp@intel.com \
--cc=geliang.tang@suse.com \
--cc=kbuild-all@lists.01.org \
--cc=mptcp@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox