bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Brendan Jackman <jackmanb@google.com>, bpf@vger.kernel.org
Cc: kbuild-all@lists.01.org, "Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii.nakryiko@gmail.com>,
	"KP Singh" <kpsingh@chromium.org>,
	"Florent Revest" <revest@chromium.org>,
	linux-kernel@vger.kernel.org,
	"Björn Töpel" <bjorn.topel@gmail.com>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"Yonghong Song" <yhs@fb.com>
Subject: Re: [PATCH bpf-next v6 04/11] bpf: Rename BPF_XADD and prepare to encode other atomics in .imm
Date: Wed, 13 Jan 2021 10:20:39 +0800	[thread overview]
Message-ID: <202101131009.9GjNyxSw-lkp@intel.com> (raw)
In-Reply-To: <20210112154235.2192781-5-jackmanb@google.com>

[-- Attachment #1: Type: text/plain, Size: 3113 bytes --]

Hi Brendan,

I love your patch! Yet something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Brendan-Jackman/bpf-x86-Factor-out-emission-of-ModR-M-for-reg-off/20210113-004228
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: riscv-randconfig-p001-20210112 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.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/29323517f0749d2ec9d023d97443d8d18e2e916b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Brendan-Jackman/bpf-x86-Factor-out-emission-of-ModR-M-for-reg-off/20210113-004228
        git checkout 29323517f0749d2ec9d023d97443d8d18e2e916b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv 

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

All errors (new ones prefixed by >>):

   arch/riscv/net/bpf_jit_comp32.c: In function 'emit_store_r64':
>> arch/riscv/net/bpf_jit_comp32.c:884:46: error: 'imm' undeclared (first use in this function)
     884 |  if (mode == BPF_ATOMIC && (size != BPF_W || imm != BPF_ADD))
         |                                              ^~~
   arch/riscv/net/bpf_jit_comp32.c:884:46: note: each undeclared identifier is reported only once for each function it appears in


vim +/imm +884 arch/riscv/net/bpf_jit_comp32.c

   874	
   875	static int emit_store_r64(const s8 *dst, const s8 *src, s16 off,
   876				  struct rv_jit_context *ctx, const u8 size,
   877				  const u8 mode)
   878	{
   879		const s8 *tmp1 = bpf2rv32[TMP_REG_1];
   880		const s8 *tmp2 = bpf2rv32[TMP_REG_2];
   881		const s8 *rd = bpf_get_reg64(dst, tmp1, ctx);
   882		const s8 *rs = bpf_get_reg64(src, tmp2, ctx);
   883	
 > 884		if (mode == BPF_ATOMIC && (size != BPF_W || imm != BPF_ADD))
   885			return -1;
   886	
   887		emit_imm(RV_REG_T0, off, ctx);
   888		emit(rv_add(RV_REG_T0, RV_REG_T0, lo(rd)), ctx);
   889	
   890		switch (size) {
   891		case BPF_B:
   892			emit(rv_sb(RV_REG_T0, 0, lo(rs)), ctx);
   893			break;
   894		case BPF_H:
   895			emit(rv_sh(RV_REG_T0, 0, lo(rs)), ctx);
   896			break;
   897		case BPF_W:
   898			switch (mode) {
   899			case BPF_MEM:
   900				emit(rv_sw(RV_REG_T0, 0, lo(rs)), ctx);
   901				break;
   902			case BPF_ATOMIC: /* .imm checked above - only BPF_ADD allowed */
   903				emit(rv_amoadd_w(RV_REG_ZERO, lo(rs), RV_REG_T0, 0, 0),
   904				     ctx);
   905				break;
   906			}
   907			break;
   908		case BPF_DW:
   909			emit(rv_sw(RV_REG_T0, 0, lo(rs)), ctx);
   910			emit(rv_sw(RV_REG_T0, 4, hi(rs)), ctx);
   911			break;
   912		}
   913	
   914		return 0;
   915	}
   916	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24709 bytes --]

  reply	other threads:[~2021-01-13  2:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 15:42 [PATCH bpf-next v6 00/11] Atomics for eBPF Brendan Jackman
2021-01-12 15:42 ` [PATCH bpf-next v6 01/11] bpf: x86: Factor out emission of ModR/M for *(reg + off) Brendan Jackman
2021-01-12 15:42 ` [PATCH bpf-next v6 02/11] bpf: x86: Factor out emission of REX byte Brendan Jackman
2021-01-12 15:42 ` [PATCH bpf-next v6 03/11] bpf: x86: Factor out a lookup table for some ALU opcodes Brendan Jackman
2021-01-12 15:42 ` [PATCH bpf-next v6 04/11] bpf: Rename BPF_XADD and prepare to encode other atomics in .imm Brendan Jackman
2021-01-13  2:20   ` kernel test robot [this message]
2021-01-12 15:42 ` [PATCH bpf-next v6 05/11] bpf: Move BPF_STX reserved field check into BPF_STX verifier code Brendan Jackman
2021-01-12 15:42 ` [PATCH bpf-next v6 06/11] bpf: Add BPF_FETCH field / create atomic_fetch_add instruction Brendan Jackman
2021-01-12 15:42 ` [PATCH bpf-next v6 07/11] bpf: Add instructions for atomic_[cmp]xchg Brendan Jackman
2021-01-12 15:42 ` [PATCH bpf-next v6 08/11] bpf: Pull out a macro for interpreting atomic ALU operations Brendan Jackman
2021-01-12 15:42 ` [PATCH bpf-next v6 09/11] bpf: Add bitwise atomic instructions Brendan Jackman
2021-01-12 15:42 ` [PATCH bpf-next v6 10/11] bpf: Add tests for new BPF atomic operations Brendan Jackman
2021-01-12 15:42 ` [PATCH bpf-next v6 11/11] bpf: Document new atomic instructions Brendan Jackman
2021-01-14  3:22 ` [PATCH bpf-next v6 00/11] Atomics for eBPF Alexei Starovoitov
2021-01-14  8:09 ` John Fastabend

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=202101131009.9GjNyxSw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jackmanb@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kpsingh@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=revest@chromium.org \
    --cc=yhs@fb.com \
    /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).