lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <202211110955.gi9aqucy-lkp@intel.com>
Date: Fri, 11 Nov 2022 09:13:07 +0800
From: kernel test robot <lkp@...el.com>
To: John Fastabend <john.fastabend@...il.com>, hawk@...nel.org,
daniel@...earbox.net, kuba@...nel.org, davem@...emloft.net,
ast@...nel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
netdev@...r.kernel.org, bpf@...r.kernel.org,
john.fastabend@...il.com, sdf@...gle.com
Subject: Re: [1/2 bpf-next] bpf: expose net_device from xdp for metadata
Hi John,
I love your patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/John-Fastabend/bpf-expose-net_device-from-xdp-for-metadata/20221110-055550
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20221109215242.1279993-2-john.fastabend%40gmail.com
patch subject: [1/2 bpf-next] bpf: expose net_device from xdp for metadata
config: mips-bcm63xx_defconfig
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 463da45892e2d2a262277b91b96f5f8c05dc25d0)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/410d4baa8908e723a4b0ef7ca54e24462bb0ea16
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review John-Fastabend/bpf-expose-net_device-from-xdp-for-metadata/20221110-055550
git checkout 410d4baa8908e723a4b0ef7ca54e24462bb0ea16
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash net/core/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> net/core/filter.c:8730:15: error: call to undeclared function 'bpf_get_btf_vmlinux'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
info->btf = bpf_get_btf_vmlinux();
^
>> net/core/filter.c:8730:13: error: incompatible integer to pointer conversion assigning to 'struct btf *' from 'int' [-Wint-conversion]
info->btf = bpf_get_btf_vmlinux();
^ ~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +/bpf_get_btf_vmlinux +8730 net/core/filter.c
8694
8695 static bool xdp_is_valid_access(int off, int size,
8696 enum bpf_access_type type,
8697 const struct bpf_prog *prog,
8698 struct bpf_insn_access_aux *info)
8699 {
8700 if (prog->expected_attach_type != BPF_XDP_DEVMAP) {
8701 switch (off) {
8702 case offsetof(struct xdp_md, egress_ifindex):
8703 return false;
8704 }
8705 }
8706
8707 if (type == BPF_WRITE) {
8708 if (bpf_prog_is_dev_bound(prog->aux)) {
8709 switch (off) {
8710 case offsetof(struct xdp_md, rx_queue_index):
8711 return __is_valid_xdp_access(off, size);
8712 }
8713 }
8714 return false;
8715 }
8716
8717 switch (off) {
8718 case offsetof(struct xdp_md, data):
8719 info->reg_type = PTR_TO_PACKET;
8720 break;
8721 case offsetof(struct xdp_md, data_meta):
8722 info->reg_type = PTR_TO_PACKET_META;
8723 break;
8724 case offsetof(struct xdp_md, data_end):
8725 info->reg_type = PTR_TO_PACKET_END;
8726 break;
8727 case offsetof(struct xdp_md, rx_dev):
8728 info->reg_type = PTR_TO_BTF_ID;
8729 info->btf_id = btf_xdp_get_netdev_id[0];
> 8730 info->btf = bpf_get_btf_vmlinux();
8731 if (IS_ERR_OR_NULL(info->btf))
8732 return false;
8733 if (size != sizeof(u64))
8734 return false;
8735 return true;
8736 }
8737
8738 return __is_valid_xdp_access(off, size);
8739 }
8740
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (62132 bytes)
Powered by blists - more mailing lists