mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Florian Westphal <fw@strlen.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Pablo Neira Ayuso <pablo@netfilter.org>
Subject: net/netfilter/ipset/ip_set_hash_netiface.c:163:25: sparse: sparse: cast to non-scalar
Date: Sun, 20 Sep 2026 05:13:59 +0800	[thread overview]
Message-ID: <202609200503.KbHsIjIf-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f259f446f5198d98e13756d2cd531812a0ad3064
commit: e80456d79ec83b00a6bd44c377684b1632ccc3c7 netfilter: ipset: remove need to allocate memory on delete operations
date:   5 weeks ago
config: alpha-randconfig-r1306-20260919 (https://download.01.org/0day-ci/archive/20260920/202609200503.KbHsIjIf-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260920/202609200503.KbHsIjIf-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
| Fixes: e80456d79ec8 ("netfilter: ipset: remove need to allocate memory on delete operations")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609200503.KbHsIjIf-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   net/netfilter/ipset/ip_set_hash_netiface.c: note: in included file:
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast from non-scalar
>> net/netfilter/ipset/ip_set_hash_netiface.c:163:25: sparse: sparse: cast to non-scalar
>> net/netfilter/ipset/ip_set_hash_netiface.c:163:25: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netiface.c: note: in included file:
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netiface.c:384:25: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_netiface.c:384:25: sparse: sparse: cast from non-scalar
--
   net/netfilter/ipset/ip_set_hash_netnet.c: note: in included file:
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast from non-scalar
>> net/netfilter/ipset/ip_set_hash_netnet.c:153:21: sparse: sparse: cast to non-scalar
>> net/netfilter/ipset/ip_set_hash_netnet.c:153:21: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:154:21: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:154:21: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c: note: in included file:
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:394:21: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:394:21: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:395:21: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:395:21: sparse: sparse: cast from non-scalar
--
   net/netfilter/ipset/ip_set_hash_netportnet.c: note: in included file:
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast from non-scalar
>> net/netfilter/ipset/ip_set_hash_netportnet.c:160:21: sparse: sparse: cast to non-scalar
>> net/netfilter/ipset/ip_set_hash_netportnet.c:160:21: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netportnet.c:161:21: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_netportnet.c:161:21: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netportnet.c: note: in included file:
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netportnet.c:457:21: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_netportnet.c:457:21: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netportnet.c:458:21: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_netportnet.c:458:21: sparse: sparse: cast from non-scalar

vim +163 net/netfilter/ipset/ip_set_hash_netiface.c

c737b7c4510026 Florian Westphal 2015-04-02  154  
e385357a2f214e Jozsef Kadlecsik 2011-06-16  155  static int
e385357a2f214e Jozsef Kadlecsik 2011-06-16  156  hash_netiface4_kadt(struct ip_set *set, const struct sk_buff *skb,
e385357a2f214e Jozsef Kadlecsik 2011-06-16  157  		    const struct xt_action_param *par,
5d50e1d88336a9 Jozsef Kadlecsik 2013-04-08  158  		    enum ipset_adt adt, struct ip_set_adt_opt *opt)
e385357a2f214e Jozsef Kadlecsik 2011-06-16  159  {
21956ab290f7f3 Jozsef Kadlecsik 2015-06-26  160  	struct hash_netiface4 *h = set->data;
e385357a2f214e Jozsef Kadlecsik 2011-06-16  161  	ipset_adtfn adtfn = set->variant->adt[adt];
5d50e1d88336a9 Jozsef Kadlecsik 2013-04-08  162  	struct hash_netiface4_elem e = {
8e5fd2a55e2468 Jozsef Kadlecsik 2026-07-30 @163  		.cidr = INIT_CIDR(h->rnets[0], HOST_MASK),
bd9087e0407bfb Jozsef Kadlecsik 2012-09-10  164  		.elem = 1,
e385357a2f214e Jozsef Kadlecsik 2011-06-16  165  	};
ca134ce86451f3 Jozsef Kadlecsik 2013-09-07  166  	struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set);
e385357a2f214e Jozsef Kadlecsik 2011-06-16  167  
e385357a2f214e Jozsef Kadlecsik 2011-06-16  168  	if (adt == IPSET_TEST)
5d50e1d88336a9 Jozsef Kadlecsik 2013-04-08  169  		e.cidr = HOST_MASK;
e385357a2f214e Jozsef Kadlecsik 2011-06-16  170  
5d50e1d88336a9 Jozsef Kadlecsik 2013-04-08  171  	ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip);
5d50e1d88336a9 Jozsef Kadlecsik 2013-04-08  172  	e.ip &= ip_set_netmask(e.cidr);
e385357a2f214e Jozsef Kadlecsik 2011-06-16  173  

:::::: The code at line 163 was first introduced by commit
:::::: 8e5fd2a55e2468f6225ef5af01ae58cdbcbae8cf netfilter: ipset: rework cidr bookkeeping

:::::: TO: Jozsef Kadlecsik <kadlec@netfilter.org>
:::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>

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

                 reply	other threads:[~2026-09-19 21:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202609200503.KbHsIjIf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=fw@strlen.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pablo@netfilter.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 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®