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: <202508290631.baVQplwA-lkp@intel.com>
Date: Fri, 29 Aug 2025 06:27:55 +0800
From: kernel test robot <lkp@...el.com>
To: Daniel Jurgens <danielj@...dia.com>, netdev@...r.kernel.org,
	mst@...hat.com, jasowang@...hat.com, alex.williamson@...hat.com,
	virtualization@...ts.linux.dev, pabeni@...hat.com
Cc: oe-kbuild-all@...ts.linux.dev, parav@...dia.com, shshitrit@...dia.com,
	yohadt@...dia.com, Daniel Jurgens <danielj@...dia.com>
Subject: Re: [PATCH net-next 06/11] virtio_net: Implement layer 2 ethtool
 flow rules

Hi Daniel,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Daniel-Jurgens/virtio-pci-Expose-generic-device-capability-operations/20250828-024128
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250827183852.2471-7-danielj%40nvidia.com
patch subject: [PATCH net-next 06/11] virtio_net: Implement layer 2 ethtool flow rules
config: x86_64-randconfig-121-20250828 (https://download.01.org/0day-ci/archive/20250829/202508290631.baVQplwA-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250829/202508290631.baVQplwA-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508290631.baVQplwA-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/net/virtio_net/virtio_net_ff.c: note: in included file (through include/linux/virtio_admin.h):
   include/uapi/linux/virtio_net_ff.h:47:48: sparse: sparse: array of flexible structures
   include/uapi/linux/virtio_net_ff.h:67:48: sparse: sparse: array of flexible structures
   drivers/net/virtio_net/virtio_net_ff.c:113:24: sparse: sparse: restricted __le32 degrades to integer
>> drivers/net/virtio_net/virtio_net_ff.c:189:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] vq_index @@     got unsigned long long @@
   drivers/net/virtio_net/virtio_net_ff.c:189:27: sparse:     expected restricted __le16 [usertype] vq_index
   drivers/net/virtio_net/virtio_net_ff.c:189:27: sparse:     got unsigned long long
   drivers/net/virtio_net/virtio_net_ff.c:380:24: sparse: sparse: restricted __le32 degrades to integer
   drivers/net/virtio_net/virtio_net_ff.c:509:13: sparse: sparse: restricted __le32 degrades to integer
   drivers/net/virtio_net/virtio_net_ff.c:509:13: sparse: sparse: cast to restricted __le32
   drivers/net/virtio_net/virtio_net_ff.c:513:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] groups_limit @@     got int @@
   drivers/net/virtio_net/virtio_net_ff.c:513:35: sparse:     expected restricted __le32 [usertype] groups_limit
   drivers/net/virtio_net/virtio_net_ff.c:513:35: sparse:     got int

vim +189 drivers/net/virtio_net/virtio_net_ff.c

   163	
   164	static int insert_rule(struct virtnet_ff *ff,
   165			       struct virtnet_ethtool_rule *eth_rule,
   166			       u32 classifier_id,
   167			       const u8 *key,
   168			       size_t key_size)
   169	{
   170		struct ethtool_rx_flow_spec *fs = &eth_rule->flow_spec;
   171		struct virtio_net_resource_obj_ff_rule *ff_rule;
   172		int err;
   173	
   174		ff_rule = kzalloc(sizeof(*ff_rule) + key_size, GFP_KERNEL);
   175		if (!ff_rule) {
   176			err = -ENOMEM;
   177			goto err_eth_rule;
   178		}
   179		/*
   180		 * Intentionally leave the priority as 0. All rules have the same
   181		 * priority.
   182		 */
   183		ff_rule->group_id = cpu_to_le32(VIRTNET_FF_ETHTOOL_GROUP_PRIORITY);
   184		ff_rule->classifier_id = cpu_to_le32(classifier_id);
   185		ff_rule->key_length = (u8)key_size;
   186		ff_rule->action = fs->ring_cookie == RX_CLS_FLOW_DISC ?
   187						     VIRTIO_NET_FF_ACTION_DROP :
   188						     VIRTIO_NET_FF_ACTION_RX_VQ;
 > 189		ff_rule->vq_index = fs->ring_cookie != RX_CLS_FLOW_DISC ?
   190						       fs->ring_cookie : 0;
   191		memcpy(&ff_rule->keys, key, key_size);
   192	
   193		err = virtio_device_object_create(ff->vdev,
   194						  VIRTIO_NET_RESOURCE_OBJ_FF_RULE,
   195						  fs->location,
   196						  ff_rule,
   197						  sizeof(*ff_rule) + key_size);
   198		if (err)
   199			goto err_ff_rule;
   200	
   201		eth_rule->classifier_id = classifier_id;
   202		ff->ethtool.num_rules++;
   203		kfree(ff_rule);
   204	
   205		return 0;
   206	
   207	err_ff_rule:
   208		kfree(ff_rule);
   209	err_eth_rule:
   210		xa_erase(&ff->ethtool.rules, eth_rule->flow_spec.location);
   211		kfree(eth_rule);
   212	
   213		return err;
   214	}
   215	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