lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201807291454.HlMX5CBi%fengguang.wu@intel.com>
Date:   Sun, 29 Jul 2018 15:06:14 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Toshiaki Makita <toshiaki.makita1@...il.com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Toshiaki Makita <makita.toshiaki@....ntt.co.jp>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>
Subject: Re: [PATCH v5 bpf-next 6/9] bpf: Make redirect_info accessible from
 modules

Hi Toshiaki,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Toshiaki-Makita/net-Export-skb_headers_offset_update/20180729-094722
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   net/core/filter.c:116:48: sparse: expression using sizeof(void)
   net/core/filter.c:116:48: sparse: expression using sizeof(void)
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:210:32: sparse: cast to restricted __be16
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:237:32: sparse: cast to restricted __be32
   net/core/filter.c:410:33: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:413:33: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:416:33: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:419:33: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:422:33: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:495:27: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:498:27: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:501:27: sparse: subtraction of functions? Share your drugs
   include/linux/slab.h:631:13: sparse: undefined identifier '__builtin_mul_overflow'
   include/linux/slab.h:631:13: sparse: not a function <noident>
   include/linux/filter.h:640:16: sparse: expression using sizeof(void)
   include/linux/filter.h:640:16: sparse: expression using sizeof(void)
   include/linux/filter.h:640:16: sparse: expression using sizeof(void)
   include/linux/filter.h:640:16: sparse: expression using sizeof(void)
   net/core/filter.c:1389:39: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct sock_filter const *filter @@    got struct sockstruct sock_filter const *filter @@
   net/core/filter.c:1389:39:    expected struct sock_filter const *filter
   net/core/filter.c:1389:39:    got struct sock_filter [noderef] <asn:1>*filter
   include/linux/filter.h:640:16: sparse: expression using sizeof(void)
   include/linux/filter.h:640:16: sparse: expression using sizeof(void)
   net/core/filter.c:1491:39: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct sock_filter const *filter @@    got struct sockstruct sock_filter const *filter @@
   net/core/filter.c:1491:39:    expected struct sock_filter const *filter
   net/core/filter.c:1491:39:    got struct sock_filter [noderef] <asn:1>*filter
   include/linux/filter.h:640:16: sparse: expression using sizeof(void)
   net/core/filter.c:1824:43: sparse: incorrect type in argument 2 (different base types) @@    expected restricted __wsum [usertype] diff @@    got unsigned lonrestricted __wsum [usertype] diff @@
   net/core/filter.c:1824:43:    expected restricted __wsum [usertype] diff
   net/core/filter.c:1824:43:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1827:36: sparse: incorrect type in argument 2 (different base types) @@    expected restricted __be16 [usertype] old @@    got unsigned lonrestricted __be16 [usertype] old @@
   net/core/filter.c:1827:36:    expected restricted __be16 [usertype] old
   net/core/filter.c:1827:36:    got unsigned long long [unsigned] [usertype] from
   net/core/filter.c:1827:42: sparse: incorrect type in argument 3 (different base types) @@    expected restricted __be16 [usertype] new @@    got unsigned lonrestricted __be16 [usertype] new @@
   net/core/filter.c:1827:42:    expected restricted __be16 [usertype] new
   net/core/filter.c:1827:42:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1830:36: sparse: incorrect type in argument 2 (different base types) @@    expected restricted __be32 [usertype] from @@    got unsigned lonrestricted __be32 [usertype] from @@
   net/core/filter.c:1830:36:    expected restricted __be32 [usertype] from
   net/core/filter.c:1830:36:    got unsigned long long [unsigned] [usertype] from
   net/core/filter.c:1830:42: sparse: incorrect type in argument 3 (different base types) @@    expected restricted __be32 [usertype] to @@    got unsigned lonrestricted __be32 [usertype] to @@
   net/core/filter.c:1830:42:    expected restricted __be32 [usertype] to
   net/core/filter.c:1830:42:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1875:59: sparse: incorrect type in argument 3 (different base types) @@    expected restricted __wsum [usertype] diff @@    got unsigned lonrestricted __wsum [usertype] diff @@
   net/core/filter.c:1875:59:    expected restricted __wsum [usertype] diff
   net/core/filter.c:1875:59:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1878:52: sparse: incorrect type in argument 3 (different base types) @@    expected restricted __be16 [usertype] from @@    got unsigned lonrestricted __be16 [usertype] from @@
   net/core/filter.c:1878:52:    expected restricted __be16 [usertype] from
   net/core/filter.c:1878:52:    got unsigned long long [unsigned] [usertype] from
   net/core/filter.c:1878:58: sparse: incorrect type in argument 4 (different base types) @@    expected restricted __be16 [usertype] to @@    got unsigned lonrestricted __be16 [usertype] to @@
   net/core/filter.c:1878:58:    expected restricted __be16 [usertype] to
   net/core/filter.c:1878:58:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1881:52: sparse: incorrect type in argument 3 (different base types) @@    expected restricted __be32 [usertype] from @@    got unsigned lonrestricted __be32 [usertype] from @@
   net/core/filter.c:1881:52:    expected restricted __be32 [usertype] from
   net/core/filter.c:1881:52:    got unsigned long long [unsigned] [usertype] from
   net/core/filter.c:1881:58: sparse: incorrect type in argument 4 (different base types) @@    expected restricted __be32 [usertype] to @@    got unsigned lonrestricted __be32 [usertype] to @@
   net/core/filter.c:1881:58:    expected restricted __be32 [usertype] to
   net/core/filter.c:1881:58:    got unsigned long long [unsigned] [usertype] to
   net/core/filter.c:1927:28: sparse: incorrect type in return expression (different base types) @@    expected unsigned long long @@    got nsigned long long @@
   net/core/filter.c:1927:28:    expected unsigned long long
   net/core/filter.c:1927:28:    got restricted __wsum
   net/core/filter.c:1949:35: sparse: incorrect type in return expression (different base types) @@    expected unsigned long long @@    got restricted unsigned long long @@
   net/core/filter.c:1949:35:    expected unsigned long long
   net/core/filter.c:1949:35:    got restricted __wsum [usertype] csum
