From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 14/14] bpf/tests: add tail call test suite
Date: Mon, 26 Jul 2021 19:07:12 +0800 [thread overview]
Message-ID: <202107261911.FXMR9HK7-lkp@intel.com> (raw)
In-Reply-To: <20210726081738.1833704-15-johan.almbladh@anyfinetworks.com>
[-- Attachment #1: Type: text/plain, Size: 4673 bytes --]
Hi Johan,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master net/master ipvs/master net-next/master v5.14-rc3 next-20210723]
[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/0day-ci/linux/commits/Johan-Almbladh/bpf-tests-Extend-the-eBPF-test-suite/20210726-162045
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 10.3.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/0day-ci/linux/commit/d33abdcea7dcc6b04b87076326e76adf0655f617
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Johan-Almbladh/bpf-tests-Extend-the-eBPF-test-suite/20210726-162045
git checkout d33abdcea7dcc6b04b87076326e76adf0655f617
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=s390
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 >>):
lib/test_bpf.c: In function 'prepare_tail_call_tests':
>> lib/test_bpf.c:9146:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
9146 | insn[0].imm = (u32)progs;
| ^
vim +9146 lib/test_bpf.c
9095
9096 static __init int prepare_tail_call_tests(struct bpf_array **pprogs)
9097 {
9098 struct bpf_array *progs;
9099 int ntests = ARRAY_SIZE(tail_call_tests);
9100 int which, err;
9101
9102 /* Allocate the table of programs to be used for tall calls */
9103 progs = kzalloc(sizeof(*progs) + (ntests + 1) * sizeof(progs->ptrs[0]),
9104 GFP_KERNEL);
9105 if (!progs)
9106 goto out_nomem;
9107
9108 /* Create all eBPF programs and populate the table */
9109 for (which = 0; which < ntests; which++) {
9110 struct tail_call_test *test = &tail_call_tests[which];
9111 struct bpf_prog *fp;
9112 int err, len, i;
9113
9114 /* Compute the number of program instructions */
9115 for (len = 0; len < MAX_INSNS; len++) {
9116 struct bpf_insn *insn = &test->insns[len];
9117
9118 if (len < MAX_INSNS - 1 &&
9119 insn->code == (BPF_LD | BPF_DW | BPF_IMM))
9120 len++;
9121 if (insn->code == 0)
9122 break;
9123 }
9124
9125 /* Allocate and initialize the program */
9126 fp = bpf_prog_alloc(bpf_prog_size(len), 0);
9127 if (!fp)
9128 goto out_nomem;
9129
9130 fp->len = len;
9131 fp->type = BPF_PROG_TYPE_SOCKET_FILTER;
9132 fp->aux->stack_depth = test->stack_depth;
9133 memcpy(fp->insnsi, test->insns, len * sizeof(struct bpf_insn));
9134
9135 /* Relocate runtime tail call offsets and addresses */
9136 for (i = 0; i < len; i++) {
9137 struct bpf_insn *insn = &fp->insnsi[i];
9138 int target;
9139
9140 if (insn->imm != TAIL_CALL_MARKER)
9141 continue;
9142
9143 switch (insn->code) {
9144 case BPF_LD | BPF_DW | BPF_IMM:
9145 if (insn->dst_reg == R2) {
> 9146 insn[0].imm = (u32)progs;
9147 insn[1].imm = ((u64)(long)progs) >> 32;
9148 }
9149 break;
9150
9151 case BPF_ALU | BPF_MOV | BPF_K:
9152 case BPF_ALU64 | BPF_MOV | BPF_K:
9153 if (insn->off == TAIL_CALL_NULL)
9154 target = ntests;
9155 else
9156 target = which + insn->off;
9157 if (insn->dst_reg == R3)
9158 insn->imm = target;
9159 break;
9160 }
9161 }
9162
9163 fp = bpf_prog_select_runtime(fp, &err);
9164 if (err)
9165 goto out_err;
9166
9167 progs->ptrs[which] = fp;
9168 }
9169
9170 /* The last entry contains a NULL program pointer */
9171 progs->map.max_entries = ntests + 1;
9172 *pprogs = progs;
9173 return 0;
9174
9175 out_nomem:
9176 err = -ENOMEM;
9177
9178 out_err:
9179 if (progs)
9180 destroy_tail_call_tests(progs);
9181 return err;
9182 }
9183
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 66778 bytes --]
next prev parent reply other threads:[~2021-07-26 11:07 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 8:17 [RFC PATCH 00/14] bpf/tests: Extend the eBPF test suite Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 01/14] bpf/tests: add BPF_JMP32 test cases Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 02/14] bpf/tests: add BPF_MOV tests for zero and sign extension Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 03/14] bpf/tests: fix typos in test case descriptions Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 04/14] bpf/tests: add more tests of ALU32 and ALU64 bitwise operations Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 05/14] bpf/tests: add more ALU32 tests for BPF_LSH/RSH/ARSH Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 06/14] bpf/tests: add more BPF_LSH/RSH/ARSH tests for ALU64 Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 07/14] bpf/tests: add more ALU64 BPF_MUL tests Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 08/14] bpf/tests: add tests for ALU operations implemented with function calls Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 09/14] bpf/tests: add word-order tests for load/store of double words Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 10/14] bpf/tests: add branch conversion JIT test Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 11/14] bpf/tests: add test for 32-bit context pointer argument passing Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 12/14] bpf/tests: add tests for atomic operations Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 13/14] bpf/tests: add tests for BPF_CMPXCHG Johan Almbladh
2021-07-26 8:17 ` [RFC PATCH 14/14] bpf/tests: add tail call test suite Johan Almbladh
2021-07-26 11:07 ` kernel test robot [this message]
2021-07-26 21:33 ` kernel test robot
2021-07-26 22:53 ` [RFC PATCH 00/14] bpf/tests: Extend the eBPF " Andrii Nakryiko
2021-07-28 8:27 ` Daniel Borkmann
2021-07-28 12:15 ` Johan Almbladh
2021-07-28 16:47 ` [PATCH] bpf: Fix off-by-one in tail call count limiting Johan Almbladh
2021-07-28 19:13 ` Yonghong Song
2021-07-29 21:37 ` Johan Almbladh
2021-07-29 22:29 ` Andrii Nakryiko
2021-07-29 22:48 ` Andrii Nakryiko
2021-08-01 8:37 ` Johan Almbladh
2021-08-02 20:28 ` Andrii Nakryiko
2021-08-05 14:37 ` Johan Almbladh
2021-08-05 22:54 ` Andrii Nakryiko
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=202107261911.FXMR9HK7-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.