From: kbuild test robot <lkp@intel.com>
To: Martin KaFai Lau <kafai@fb.com>
Cc: kbuild-all@01.org, bpf@vger.kernel.org, netdev@vger.kernel.org,
Alexei Starovoitov <ast@fb.com>, Andrii Nakryiko <andriin@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
kernel-team@fb.com, Yonghong Song <yhs@fb.com>
Subject: Re: [PATCH v2 bpf-next 1/6] bpf: Introduce bpf sk local storage
Date: Fri, 26 Apr 2019 22:09:42 +0800 [thread overview]
Message-ID: <201904262228.mgpruSBE%lkp@intel.com> (raw)
In-Reply-To: <20190426001043.851430-1-kafai@fb.com>
[-- Attachment #1: Type: text/plain, Size: 14565 bytes --]
Hi Martin,
I love your patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Martin-KaFai-Lau/bpf-Introduce-bpf-sk-local-storage/20190426-192951
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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
GCC_VERSION=7.2.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/arm64/include/asm/spinlock_types.h:23:0,
from include/linux/spinlock_types.h:13,
from net//core/bpf_sk_storage.c:3:
>> include/asm-generic/qspinlock_types.h:33:3: error: unknown type name 'atomic_t'
atomic_t val;
^~~~~~~~
>> include/asm-generic/qspinlock_types.h:51:4: error: unknown type name 'u16'
u16 tail;
^~~
include/asm-generic/qspinlock_types.h:52:4: error: unknown type name 'u16'
u16 locked_pending;
^~~
>> include/asm-generic/qspinlock_types.h:55:4: error: unknown type name 'u8'
u8 reserved[2];
^~
include/asm-generic/qspinlock_types.h:56:4: error: unknown type name 'u8'
u8 pending;
^~
include/asm-generic/qspinlock_types.h:57:4: error: unknown type name 'u8'
u8 locked;
^~
In file included from ./arch/arm64/include/generated/asm/qspinlock.h:1:0,
from arch/arm64/include/asm/spinlock.h:20,
from include/linux/spinlock.h:88,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/workqueue.h:9,
from include/linux/bpf.h:12,
from net//core/bpf_sk_storage.c:8:
include/asm-generic/qspinlock.h: In function 'queued_spin_is_locked':
>> include/asm-generic/qspinlock.h:35:21: error: passing argument 1 of 'atomic_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
return atomic_read(&lock->val);
^
In file included from arch/arm64/include/asm/atomic.h:169:0,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/atomic.h:5,
from arch/arm64/include/asm/bitops.h:37,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/lockdep.h:27,
from include/linux/spinlock_types.h:18,
from net//core/bpf_sk_storage.c:3:
include/asm-generic/atomic-instrumented.h:24:1: note: expected 'const atomic_t * {aka const struct <anonymous> *}' but argument is of type 'int *'
atomic_read(const atomic_t *v)
^~~~~~~~~~~
In file included from ./arch/arm64/include/generated/asm/qspinlock.h:1:0,
from arch/arm64/include/asm/spinlock.h:20,
from include/linux/spinlock.h:88,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/workqueue.h:9,
from include/linux/bpf.h:12,
from net//core/bpf_sk_storage.c:8:
include/asm-generic/qspinlock.h: In function 'queued_spin_value_unlocked':
include/asm-generic/qspinlock.h:50:22: error: passing argument 1 of 'atomic_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
return !atomic_read(&lock.val);
^
In file included from arch/arm64/include/asm/atomic.h:169:0,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/atomic.h:5,
from arch/arm64/include/asm/bitops.h:37,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/lockdep.h:27,
from include/linux/spinlock_types.h:18,
from net//core/bpf_sk_storage.c:3:
include/asm-generic/atomic-instrumented.h:24:1: note: expected 'const atomic_t * {aka const struct <anonymous> *}' but argument is of type 'int *'
atomic_read(const atomic_t *v)
^~~~~~~~~~~
In file included from ./arch/arm64/include/generated/asm/qspinlock.h:1:0,
from arch/arm64/include/asm/spinlock.h:20,
from include/linux/spinlock.h:88,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/workqueue.h:9,
from include/linux/bpf.h:12,
from net//core/bpf_sk_storage.c:8:
include/asm-generic/qspinlock.h: In function 'queued_spin_is_contended':
include/asm-generic/qspinlock.h:60:21: error: passing argument 1 of 'atomic_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
return atomic_read(&lock->val) & ~_Q_LOCKED_MASK;
^
In file included from arch/arm64/include/asm/atomic.h:169:0,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/atomic.h:5,
from arch/arm64/include/asm/bitops.h:37,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/lockdep.h:27,
from include/linux/spinlock_types.h:18,
from net//core/bpf_sk_storage.c:3:
include/asm-generic/atomic-instrumented.h:24:1: note: expected 'const atomic_t * {aka const struct <anonymous> *}' but argument is of type 'int *'
atomic_read(const atomic_t *v)
^~~~~~~~~~~
In file included from ./arch/arm64/include/generated/asm/qspinlock.h:1:0,
from arch/arm64/include/asm/spinlock.h:20,
from include/linux/spinlock.h:88,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/workqueue.h:9,
from include/linux/bpf.h:12,
from net//core/bpf_sk_storage.c:8:
include/asm-generic/qspinlock.h: In function 'queued_spin_trylock':
include/asm-generic/qspinlock.h:69:24: error: passing argument 1 of 'atomic_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
u32 val = atomic_read(&lock->val);
^
In file included from arch/arm64/include/asm/atomic.h:169:0,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/atomic.h:5,
from arch/arm64/include/asm/bitops.h:37,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/lockdep.h:27,
from include/linux/spinlock_types.h:18,
from net//core/bpf_sk_storage.c:3:
include/asm-generic/atomic-instrumented.h:24:1: note: expected 'const atomic_t * {aka const struct <anonymous> *}' but argument is of type 'int *'
atomic_read(const atomic_t *v)
^~~~~~~~~~~
In file included from include/uapi/linux/swab.h:6:0,
from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/arm64/include/uapi/asm/byteorder.h:21,
from include/asm-generic/qrwlock_types.h:6,
from arch/arm64/include/asm/spinlock_types.h:24,
from include/linux/spinlock_types.h:13,
from net//core/bpf_sk_storage.c:3:
>> include/asm-generic/qspinlock.h:74:43: error: passing argument 1 of 'atomic_try_cmpxchg_acquire' from incompatible pointer type [-Werror=incompatible-pointer-types]
return likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL));
^
include/linux/compiler.h:76:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
In file included from include/linux/atomic.h:74:0,
from include/asm-generic/bitops/atomic.h:5,
from arch/arm64/include/asm/bitops.h:37,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/lockdep.h:27,
from include/linux/spinlock_types.h:18,
from net//core/bpf_sk_storage.c:3:
include/linux/atomic-fallback.h:928:1: note: expected 'atomic_t * {aka struct <anonymous> *}' but argument is of type 'int *'
atomic_try_cmpxchg_acquire(atomic_t *v, int *old, int new)
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/uapi/linux/swab.h:6:0,
from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/arm64/include/uapi/asm/byteorder.h:21,
from include/asm-generic/qrwlock_types.h:6,
from arch/arm64/include/asm/spinlock_types.h:24,
from include/linux/spinlock_types.h:13,
from net//core/bpf_sk_storage.c:3:
include/asm-generic/qspinlock.h: In function 'queued_spin_lock':
include/asm-generic/qspinlock.h:87:40: error: passing argument 1 of 'atomic_try_cmpxchg_acquire' from incompatible pointer type [-Werror=incompatible-pointer-types]
if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)))
^
include/linux/compiler.h:76:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
In file included from include/linux/atomic.h:74:0,
from include/asm-generic/bitops/atomic.h:5,
from arch/arm64/include/asm/bitops.h:37,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/lockdep.h:27,
from include/linux/spinlock_types.h:18,
from net//core/bpf_sk_storage.c:3:
include/linux/atomic-fallback.h:928:1: note: expected 'atomic_t * {aka struct <anonymous> *}' but argument is of type 'int *'
atomic_try_cmpxchg_acquire(atomic_t *v, int *old, int new)
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/fs.h:25:0,
from include/linux/compat.h:17,
from include/linux/ethtool.h:17,
from include/linux/netdevice.h:41,
from include/net/sock.h:51,
from net//core/bpf_sk_storage.c:10:
include/linux/semaphore.h: In function 'sema_init':
>> include/linux/semaphore.h:35:17: warning: braces around scalar initializer
*sem = (struct semaphore) __SEMAPHORE_INITIALIZER(*sem, val);
^~~~~~~~~
include/linux/semaphore.h:35:17: note: (near initialization for '(anonymous).raw_lock.<anonymous>.val')
cc1: some warnings being treated as errors
vim +/atomic_t +33 include/asm-generic/qspinlock_types.h
a33fda35 Waiman Long 2015-04-24 30
a33fda35 Waiman Long 2015-04-24 31 typedef struct qspinlock {
625e88be Will Deacon 2018-04-26 32 union {
a33fda35 Waiman Long 2015-04-24 @33 atomic_t val;
625e88be Will Deacon 2018-04-26 34
625e88be Will Deacon 2018-04-26 35 /*
625e88be Will Deacon 2018-04-26 36 * By using the whole 2nd least significant byte for the
625e88be Will Deacon 2018-04-26 37 * pending bit, we can allow better optimization of the lock
625e88be Will Deacon 2018-04-26 38 * acquisition for the pending bit holder.
625e88be Will Deacon 2018-04-26 39 */
625e88be Will Deacon 2018-04-26 40 #ifdef __LITTLE_ENDIAN
625e88be Will Deacon 2018-04-26 41 struct {
625e88be Will Deacon 2018-04-26 42 u8 locked;
625e88be Will Deacon 2018-04-26 43 u8 pending;
625e88be Will Deacon 2018-04-26 44 };
625e88be Will Deacon 2018-04-26 45 struct {
625e88be Will Deacon 2018-04-26 46 u16 locked_pending;
625e88be Will Deacon 2018-04-26 47 u16 tail;
625e88be Will Deacon 2018-04-26 48 };
625e88be Will Deacon 2018-04-26 49 #else
625e88be Will Deacon 2018-04-26 50 struct {
625e88be Will Deacon 2018-04-26 @51 u16 tail;
625e88be Will Deacon 2018-04-26 52 u16 locked_pending;
625e88be Will Deacon 2018-04-26 53 };
625e88be Will Deacon 2018-04-26 54 struct {
625e88be Will Deacon 2018-04-26 @55 u8 reserved[2];
625e88be Will Deacon 2018-04-26 56 u8 pending;
625e88be Will Deacon 2018-04-26 57 u8 locked;
625e88be Will Deacon 2018-04-26 58 };
625e88be Will Deacon 2018-04-26 59 #endif
625e88be Will Deacon 2018-04-26 60 };
a33fda35 Waiman Long 2015-04-24 61 } arch_spinlock_t;
a33fda35 Waiman Long 2015-04-24 62
:::::: The code at line 33 was first introduced by commit
:::::: a33fda35e3a7655fb7df756ed67822afb5ed5e8d locking/qspinlock: Introduce a simple generic 4-byte queued spinlock
:::::: TO: Waiman Long <Waiman.Long@hp.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 63211 bytes --]
next prev parent reply other threads:[~2019-04-26 14:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 0:10 [PATCH v2 bpf-next 0/6] BPF sk local storage Martin KaFai Lau
2019-04-26 0:10 ` [PATCH v2 bpf-next 1/6] bpf: Introduce bpf " Martin KaFai Lau
2019-04-26 14:02 ` kbuild test robot
2019-04-26 14:09 ` kbuild test robot [this message]
2019-04-26 17:27 ` Yonghong Song
2019-04-26 18:04 ` Martin Lau
2019-04-26 18:48 ` Yonghong Song
2019-04-26 0:10 ` [PATCH v2 bpf-next 2/6] bpf: Sync bpf.h to tools Martin KaFai Lau
2019-04-26 0:10 ` [PATCH v2 bpf-next 3/6] bpf: Support BPF_MAP_TYPE_SK_STORAGE in bpf map probing Martin KaFai Lau
2019-04-26 0:10 ` [PATCH v2 bpf-next 4/6] bpf: Add verifier tests for the bpf_sk_storage Martin KaFai Lau
2019-04-26 0:10 ` [PATCH v2 bpf-next 5/6] bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps Martin KaFai Lau
2019-04-26 0:10 ` [PATCH v2 bpf-next 6/6] bpf: Add ene-to-end test for bpf_sk_storage_* helpers Martin KaFai Lau
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=201904262228.mgpruSBE%lkp@intel.com \
--to=lkp@intel.com \
--cc=andriin@fb.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kbuild-all@01.org \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.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).