>> net/core/filter.c:2088:40: sparse: incorrect type in initializer (different address spaces) @@    expected void const [noderef] <asn:3>*__vpp_verify @@    got d const [noderef] <asn:3>*__vpp_verify @@
   net/core/filter.c:2088:40:    expected void const [noderef] <asn:3>*__vpp_verify
   net/core/filter.c:2088:40:    got struct bpf_redirect_info *<noident>
   net/core/filter.c:2101:40: sparse: incorrect type in initializer (different address spaces) @@    expected void const [noderef] <asn:3>*__vpp_verify @@    got d const [noderef] <asn:3>*__vpp_verify @@
   net/core/filter.c:2101:40:    expected void const [noderef] <asn:3>*__vpp_verify
   net/core/filter.c:2101:40:    got struct bpf_redirect_info *<noident>
   net/core/filter.c:3194:40: sparse: incorrect type in initializer (different address spaces) @@    expected void const [noderef] <asn:3>*__vpp_verify @@    got d const [noderef] <asn:3>*__vpp_verify @@
   net/core/filter.c:3194:40:    expected void const [noderef] <asn:3>*__vpp_verify
   net/core/filter.c:3194:40:    got struct bpf_redirect_info *<noident>
   net/core/filter.c:3239:40: sparse: incorrect type in initializer (different address spaces) @@    expected void const [noderef] <asn:3>*__vpp_verify @@    got d const [noderef] <asn:3>*__vpp_verify @@
   net/core/filter.c:3239:40:    expected void const [noderef] <asn:3>*__vpp_verify
   net/core/filter.c:3239:40:    got struct bpf_redirect_info *<noident>
   net/core/filter.c:3279:40: sparse: incorrect type in initializer (different address spaces) @@    expected void const [noderef] <asn:3>*__vpp_verify @@    got d const [noderef] <asn:3>*__vpp_verify @@
   net/core/filter.c:3279:40:    expected void const [noderef] <asn:3>*__vpp_verify
   net/core/filter.c:3279:40:    got struct bpf_redirect_info *<noident>
   net/core/filter.c:3311:40: sparse: incorrect type in initializer (different address spaces) @@    expected void const [noderef] <asn:3>*__vpp_verify @@    got d const [noderef] <asn:3>*__vpp_verify @@
   net/core/filter.c:3311:40:    expected void const [noderef] <asn:3>*__vpp_verify
   net/core/filter.c:3311:40:    got struct bpf_redirect_info *<noident>
   net/core/filter.c:3362:40: sparse: incorrect type in initializer (different address spaces) @@    expected void const [noderef] <asn:3>*__vpp_verify @@    got d const [noderef] <asn:3>*__vpp_verify @@
   net/core/filter.c:3362:40:    expected void const [noderef] <asn:3>*__vpp_verify
   net/core/filter.c:3362:40:    got struct bpf_redirect_info *<noident>
   net/core/filter.c:3393:40: sparse: incorrect type in initializer (different address spaces) @@    expected void const [noderef] <asn:3>*__vpp_verify @@    got d const [noderef] <asn:3>*__vpp_verify @@
   net/core/filter.c:3393:40:    expected void const [noderef] <asn:3>*__vpp_verify
   net/core/filter.c:3393:40:    got struct bpf_redirect_info *<noident>
   net/core/filter.c:3417:40: sparse: incorrect type in initializer (different address spaces) @@    expected void const [noderef] <asn:3>*__vpp_verify @@    got d const [noderef] <asn:3>*__vpp_verify @@
   net/core/filter.c:3417:40:    expected void const [noderef] <asn:3>*__vpp_verify
   net/core/filter.c:3417:40:    got struct bpf_redirect_info *<noident>
   net/core/filter.c:3845:41: sparse: expression using sizeof(void)
   net/core/filter.c:3849:41: sparse: expression using sizeof(void)
   net/core/filter.c:3853:46: sparse: expression using sizeof(void)
   net/core/filter.c:3853:46: sparse: expression using sizeof(void)
   net/core/filter.c:3921:47: sparse: expression using sizeof(void)
   net/core/filter.c:4127:17: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [unsigned] [usertype] spi @@    got unsigned int [unsigned] [usertype] spi @@
   net/core/filter.c:4127:17:    expected unsigned int [unsigned] [usertype] spi
   net/core/filter.c:4127:17:    got restricted __be32 const [usertype] spi
   net/core/filter.c:4135:33: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [unsigned] [usertype] remote_ipv4 @@    got unsigned int [unsigned] [usertype] remote_ipv4 @@
   net/core/filter.c:4135:33:    expected unsigned int [unsigned] [usertype] remote_ipv4
   net/core/filter.c:4135:33:    got restricted __be32 const [usertype] a4
   net/core/filter.c:5304:27: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:5307:27: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:5310:27: sparse: subtraction of functions? Share your drugs
   include/linux/slab.h:631:13: sparse: call with no type!

vim +2088 net/core/filter.c

  2085	
  2086	BPF_CALL_2(bpf_redirect, u32, ifindex, u64, flags)
  2087	{
> 2088		struct bpf_redirect_info *ri = this_cpu_ptr(&bpf_redirect_info);
  2089	
  2090		if (unlikely(flags & ~(BPF_F_INGRESS)))
  2091			return TC_ACT_SHOT;
  2092	
  2093		ri->ifindex = ifindex;
  2094		ri->flags = flags;
  2095	
  2096		return TC_ACT_REDIRECT;
  2097	}
  2098	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