Re: [PATCH net-next v6 1/3] net: flow_dissector: extend bpf flow dissector support with vnet hdr
From: kernel test robot <hidden>
Date: 2021-06-16 15:49:55
Also in:
oe-kbuild-all
Hi Tanner, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Tanner-Love/virtio_net-add-optional-flow-dissection-in-virtio_net_hdr_to_skb/20210616-193224 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git c7654495916e109f76a67fd3ae68f8fa70ab4faa config: um-x86_64_defconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/7d159f648961a7849f67e1c3d7ecb3d18bf5c7c2 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Tanner-Love/virtio_net-add-optional-flow-dissection-in-virtio_net_hdr_to_skb/20210616-193224 git checkout 7d159f648961a7849f67e1c3d7ecb3d18bf5c7c2 # save the attached .config to linux build tree make W=1 ARCH=um SUBARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All warnings (new ones prefixed by >>):
quoted
net/core/filter.c:8334:5: warning: no previous prototype for 'check_flow_keys_access' [-Wmissing-prototypes]
8334 | int check_flow_keys_access(int off, int size, enum bpf_access_type t,
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/check_flow_keys_access +8334 net/core/filter.c
8333 8334 int check_flow_keys_access(int off, int size, enum bpf_access_type t,
8335 struct bpf_insn_access_aux *info)
8336 {
8337 if (size < 0 || off < 0 ||
8338 (u64)off + size > sizeof(struct bpf_flow_keys))
8339 return -EACCES;
8340
8341 switch (off) {
8342 case bpf_ctx_range_ptr(struct bpf_flow_keys, vhdr):
8343 if (t == BPF_WRITE || off % size != 0 || size != sizeof(__u64))
8344 return -EACCES;
8345
8346 if (!bpf_flow_dissector_btf_ids[0])
8347 return -EINVAL;
8348
8349 info->btf_id = bpf_flow_dissector_btf_ids[0];
8350
8351 break;
8352 case offsetof(struct bpf_flow_keys, vhdr_is_little_endian):
8353 if (t == BPF_WRITE)
8354 return -EACCES;
8355
8356 break;
8357 }
8358
8359 return 0;
8360 }
8361
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 8653 bytes