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] [day] [month] [year] [list]
Message-ID: <202509250856.HoVMjFzw-lkp@intel.com>
Date: Thu, 25 Sep 2025 09:07:18 +0800
From: kernel test robot <lkp@...el.com>
To: Kommula Shiva Shankar <kshankar@...vell.com>, netdev@...r.kernel.org,
	mst@...hat.com, jasowang@...hat.com, pabeni@...hat.com,
	xuanzhuo@...ux.alibaba.com
Cc: oe-kbuild-all@...ts.linux.dev, virtualization@...ts.linux.dev,
	parav@...dia.com, jerinj@...vell.com, ndabilpuram@...vell.com,
	sburla@...vell.com, schalla@...vell.com
Subject: Re: [PATCH v1 net-next  2/3] virtio_net: enable outer nw header
 offset support.

Hi Kommula,

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/Kommula-Shiva-Shankar/net-implement-virtio-helper-to-handle-outer-nw-offset/20250924-042602
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250923202258.2738717-3-kshankar%40marvell.com
patch subject: [PATCH v1 net-next  2/3] virtio_net: enable outer nw header offset support.
config: x86_64-randconfig-122-20250924 (https://download.01.org/0day-ci/archive/20250925/202509250856.HoVMjFzw-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/20250925/202509250856.HoVMjFzw-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/202509250856.HoVMjFzw-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/net/virtio_net.c: note: in included file:
>> include/linux/virtio_net.h:389:72: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __virtio16 [usertype] val @@     got restricted __le16 [usertype] outer_nh_offset @@
   include/linux/virtio_net.h:389:72: sparse:     expected restricted __virtio16 [usertype] val
   include/linux/virtio_net.h:389:72: sparse:     got restricted __le16 [usertype] outer_nh_offset
>> include/linux/virtio_net.h:411:39: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] outer_nh_offset @@     got restricted __virtio16 @@
   include/linux/virtio_net.h:411:39: sparse:     expected restricted __le16 [usertype] outer_nh_offset
   include/linux/virtio_net.h:411:39: sparse:     got restricted __virtio16

vim +389 include/linux/virtio_net.h

a2fb4bc4e2a6a0 Paolo Abeni           2025-07-08  376  
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  377  static inline int
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  378  virtio_net_out_net_header_to_skb(struct sk_buff *skb,
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  379  				 struct virtio_net_hdr_v1_hash_tunnel_out_net_hdr *vhdr,
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  380  				 bool out_net_hdr_negotiated,
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  381  				 bool little_endian)
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  382  {
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  383  	unsigned int out_net_hdr_off;
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  384  
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  385  	if (!out_net_hdr_negotiated)
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  386  		return 0;
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  387  
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  388  	if (vhdr->outer_nh_offset) {
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24 @389  		out_net_hdr_off = __virtio16_to_cpu(little_endian, vhdr->outer_nh_offset);
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  390  		skb_set_network_header(skb, out_net_hdr_off);
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  391  	}
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  392  
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  393  	return 0;
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  394  }
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  395  
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  396  static inline int
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  397  virtio_net_out_net_header_from_skb(const struct sk_buff *skb,
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  398  				   struct virtio_net_hdr_v1_hash_tunnel_out_net_hdr *vhdr,
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  399  				   bool out_net_hdr_negotiated,
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  400  				   bool little_endian)
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  401  {
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  402  	unsigned int out_net_hdr_off;
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  403  
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  404  	if (!out_net_hdr_negotiated) {
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  405  		vhdr->outer_nh_offset = 0;
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  406  		return 0;
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  407  	}
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  408  
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  409  	out_net_hdr_off = skb_network_offset(skb);
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  410  	if (out_net_hdr_off && skb->protocol == htons(ETH_P_IP))
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24 @411  		vhdr->outer_nh_offset = __cpu_to_virtio16(little_endian,
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  412  							  out_net_hdr_off);
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  413  
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  414  	return 0;
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  415  }
1dc49efaeaa4c1 Kommula Shiva Shankar 2025-09-24  416  

-- 
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