All of lore.kernel.org
 help / color / mirror / Atom feed
* net/core/filter.c:4244:9: sparse: sparse: switch with no cases
@ 2023-12-03  6:31 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-12-03  6:31 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: net/core/filter.c:4244:9: sparse: sparse: switch with no cases"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: David Ahern <dsahern@gmail.com>
CC: Daniel Borkmann <daniel@iogearbox.net>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   815fb87b753055df2d9e50f6cd80eb10235fe3e9
commit: 87f5fc7e48dd3175b30dd03b41564e1a8e136323 bpf: Provide helper to do forwarding lookups in kernel FIB table
date:   6 years ago
:::::: branch date: 25 hours ago
:::::: commit date: 6 years ago
config: openrisc-randconfig-r131-20231102 (https://download.01.org/0day-ci/archive/20231203/202312030820.Ku2lwbDI-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231203/202312030820.Ku2lwbDI-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202312030820.Ku2lwbDI-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> net/core/filter.c:4244:9: sparse: sparse: switch with no cases
   net/core/filter.c:4275:9: sparse: sparse: switch with no cases
   net/core/filter.c:406:33: sparse: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:409:33: sparse: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:412:33: sparse: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:415:33: sparse: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:418:33: sparse: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:481:27: sparse: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:484:27: sparse: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:487:27: sparse: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:1368:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct sock_filter const *filter @@     got struct sock_filter [noderef] <asn:1> *filter @@
   net/core/filter.c:1368:39: sparse:     expected struct sock_filter const *filter
   net/core/filter.c:1368:39: sparse:     got struct sock_filter [noderef] <asn:1> *filter
   net/core/filter.c:1470:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct sock_filter const *filter @@     got struct sock_filter [noderef] <asn:1> *filter @@
   net/core/filter.c:1470:39: sparse:     expected struct sock_filter const *filter
   net/core/filter.c:1470:39: sparse:     got struct sock_filter [noderef] <asn:1> *filter
   net/core/filter.c:4840:27: sparse: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:4843:27: sparse: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:4846:27: sparse: sparse: subtraction of functions? Share your drugs
   net/core/filter.c:6129:31: sparse: sparse: symbol 'sk_filter_verifier_ops' was not declared. Should it be static?
   net/core/filter.c:6136:27: sparse: sparse: symbol 'sk_filter_prog_ops' was not declared. Should it be static?
   net/core/filter.c:6140:31: sparse: sparse: symbol 'tc_cls_act_verifier_ops' was not declared. Should it be static?
   net/core/filter.c:6148:27: sparse: sparse: symbol 'tc_cls_act_prog_ops' was not declared. Should it be static?
   net/core/filter.c:6152:31: sparse: sparse: symbol 'xdp_verifier_ops' was not declared. Should it be static?
   net/core/filter.c:6162:31: sparse: sparse: symbol 'cg_skb_verifier_ops' was not declared. Should it be static?
   net/core/filter.c:6168:27: sparse: sparse: symbol 'cg_skb_prog_ops' was not declared. Should it be static?
   net/core/filter.c:6172:31: sparse: sparse: symbol 'lwt_inout_verifier_ops' was not declared. Should it be static?
   net/core/filter.c:6182:31: sparse: sparse: symbol 'lwt_xmit_verifier_ops' was not declared. Should it be static?
   net/core/filter.c:6189:27: sparse: sparse: symbol 'lwt_xmit_prog_ops' was not declared. Should it be static?
   net/core/filter.c:6193:31: sparse: sparse: symbol 'cg_sock_verifier_ops' was not declared. Should it be static?
   net/core/filter.c:6199:27: sparse: sparse: symbol 'cg_sock_prog_ops' was not declared. Should it be static?
   net/core/filter.c:6202:31: sparse: sparse: symbol 'cg_sock_addr_verifier_ops' was not declared. Should it be static?
   net/core/filter.c:6208:27: sparse: sparse: symbol 'cg_sock_addr_prog_ops' was not declared. Should it be static?
   net/core/filter.c:6211:31: sparse: sparse: symbol 'sock_ops_verifier_ops' was not declared. Should it be static?
   net/core/filter.c:6217:27: sparse: sparse: symbol 'sock_ops_prog_ops' was not declared. Should it be static?
   net/core/filter.c:6220:31: sparse: sparse: symbol 'sk_skb_verifier_ops' was not declared. Should it be static?
   net/core/filter.c:6227:27: sparse: sparse: symbol 'sk_skb_prog_ops' was not declared. Should it be static?
   net/core/filter.c:6230:31: sparse: sparse: symbol 'sk_msg_verifier_ops' was not declared. Should it be static?
   net/core/filter.c:6236:27: sparse: sparse: symbol 'sk_msg_prog_ops' was not declared. Should it be static?
   net/core/filter.c:206:32: sparse: sparse: cast to restricted __be16
   net/core/filter.c:206:32: sparse: sparse: cast to restricted __be16
   net/core/filter.c:233:32: sparse: sparse: cast to restricted __be32
   net/core/filter.c:233:32: sparse: sparse: cast to restricted __be32
   net/core/filter.c:1772:43: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __wsum [usertype] diff @@     got unsigned long long [usertype] to @@
   net/core/filter.c:1772:43: sparse:     expected restricted __wsum [usertype] diff
   net/core/filter.c:1772:43: sparse:     got unsigned long long [usertype] to
   net/core/filter.c:1775:36: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __be16 [usertype] old @@     got unsigned long long [usertype] from @@
   net/core/filter.c:1775:36: sparse:     expected restricted __be16 [usertype] old
   net/core/filter.c:1775:36: sparse:     got unsigned long long [usertype] from
   net/core/filter.c:1775:42: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted __be16 [usertype] new @@     got unsigned long long [usertype] to @@
   net/core/filter.c:1775:42: sparse:     expected restricted __be16 [usertype] new
   net/core/filter.c:1775:42: sparse:     got unsigned long long [usertype] to
   net/core/filter.c:1778:36: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __be32 [usertype] from @@     got unsigned long long [usertype] from @@
   net/core/filter.c:1778:36: sparse:     expected restricted __be32 [usertype] from
   net/core/filter.c:1778:36: sparse:     got unsigned long long [usertype] from
   net/core/filter.c:1778:42: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted __be32 [usertype] to @@     got unsigned long long [usertype] to @@
   net/core/filter.c:1778:42: sparse:     expected restricted __be32 [usertype] to
   net/core/filter.c:1778:42: sparse:     got unsigned long long [usertype] to
   net/core/filter.c:1823:59: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted __wsum [usertype] diff @@     got unsigned long long [usertype] to @@
   net/core/filter.c:1823:59: sparse:     expected restricted __wsum [usertype] diff
   net/core/filter.c:1823:59: sparse:     got unsigned long long [usertype] to
   net/core/filter.c:1826:52: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted __be16 [usertype] from @@     got unsigned long long [usertype] from @@
   net/core/filter.c:1826:52: sparse:     expected restricted __be16 [usertype] from
   net/core/filter.c:1826:52: sparse:     got unsigned long long [usertype] from
   net/core/filter.c:1826:58: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted __be16 [usertype] to @@     got unsigned long long [usertype] to @@
   net/core/filter.c:1826:58: sparse:     expected restricted __be16 [usertype] to
   net/core/filter.c:1826:58: sparse:     got unsigned long long [usertype] to
   net/core/filter.c:1829:52: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted __be32 [usertype] from @@     got unsigned long long [usertype] from @@
   net/core/filter.c:1829:52: sparse:     expected restricted __be32 [usertype] from
   net/core/filter.c:1829:52: sparse:     got unsigned long long [usertype] from
   net/core/filter.c:1829:58: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted __be32 [usertype] to @@     got unsigned long long [usertype] to @@
   net/core/filter.c:1829:58: sparse:     expected restricted __be32 [usertype] to
   net/core/filter.c:1829:58: sparse:     got unsigned long long [usertype] to
   net/core/filter.c:1875:28: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long long @@     got restricted __wsum @@
   net/core/filter.c:1875:28: sparse:     expected unsigned long long
   net/core/filter.c:1875:28: sparse:     got restricted __wsum
   net/core/filter.c:1897:35: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned long long @@     got restricted __wsum [usertype] csum @@
   net/core/filter.c:1897:35: sparse:     expected unsigned long long
   net/core/filter.c:1897:35: sparse:     got restricted __wsum [usertype] csum
   net/core/filter.c:3601:49: sparse: sparse: cast truncates bits from constant value (ffffffffff becomes ff)
   net/core/filter.c: note: in included file (through include/net/checksum.h, include/linux/skbuff.h, include/linux/netlink.h, ...):
   include/linux/uaccess.h:134:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   include/linux/uaccess.h:134:38: sparse:     expected void *to
   include/linux/uaccess.h:134:38: sparse:     got void [noderef] <asn:1> *to
   include/linux/uaccess.h:134:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] <asn:1> *from @@     got void const *from @@
   include/linux/uaccess.h:134:42: sparse:     expected void const [noderef] <asn:1> *from
   include/linux/uaccess.h:134:42: sparse:     got void const *from
   net/core/filter.c: note: in included file (through include/linux/uaccess.h, include/net/checksum.h, include/linux/skbuff.h, ...):
   arch/openrisc/include/asm/uaccess.h:247:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const *from @@     got void const [noderef] <asn:1> *from @@
   arch/openrisc/include/asm/uaccess.h:247:55: sparse:     expected void const *from
   arch/openrisc/include/asm/uaccess.h:247:55: sparse:     got void const [noderef] <asn:1> *from
   net/core/filter.c: In function 'bpf_base_func_proto':
   net/core/filter.c:4319:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
    4319 |                 if (capable(CAP_SYS_ADMIN))
         |                    ^
   net/core/filter.c:4321:9: note: here
    4321 |         default:
         |         ^~~~~~~

