From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH bpf-next 6/8] bpf: tcp: bpf iter batching and lock_sock
Date: Sat, 26 Jun 2021 13:21:49 +0800 [thread overview]
Message-ID: <202106261340.PIUEhri8-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 7767 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210625200523.726854-1-kafai@fb.com>
References: <20210625200523.726854-1-kafai@fb.com>
TO: Martin KaFai Lau <kafai@fb.com>
TO: bpf(a)vger.kernel.org
CC: Alexei Starovoitov <ast@kernel.org>
CC: Daniel Borkmann <daniel@iogearbox.net>
CC: Eric Dumazet <edumazet@google.com>
CC: kernel-team(a)fb.com
CC: Neal Cardwell <ncardwell@google.com>
CC: netdev(a)vger.kernel.org
CC: Yonghong Song <yhs@fb.com>
CC: Yuchung Cheng <ycheng@google.com>
Hi Martin,
I love your patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Martin-KaFai-Lau/bpf-Allow-bpf-tcp-iter-to-do-bpf_setsockopt/20210626-040650
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
config: x86_64-randconfig-s031-20210622 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/5f78445efda4708980f0d1cb4c59a35000205232
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Martin-KaFai-Lau/bpf-Allow-bpf-tcp-iter-to-do-bpf_setsockopt/20210626-040650
git checkout 5f78445efda4708980f0d1cb4c59a35000205232
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
net/ipv4/tcp_ipv4.c:3084:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const *data @@ got struct tcp_congestion_ops const [noderef] __rcu *tcp_congestion_control @@
net/ipv4/tcp_ipv4.c:3084:41: sparse: expected void const *data
net/ipv4/tcp_ipv4.c:3084:41: sparse: got struct tcp_congestion_ops const [noderef] __rcu *tcp_congestion_control
net/ipv4/tcp_ipv4.c:3193:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const *data @@ got struct tcp_congestion_ops const [noderef] __rcu *extern [addressable] [toplevel] tcp_congestion_control @@
net/ipv4/tcp_ipv4.c:3193:45: sparse: expected void const *data
net/ipv4/tcp_ipv4.c:3193:45: sparse: got struct tcp_congestion_ops const [noderef] __rcu *extern [addressable] [toplevel] tcp_congestion_control
net/ipv4/tcp_ipv4.c:3197:50: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tcp_congestion_ops const [noderef] __rcu *tcp_congestion_control @@ got struct tcp_congestion_ops * @@
net/ipv4/tcp_ipv4.c:3197:50: sparse: expected struct tcp_congestion_ops const [noderef] __rcu *tcp_congestion_control
net/ipv4/tcp_ipv4.c:3197:50: sparse: got struct tcp_congestion_ops *
net/ipv4/tcp_ipv4.c:1619:25: sparse: sparse: context imbalance in 'tcp_v4_syn_recv_sock' - unexpected unlock
net/ipv4/tcp_ipv4.c:1893:17: sparse: sparse: context imbalance in 'tcp_add_backlog' - unexpected unlock
net/ipv4/tcp_ipv4.c:2125:21: sparse: sparse: context imbalance in 'tcp_v4_rcv' - different lock contexts for basic block
net/ipv4/tcp_ipv4.c:2294:13: sparse: sparse: context imbalance in 'listening_get_first' - wrong count at exit
net/ipv4/tcp_ipv4.c:2342:9: sparse: sparse: context imbalance in 'listening_get_next' - unexpected unlock
net/ipv4/tcp_ipv4.c:2373:13: sparse: sparse: context imbalance in 'established_get_first' - wrong count at exit
net/ipv4/tcp_ipv4.c:2414:40: sparse: sparse: context imbalance in 'established_get_next' - unexpected unlock
net/ipv4/tcp_ipv4.c:2545:36: sparse: sparse: context imbalance in 'tcp_seq_stop' - unexpected unlock
net/ipv4/tcp_ipv4.c:2763:20: sparse: sparse: context imbalance in 'bpf_iter_tcp_listening_batch' - unexpected unlock
net/ipv4/tcp_ipv4.c:2790:40: sparse: sparse: context imbalance in 'bpf_iter_tcp_established_batch' - unexpected unlock
>> net/ipv4/tcp_ipv4.c:2932:9: sparse: sparse: context imbalance in 'bpf_iter_tcp_seq_show' - different lock contexts for basic block
net/ipv4/tcp_ipv4.c:3085:41: sparse: sparse: dereference of noderef expression
net/ipv4/tcp_ipv4.c:3085:41: sparse: sparse: dereference of noderef expression
net/ipv4/tcp_ipv4.c:3194:45: sparse: sparse: dereference of noderef expression
net/ipv4/tcp_ipv4.c:3194:45: sparse: sparse: dereference of noderef expression
vim +/bpf_iter_tcp_seq_show +2932 net/ipv4/tcp_ipv4.c
5f78445efda470 Martin KaFai Lau 2021-06-25 2893
52d87d5f6418ba Yonghong Song 2020-06-23 2894 static int bpf_iter_tcp_seq_show(struct seq_file *seq, void *v)
52d87d5f6418ba Yonghong Song 2020-06-23 2895 {
52d87d5f6418ba Yonghong Song 2020-06-23 2896 struct bpf_iter_meta meta;
52d87d5f6418ba Yonghong Song 2020-06-23 2897 struct bpf_prog *prog;
52d87d5f6418ba Yonghong Song 2020-06-23 2898 struct sock *sk = v;
5f78445efda470 Martin KaFai Lau 2021-06-25 2899 bool slow;
52d87d5f6418ba Yonghong Song 2020-06-23 2900 uid_t uid;
5f78445efda470 Martin KaFai Lau 2021-06-25 2901 int ret;
52d87d5f6418ba Yonghong Song 2020-06-23 2902
52d87d5f6418ba Yonghong Song 2020-06-23 2903 if (v == SEQ_START_TOKEN)
52d87d5f6418ba Yonghong Song 2020-06-23 2904 return 0;
52d87d5f6418ba Yonghong Song 2020-06-23 2905
5f78445efda470 Martin KaFai Lau 2021-06-25 2906 if (sk_fullsock(sk))
5f78445efda470 Martin KaFai Lau 2021-06-25 2907 slow = lock_sock_fast(sk);
5f78445efda470 Martin KaFai Lau 2021-06-25 2908
5f78445efda470 Martin KaFai Lau 2021-06-25 2909 if (unlikely(sk_unhashed(sk))) {
5f78445efda470 Martin KaFai Lau 2021-06-25 2910 ret = SEQ_SKIP;
5f78445efda470 Martin KaFai Lau 2021-06-25 2911 goto unlock;
5f78445efda470 Martin KaFai Lau 2021-06-25 2912 }
5f78445efda470 Martin KaFai Lau 2021-06-25 2913
52d87d5f6418ba Yonghong Song 2020-06-23 2914 if (sk->sk_state == TCP_TIME_WAIT) {
52d87d5f6418ba Yonghong Song 2020-06-23 2915 uid = 0;
52d87d5f6418ba Yonghong Song 2020-06-23 2916 } else if (sk->sk_state == TCP_NEW_SYN_RECV) {
52d87d5f6418ba Yonghong Song 2020-06-23 2917 const struct request_sock *req = v;
52d87d5f6418ba Yonghong Song 2020-06-23 2918
52d87d5f6418ba Yonghong Song 2020-06-23 2919 uid = from_kuid_munged(seq_user_ns(seq),
52d87d5f6418ba Yonghong Song 2020-06-23 2920 sock_i_uid(req->rsk_listener));
52d87d5f6418ba Yonghong Song 2020-06-23 2921 } else {
52d87d5f6418ba Yonghong Song 2020-06-23 2922 uid = from_kuid_munged(seq_user_ns(seq), sock_i_uid(sk));
52d87d5f6418ba Yonghong Song 2020-06-23 2923 }
52d87d5f6418ba Yonghong Song 2020-06-23 2924
52d87d5f6418ba Yonghong Song 2020-06-23 2925 meta.seq = seq;
52d87d5f6418ba Yonghong Song 2020-06-23 2926 prog = bpf_iter_get_info(&meta, false);
5f78445efda470 Martin KaFai Lau 2021-06-25 2927 ret = tcp_prog_seq_show(prog, &meta, v, uid);
5f78445efda470 Martin KaFai Lau 2021-06-25 2928
5f78445efda470 Martin KaFai Lau 2021-06-25 2929 unlock:
5f78445efda470 Martin KaFai Lau 2021-06-25 2930 if (sk_fullsock(sk))
5f78445efda470 Martin KaFai Lau 2021-06-25 2931 unlock_sock_fast(sk, slow);
5f78445efda470 Martin KaFai Lau 2021-06-25 @2932 return ret;
5f78445efda470 Martin KaFai Lau 2021-06-25 2933
---
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: 47145 bytes --]
next reply other threads:[~2021-06-26 5:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-26 5:21 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-06-26 14:42 [PATCH bpf-next 6/8] bpf: tcp: bpf iter batching and lock_sock kernel test robot
2021-06-25 20:04 [PATCH bpf-next 0/8] bpf: Allow bpf tcp iter to do bpf_setsockopt Martin KaFai Lau
2021-06-25 20:05 ` [PATCH bpf-next 6/8] bpf: tcp: bpf iter batching and lock_sock Martin KaFai Lau
2021-06-29 17:27 ` Yonghong Song
2021-06-29 17:44 ` Martin KaFai Lau
2021-06-29 17:57 ` Yonghong Song
2021-06-29 18:06 ` Martin KaFai Lau
2021-06-29 18:55 ` Yonghong Song
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=202106261340.PIUEhri8-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@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.