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>,
Yonghong Song <yhs@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>,
KP Singh <kpsingh@chromium.org>,
Florent Revest <revest@chromium.org>,
Brendan Jackman <jackmanb@google.com>
Subject: Re: [PATCH 5/7] bpf: Add BPF_FETCH field / create atomic_fetch_add instruction
Date: Tue, 24 Nov 2020 05:51:52 +0800 [thread overview]
Message-ID: <202011240512.g0AQTfT8-lkp@intel.com> (raw)
In-Reply-To: <20201123173202.1335708-6-jackmanb@google.com>
[-- Attachment #1: Type: text/plain, Size: 6707 bytes --]
Hi Brendan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master powerpc/next linus/master v5.10-rc5 next-20201123]
[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/Brendan-Jackman/Atomics-for-eBPF/20201124-013549
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: m68k-randconfig-r005-20201123 (attached as .config)
compiler: m68k-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/b2b5923320904ef8c33183e8e88042588eb99397
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Brendan-Jackman/Atomics-for-eBPF/20201124-013549
git checkout b2b5923320904ef8c33183e8e88042588eb99397
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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 >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from arch/m68k/include/asm/irqflags.h:6,
from include/linux/irqflags.h:16,
from arch/m68k/include/asm/atomic.h:6,
from include/linux/atomic.h:7,
from include/linux/filter.h:10,
from kernel/bpf/core.c:21:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
kernel/bpf/core.c: At top level:
kernel/bpf/core.c:1358:12: warning: no previous prototype for 'bpf_probe_read_kernel' [-Wmissing-prototypes]
1358 | u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from kernel/bpf/core.c:21:
kernel/bpf/core.c: In function '___bpf_prog_run':
include/linux/filter.h:899:3: warning: cast between incompatible function types from 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, const struct bpf_insn *)'} [-Wcast-function-type]
899 | ((u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)) \
| ^
kernel/bpf/core.c:1526:13: note: in expansion of macro '__bpf_call_base_args'
1526 | BPF_R0 = (__bpf_call_base_args + insn->imm)(BPF_R1, BPF_R2,
| ^~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/core.c:1656:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1656 | (atomic64_t *)(s64) (DST + insn->off));
| ^
In file included from kernel/bpf/core.c:21:
kernel/bpf/core.c: In function 'bpf_patch_call_args':
include/linux/filter.h:899:3: warning: cast between incompatible function types from 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, const struct bpf_insn *)'} [-Wcast-function-type]
899 | ((u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)) \
| ^
kernel/bpf/core.c:1743:3: note: in expansion of macro '__bpf_call_base_args'
1743 | __bpf_call_base_args;
| ^~~~~~~~~~~~~~~~~~~~
vim +1656 kernel/bpf/core.c
1628
1629 STX_ATOMIC_W:
1630 switch (IMM) {
1631 case BPF_ADD:
1632 /* lock xadd *(u32 *)(dst_reg + off16) += src_reg */
1633 atomic_add((u32) SRC, (atomic_t *)(unsigned long)
1634 (DST + insn->off));
1635 break;
1636 case BPF_ADD | BPF_FETCH:
1637 SRC = (u32) atomic_fetch_add(
1638 (u32) SRC,
1639 (atomic_t *)(unsigned long) (DST + insn->off));
1640 break;
1641 default:
1642 goto default_label;
1643 }
1644 CONT;
1645
1646 STX_ATOMIC_DW:
1647 switch (IMM) {
1648 case BPF_ADD:
1649 /* lock xadd *(u64 *)(dst_reg + off16) += src_reg */
1650 atomic64_add((u64) SRC, (atomic64_t *)(unsigned long)
1651 (DST + insn->off));
1652 break;
1653 case BPF_ADD | BPF_FETCH:
1654 SRC = (u64) atomic64_fetch_add(
1655 (u64) SRC,
> 1656 (atomic64_t *)(s64) (DST + insn->off));
1657 break;
1658 default:
1659 goto default_label;
1660 }
1661 CONT;
1662
1663 default_label:
1664 /* If we ever reach this, we have a bug somewhere. Die hard here
1665 * instead of just returning 0; we could be somewhere in a subprog,
1666 * so execution could continue otherwise which we do /not/ want.
1667 *
1668 * Note, verifier whitelists all opcodes in bpf_opcode_in_insntable().
1669 */
1670 pr_warn("BPF interpreter: unknown opcode %02x (imm: 0x%x)\n",
1671 insn->code, insn->imm);
1672 BUG_ON(1);
1673 return 0;
1674 }
1675
---
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: 21919 bytes --]
next prev parent reply other threads:[~2020-11-23 21:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 17:31 [PATCH 0/7] Atomics for eBPF Brendan Jackman
2020-11-23 17:31 ` [PATCH 1/7] bpf: Factor out emission of ModR/M for *(reg + off) Brendan Jackman
2020-11-23 17:31 ` [PATCH 2/7] bpf: x86: Factor out emission of REX byte Brendan Jackman
2020-11-23 17:31 ` [PATCH 3/7] bpf: Rename BPF_XADD and prepare to encode other atomics in .imm Brendan Jackman
2020-11-23 23:54 ` Yonghong Song
2020-11-24 11:02 ` Brendan Jackman
2020-11-24 16:04 ` Yonghong Song
2020-11-24 3:28 ` kernel test robot
2020-11-24 6:50 ` Alexei Starovoitov
2020-11-24 11:21 ` Brendan Jackman
2020-11-24 22:43 ` Alexei Starovoitov
2020-11-23 17:31 ` [PATCH 4/7] bpf: Move BPF_STX reserved field check into BPF_STX verifier code Brendan Jackman
2020-11-23 17:32 ` [PATCH 5/7] bpf: Add BPF_FETCH field / create atomic_fetch_add instruction Brendan Jackman
2020-11-23 21:12 ` kernel test robot
2020-11-23 21:51 ` kernel test robot [this message]
2020-11-24 6:52 ` Alexei Starovoitov
2020-11-24 10:48 ` Brendan Jackman
2020-11-23 17:32 ` [PATCH 6/7] bpf: Add instructions for atomic_cmpxchg and friends Brendan Jackman
2020-11-23 19:29 ` Brendan Jackman
2020-11-24 6:40 ` Alexei Starovoitov
2020-11-24 10:55 ` Brendan Jackman
2020-11-24 22:51 ` Alexei Starovoitov
2020-11-23 17:32 ` [PATCH 7/7] bpf: Add tests for new BPF atomic operations Brendan Jackman
2020-11-24 0:26 ` Yonghong Song
2020-11-24 13:10 ` Brendan Jackman
2020-11-23 17:36 ` [PATCH 0/7] Atomics for eBPF Brendan Jackman
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=202011240512.g0AQTfT8-lkp@intel.com \
--to=lkp@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jackmanb@google.com \
--cc=kbuild-all@lists.01.org \
--cc=kpsingh@chromium.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).