mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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, 9 Jul 2020 20:54:30 +0800	[thread overview]
Message-ID: <202007092024.7KN2lAvv%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date:   3 weeks ago
config: sh-randconfig-s031-20200709 (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
        # apt-get install sparse
        # sparse version: v0.6.2-37-gc9676a3b-dirty
        git checkout 670d0a4b10704667765f7d18f7592993d02783aa
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh 

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

             reply	other threads:[~2020-07-09 12:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 12:54 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-07-02 10:16 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=202007092024.7KN2lAvv%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®