netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Joanne Koong <joannelkoong@gmail.com>, bpf@vger.kernel.org
Cc: kbuild-all@lists.01.org, andrii@kernel.org, daniel@iogearbox.net,
	ast@kernel.org, kafai@fb.com, kuba@kernel.org,
	netdev@vger.kernel.org, Joanne Koong <joannelkoong@gmail.com>
Subject: Re: [PATCH bpf-next v4 1/3] bpf: Add skb dynptrs
Date: Wed, 24 Aug 2022 07:53:08 +0800	[thread overview]
Message-ID: <202208240751.BRPS1SoF-lkp@intel.com> (raw)
In-Reply-To: <20220822235649.2218031-2-joannelkoong@gmail.com>

Hi Joanne,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Joanne-Koong/Add-skb-xdp-dynptrs/20220823-080022
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: csky-randconfig-r022-20220823 (https://download.01.org/0day-ci/archive/20220824/202208240751.BRPS1SoF-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 12.1.0
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
        # https://github.com/intel-lab-lkp/linux/commit/a2c8a74d8f0b7fd0b0008dc9bc5ccf9887317f36
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Joanne-Koong/Add-skb-xdp-dynptrs/20220823-080022
        git checkout a2c8a74d8f0b7fd0b0008dc9bc5ccf9887317f36
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=csky SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   csky-linux-ld: kernel/bpf/helpers.o: in function `____bpf_dynptr_read':
>> kernel/bpf/helpers.c:1543: undefined reference to `__bpf_skb_load_bytes'
   csky-linux-ld: kernel/bpf/helpers.o: in function `bpf_dynptr_read':
   kernel/bpf/helpers.c:1522: undefined reference to `__bpf_skb_load_bytes'
   csky-linux-ld: kernel/bpf/helpers.o: in function `____bpf_dynptr_write':
>> kernel/bpf/helpers.c:1584: undefined reference to `__bpf_skb_store_bytes'
   csky-linux-ld: kernel/bpf/helpers.o: in function `bpf_dynptr_write':
   kernel/bpf/helpers.c:1561: undefined reference to `__bpf_skb_store_bytes'


vim +1543 kernel/bpf/helpers.c

  1521	
  1522	BPF_CALL_5(bpf_dynptr_read, void *, dst, u32, len, struct bpf_dynptr_kern *, src,
  1523		   u32, offset, u64, flags)
  1524	{
  1525		enum bpf_dynptr_type type;
  1526		int err;
  1527	
  1528		if (!src->data || flags)
  1529			return -EINVAL;
  1530	
  1531		err = bpf_dynptr_check_off_len(src, offset, len);
  1532		if (err)
  1533			return err;
  1534	
  1535		type = bpf_dynptr_get_type(src);
  1536	
  1537		switch (type) {
  1538		case BPF_DYNPTR_TYPE_LOCAL:
  1539		case BPF_DYNPTR_TYPE_RINGBUF:
  1540			memcpy(dst, src->data + src->offset + offset, len);
  1541			return 0;
  1542		case BPF_DYNPTR_TYPE_SKB:
> 1543			return __bpf_skb_load_bytes(src->data, src->offset + offset, dst, len);
  1544		default:
  1545			WARN(true, "bpf_dynptr_read: unknown dynptr type %d\n", type);
  1546			return -EFAULT;
  1547		}
  1548	}
  1549	
  1550	static const struct bpf_func_proto bpf_dynptr_read_proto = {
  1551		.func		= bpf_dynptr_read,
  1552		.gpl_only	= false,
  1553		.ret_type	= RET_INTEGER,
  1554		.arg1_type	= ARG_PTR_TO_UNINIT_MEM,
  1555		.arg2_type	= ARG_CONST_SIZE_OR_ZERO,
  1556		.arg3_type	= ARG_PTR_TO_DYNPTR,
  1557		.arg4_type	= ARG_ANYTHING,
  1558		.arg5_type	= ARG_ANYTHING,
  1559	};
  1560	
  1561	BPF_CALL_5(bpf_dynptr_write, struct bpf_dynptr_kern *, dst, u32, offset, void *, src,
  1562		   u32, len, u64, flags)
  1563	{
  1564		enum bpf_dynptr_type type;
  1565		int err;
  1566	
  1567		if (!dst->data || bpf_dynptr_is_rdonly(dst))
  1568			return -EINVAL;
  1569	
  1570		err = bpf_dynptr_check_off_len(dst, offset, len);
  1571		if (err)
  1572			return err;
  1573	
  1574		type = bpf_dynptr_get_type(dst);
  1575	
  1576		switch (type) {
  1577		case BPF_DYNPTR_TYPE_LOCAL:
  1578		case BPF_DYNPTR_TYPE_RINGBUF:
  1579			if (flags)
  1580				return -EINVAL;
  1581			memcpy(dst->data + dst->offset + offset, src, len);
  1582			return 0;
  1583		case BPF_DYNPTR_TYPE_SKB:
> 1584			return __bpf_skb_store_bytes(dst->data, dst->offset + offset, src, len,
  1585						     flags);
  1586		default:
  1587			WARN(true, "bpf_dynptr_write: unknown dynptr type %d\n", type);
  1588			return -EFAULT;
  1589		}
  1590	}
  1591	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  parent reply	other threads:[~2022-08-23 23:53 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-22 23:56 [PATCH bpf-next v4 0/3] Add skb + xdp dynptrs Joanne Koong
2022-08-22 23:56 ` [PATCH bpf-next v4 1/3] bpf: Add skb dynptrs Joanne Koong
2022-08-23 23:22   ` kernel test robot
2022-08-23 23:53   ` kernel test robot [this message]
2022-08-24 18:27   ` Andrii Nakryiko
2022-08-24 23:25     ` Kumar Kartikeya Dwivedi
2022-08-25 21:02       ` Joanne Koong
2022-08-26  0:18         ` Kumar Kartikeya Dwivedi
2022-08-26 18:44           ` Joanne Koong
2022-08-26 18:51             ` Kumar Kartikeya Dwivedi
2022-08-26 19:49               ` Joanne Koong
2022-08-26 20:54                 ` Kumar Kartikeya Dwivedi
2022-08-27  5:36                   ` Andrii Nakryiko
2022-08-27  7:11                     ` Kumar Kartikeya Dwivedi
2022-08-27 17:21                       ` Andrii Nakryiko
2022-08-27 18:32                         ` Kumar Kartikeya Dwivedi
2022-08-27 19:16                           ` Kumar Kartikeya Dwivedi
2022-08-27 23:03                           ` Andrii Nakryiko
2022-08-27 23:47                             ` Kumar Kartikeya Dwivedi
2022-08-22 23:56 ` [PATCH bpf-next v4 2/3] bpf: Add xdp dynptrs Joanne Koong
2022-08-23  2:30   ` Kumar Kartikeya Dwivedi
2022-08-23 22:26     ` Joanne Koong
2022-08-24 10:39       ` Toke Høiland-Jørgensen
2022-08-24 18:10         ` Joanne Koong
2022-08-24 23:04           ` Kumar Kartikeya Dwivedi
2022-08-25 20:14             ` Joanne Koong
2022-08-25 21:53             ` Andrii Nakryiko
2022-08-26  6:37             ` Martin KaFai Lau
2022-08-26  6:50               ` Martin KaFai Lau
2022-08-26 19:09               ` Kumar Kartikeya Dwivedi
2022-08-26 20:47                 ` Joanne Koong
2022-08-24 21:10       ` Kumar Kartikeya Dwivedi
2022-08-25 20:39         ` Joanne Koong
2022-08-25 23:18           ` Kumar Kartikeya Dwivedi
2022-08-26 18:23             ` Joanne Koong
2022-08-26 18:31               ` Kumar Kartikeya Dwivedi
2022-08-24  1:15   ` kernel test robot
2022-08-22 23:56 ` [PATCH bpf-next v4 3/3] selftests/bpf: tests for using dynptrs to parse skb and xdp buffers Joanne Koong
2022-08-24 18:47   ` Andrii Nakryiko
2022-08-23  2:31 ` [PATCH bpf-next v4 0/3] Add skb + xdp dynptrs Kumar Kartikeya Dwivedi
2022-08-23 18:52   ` Joanne Koong
2022-08-24 18:01     ` Andrii Nakryiko
2022-08-24 23:18       ` Kumar Kartikeya Dwivedi

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=202208240751.BRPS1SoF-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=joannelkoong@gmail.com \
    --cc=kafai@fb.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).