vim +4244 net/core/filter.c

87f5fc7e48dd31 David Ahern 2018-05-09  4237  
87f5fc7e48dd31 David Ahern 2018-05-09  4238  BPF_CALL_4(bpf_xdp_fib_lookup, struct xdp_buff *, ctx,
87f5fc7e48dd31 David Ahern 2018-05-09  4239  	   struct bpf_fib_lookup *, params, int, plen, u32, flags)
87f5fc7e48dd31 David Ahern 2018-05-09  4240  {
87f5fc7e48dd31 David Ahern 2018-05-09  4241  	if (plen < sizeof(*params))
87f5fc7e48dd31 David Ahern 2018-05-09  4242  		return -EINVAL;
87f5fc7e48dd31 David Ahern 2018-05-09  4243  
87f5fc7e48dd31 David Ahern 2018-05-09 @4244  	switch (params->family) {
87f5fc7e48dd31 David Ahern 2018-05-09  4245  #if IS_ENABLED(CONFIG_INET)
87f5fc7e48dd31 David Ahern 2018-05-09  4246  	case AF_INET:
87f5fc7e48dd31 David Ahern 2018-05-09  4247  		return bpf_ipv4_fib_lookup(dev_net(ctx->rxq->dev), params,
87f5fc7e48dd31 David Ahern 2018-05-09  4248  					   flags);
87f5fc7e48dd31 David Ahern 2018-05-09  4249  #endif
87f5fc7e48dd31 David Ahern 2018-05-09  4250  #if IS_ENABLED(CONFIG_IPV6)
87f5fc7e48dd31 David Ahern 2018-05-09  4251  	case AF_INET6:
87f5fc7e48dd31 David Ahern 2018-05-09  4252  		return bpf_ipv6_fib_lookup(dev_net(ctx->rxq->dev), params,
87f5fc7e48dd31 David Ahern 2018-05-09  4253  					   flags);
87f5fc7e48dd31 David Ahern 2018-05-09  4254  #endif
87f5fc7e48dd31 David Ahern 2018-05-09  4255  	}
87f5fc7e48dd31 David Ahern 2018-05-09  4256  	return 0;
87f5fc7e48dd31 David Ahern 2018-05-09  4257  }
87f5fc7e48dd31 David Ahern 2018-05-09  4258  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-03  6:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-03  6:31 net/core/filter.c:4244:9: sparse: sparse: switch with no cases kernel test robot

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.