From: kernel test robot <lkp@intel.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: net/sched/act_bpf.c:132:35: sparse: sparse: incorrect type in argument 2 (different address spaces)
Date: Thu, 2 Jul 2020 18:16:31 +0800 [thread overview]
Message-ID: <202007021825.q2ZWoeNt%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3218 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cd77006e01b3198c75fb7819b3d0ff89709539bb
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 2 weeks ago
config: x86_64-randconfig-s021-20200702 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-3-gfa153962-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' 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/sched/act_bpf.c:132:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got unsigned char [noderef] __rcu * @@
net/sched/act_bpf.c:132:35: sparse: expected void const *from
net/sched/act_bpf.c:132:35: sparse: got unsigned char [noderef] __rcu *
net/sched/act_bpf.c:125:50: sparse: sparse: dereference of noderef expression
net/sched/act_bpf.c:125:50: sparse: sparse: dereference of noderef expression
vim +132 net/sched/act_bpf.c
a8cb5f556b5679 Daniel Borkmann 2015-03-20 115
a8cb5f556b5679 Daniel Borkmann 2015-03-20 116 static int tcf_bpf_dump_ebpf_info(const struct tcf_bpf *prog,
a8cb5f556b5679 Daniel Borkmann 2015-03-20 117 struct sk_buff *skb)
a8cb5f556b5679 Daniel Borkmann 2015-03-20 118 {
7bd509e311f408 Daniel Borkmann 2016-12-04 119 struct nlattr *nla;
7bd509e311f408 Daniel Borkmann 2016-12-04 120
a8cb5f556b5679 Daniel Borkmann 2015-03-20 121 if (prog->bpf_name &&
a8cb5f556b5679 Daniel Borkmann 2015-03-20 122 nla_put_string(skb, TCA_ACT_BPF_NAME, prog->bpf_name))
a8cb5f556b5679 Daniel Borkmann 2015-03-20 123 return -EMSGSIZE;
a8cb5f556b5679 Daniel Borkmann 2015-03-20 124
e86283071fb0ee Daniel Borkmann 2017-06-21 125 if (nla_put_u32(skb, TCA_ACT_BPF_ID, prog->filter->aux->id))
e86283071fb0ee Daniel Borkmann 2017-06-21 126 return -EMSGSIZE;
e86283071fb0ee Daniel Borkmann 2017-06-21 127
f1f7714ea51c56 Daniel Borkmann 2017-01-13 128 nla = nla_reserve(skb, TCA_ACT_BPF_TAG, sizeof(prog->filter->tag));
7bd509e311f408 Daniel Borkmann 2016-12-04 129 if (nla == NULL)
7bd509e311f408 Daniel Borkmann 2016-12-04 130 return -EMSGSIZE;
7bd509e311f408 Daniel Borkmann 2016-12-04 131
f1f7714ea51c56 Daniel Borkmann 2017-01-13 @132 memcpy(nla_data(nla), prog->filter->tag, nla_len(nla));
7bd509e311f408 Daniel Borkmann 2016-12-04 133
a8cb5f556b5679 Daniel Borkmann 2015-03-20 134 return 0;
a8cb5f556b5679 Daniel Borkmann 2015-03-20 135 }
a8cb5f556b5679 Daniel Borkmann 2015-03-20 136
:::::: The code at line 132 was first introduced by commit
:::::: f1f7714ea51c56b7163fb1a5acf39c6a204dd758 bpf: rework prog_digest into prog_tag
:::::: TO: Daniel Borkmann <daniel@iogearbox.net>
:::::: CC: David S. Miller <davem@davemloft.net>
---
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: 33279 bytes --]
next reply other threads:[~2020-07-02 10:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 10:16 kernel test robot [this message]
2020-07-09 12:54 kernel test robot
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=202007021825.q2ZWoeNt%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.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
all inboxes | Powered by JetHome®