All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Andrii Nakryiko <andriin@fb.com>,
	bpf@vger.kernel.org, netdev@vger.kernel.org, ast@fb.com,
	daniel@iogearbox.net
Cc: kbuild-all@lists.01.org, andrii.nakryiko@gmail.com,
	kernel-team@fb.com, Andrii Nakryiko <andriin@fb.com>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	Jonathan Lemon <jonathan.lemon@gmail.com>
Subject: Re: [PATCH bpf-next 1/6] bpf: implement BPF ring buffer and verifier support for it
Date: Thu, 14 May 2020 04:57:54 +0800	[thread overview]
Message-ID: <202005140436.oNdRz1xB%lkp@intel.com> (raw)
In-Reply-To: <20200513192532.4058934-2-andriin@fb.com>

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

Hi Andrii,

I love your patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]
[also build test ERROR on next-20200512]
[cannot apply to bpf/master rcu/dev v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Andrii-Nakryiko/BPF-ring-buffer/20200514-032857
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=sh 

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

All error/warnings (new ones prefixed by >>):

In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/workqueue.h:9,
from include/linux/bpf.h:9,
from kernel/bpf/ringbuf.c:1:
kernel/bpf/ringbuf.c: In function 'bpf_ringbuf_commit':
>> include/linux/compiler.h:350:38: error: call to '__compiletime_assert_134' declared with attribute error: Need native word sized stores/loads for atomicity.
350 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
|                                      ^
include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
331 |    prefix ## suffix();             |    ^~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
|  ^~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:353:2: note: in expansion of macro 'compiletime_assert'
353 |  compiletime_assert(__native_word(t),             |  ^~~~~~~~~~~~~~~~~~
include/asm-generic/barrier.h:187:2: note: in expansion of macro 'compiletime_assert_atomic_type'
187 |  compiletime_assert_atomic_type(*p);             |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/ringbuf.c:354:13: note: in expansion of macro 'smp_load_acquire'
354 |  cons_pos = smp_load_acquire(&rb->consumer_pos) & rb->mask;
|             ^~~~~~~~~~~~~~~~

vim +/smp_load_acquire +354 kernel/bpf/ringbuf.c

   332	
   333	static void bpf_ringbuf_commit(void *sample, bool discard)
   334	{
   335		unsigned long rec_pos, cons_pos;
   336		u32 new_meta, old_meta;
   337		void *meta_ptr;
   338		struct bpf_ringbuf *rb;
   339	
   340		meta_ptr = sample - RINGBUF_META_SZ;
   341		rb = bpf_ringbuf_restore_from_rec(meta_ptr);
   342		old_meta = *(u32 *)meta_ptr;
   343		new_meta = old_meta ^ RINGBUF_BUSY_BIT;
   344		if (discard)
   345			new_meta |= RINGBUF_DISCARD_BIT;
   346	
   347		/* update metadata header with correct final size prefix */
   348		xchg((u32 *)meta_ptr, new_meta);
   349	
   350		/* if consumer caught up and is waiting for our record, notify about
   351		 * new data availability
   352		 */
   353		rec_pos = (void *)meta_ptr - (void *)rb->data;
 > 354		cons_pos = smp_load_acquire(&rb->consumer_pos) & rb->mask;
   355		if (cons_pos == rec_pos)
   356			wake_up_all(&rb->waitq);
   357	}
   358	

---
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: 54706 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH bpf-next 1/6] bpf: implement BPF ring buffer and verifier support for it
Date: Thu, 14 May 2020 04:57:54 +0800	[thread overview]
Message-ID: <202005140436.oNdRz1xB%lkp@intel.com> (raw)
In-Reply-To: <20200513192532.4058934-2-andriin@fb.com>

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

Hi Andrii,

I love your patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]
[also build test ERROR on next-20200512]
[cannot apply to bpf/master rcu/dev v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Andrii-Nakryiko/BPF-ring-buffer/20200514-032857
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=sh 

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

All error/warnings (new ones prefixed by >>):

In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/workqueue.h:9,
from include/linux/bpf.h:9,
from kernel/bpf/ringbuf.c:1:
kernel/bpf/ringbuf.c: In function 'bpf_ringbuf_commit':
>> include/linux/compiler.h:350:38: error: call to '__compiletime_assert_134' declared with attribute error: Need native word sized stores/loads for atomicity.
350 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
|                                      ^
include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
331 |    prefix ## suffix();             |    ^~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
|  ^~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:353:2: note: in expansion of macro 'compiletime_assert'
353 |  compiletime_assert(__native_word(t),             |  ^~~~~~~~~~~~~~~~~~
include/asm-generic/barrier.h:187:2: note: in expansion of macro 'compiletime_assert_atomic_type'
187 |  compiletime_assert_atomic_type(*p);             |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/ringbuf.c:354:13: note: in expansion of macro 'smp_load_acquire'
354 |  cons_pos = smp_load_acquire(&rb->consumer_pos) & rb->mask;
|             ^~~~~~~~~~~~~~~~

vim +/smp_load_acquire +354 kernel/bpf/ringbuf.c

   332	
   333	static void bpf_ringbuf_commit(void *sample, bool discard)
   334	{
   335		unsigned long rec_pos, cons_pos;
   336		u32 new_meta, old_meta;
   337		void *meta_ptr;
   338		struct bpf_ringbuf *rb;
   339	
   340		meta_ptr = sample - RINGBUF_META_SZ;
   341		rb = bpf_ringbuf_restore_from_rec(meta_ptr);
   342		old_meta = *(u32 *)meta_ptr;
   343		new_meta = old_meta ^ RINGBUF_BUSY_BIT;
   344		if (discard)
   345			new_meta |= RINGBUF_DISCARD_BIT;
   346	
   347		/* update metadata header with correct final size prefix */
   348		xchg((u32 *)meta_ptr, new_meta);
   349	
   350		/* if consumer caught up and is waiting for our record, notify about
   351		 * new data availability
   352		 */
   353		rec_pos = (void *)meta_ptr - (void *)rb->data;
 > 354		cons_pos = smp_load_acquire(&rb->consumer_pos) & rb->mask;
   355		if (cons_pos == rec_pos)
   356			wake_up_all(&rb->waitq);
   357	}
   358	

---
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: 54706 bytes --]

  reply	other threads:[~2020-05-13 20:59 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 19:25 [PATCH bpf-next 0/6] BPF ring buffer Andrii Nakryiko
2020-05-13 19:25 ` [PATCH bpf-next 1/6] bpf: implement BPF ring buffer and verifier support for it Andrii Nakryiko
2020-05-13 20:57   ` kbuild test robot [this message]
2020-05-13 20:57     ` kbuild test robot
2020-05-13 21:58   ` Alan Maguire
2020-05-14  5:59     ` Andrii Nakryiko
2020-05-14 22:25       ` Alan Maguire
2020-05-13 22:16   ` kbuild test robot
2020-05-13 22:16     ` kbuild test robot
2020-05-14 16:50   ` Jonathan Lemon
2020-05-14 20:11     ` Andrii Nakryiko
2020-05-14 17:33   ` sdf
2020-05-14 20:18     ` Andrii Nakryiko
2020-05-14 20:53       ` sdf
2020-05-14 21:13         ` Andrii Nakryiko
2020-05-14 21:56           ` Stanislav Fomichev
2020-05-14 19:06   ` Alexei Starovoitov
2020-05-14 20:49     ` Andrii Nakryiko
2020-05-14 19:18   ` Jakub Kicinski
2020-05-14 19:18     ` Jakub Kicinski
2020-05-14 20:39     ` Thomas Gleixner
2020-05-14 21:30       ` Andrii Nakryiko
2020-05-14 22:13         ` Paul E. McKenney
2020-05-14 22:56         ` Alexei Starovoitov
2020-05-14 23:06           ` Andrii Nakryiko
2020-05-13 19:25 ` [PATCH bpf-next 2/6] tools/memory-model: add BPF ringbuf MPSC litmus tests Andrii Nakryiko
2020-05-13 19:25 ` [PATCH bpf-next 3/6] bpf: track reference type in verifier Andrii Nakryiko
2020-05-13 19:25 ` [PATCH bpf-next 4/6] libbpf: add BPF ring buffer support Andrii Nakryiko
2020-05-13 19:25 ` [PATCH bpf-next 5/6] selftests/bpf: add BPF ringbuf selftests Andrii Nakryiko
2020-05-13 19:25 ` [PATCH bpf-next 6/6] bpf: add BPF ringbuf and perf buffer benchmarks Andrii Nakryiko
2020-05-13 22:49 ` [PATCH bpf-next 0/6] BPF ring buffer Jonathan Lemon
2020-05-14  6:08   ` Andrii Nakryiko
2020-05-14 16:30     ` Jonathan Lemon
2020-05-14 20:06       ` 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=202005140436.oNdRz1xB%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jonathan.lemon@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@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 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.