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: <202408031144.ln4wxJc4-lkp@intel.com>
Date: Sat, 3 Aug 2024 11:26:17 +0800
From: kernel test robot <lkp@...el.com>
To: Tom Herbert <tom@...bertland.com>, davem@...emloft.net, kuba@...nel.org,
	edumazet@...gle.com, netdev@...r.kernel.org, felipe@...anda.io
Cc: oe-kbuild-all@...ts.linux.dev, Tom Herbert <tom@...bertland.com>
Subject: Re: [PATCH 07/12] flow_dissector: Parse vxlan in UDP

Hi Tom,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]
[also build test WARNING on net/main linus/master v6.11-rc1 next-20240802]
[cannot apply to horms-ipvs/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Tom-Herbert/skbuff-Unconstantify-struct-net-argument-in-flowdis-functions/20240802-084418
base:   net-next/main
patch link:    https://lore.kernel.org/r/20240731172332.683815-8-tom%40herbertland.com
patch subject: [PATCH 07/12] flow_dissector: Parse vxlan in UDP
config: i386-randconfig-062-20240802 (https://download.01.org/0day-ci/archive/20240803/202408031144.ln4wxJc4-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240803/202408031144.ln4wxJc4-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/202408031144.ln4wxJc4-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> net/core/flow_dissector.c:780:16: sparse: sparse: restricted __be32 degrades to integer
   net/core/flow_dissector.c: note: in included file (through include/linux/if_pppox.h):
   include/uapi/linux/if_pppox.h:153:29: sparse: sparse: array of flexible structures

vim +780 net/core/flow_dissector.c

   760	
   761	static enum flow_dissect_ret
   762	__skb_flow_dissect_vxlan(const struct sk_buff *skb,
   763				 struct flow_dissector *flow_dissector,
   764				 void *target_container, const void *data,
   765				 __be16 *p_proto, int *p_nhoff, int hlen,
   766				 unsigned int flags)
   767	{
   768		struct vxlanhdr *hdr, _hdr;
   769		__be16 protocol;
   770	
   771		hdr = __skb_header_pointer(skb, *p_nhoff, sizeof(_hdr), data, hlen,
   772					   &_hdr);
   773		if (!hdr)
   774			return FLOW_DISSECT_RET_OUT_BAD;
   775	
   776		/* VNI flag always required to be set */
   777		if (!(hdr->vx_flags & VXLAN_HF_VNI))
   778			return FLOW_DISSECT_RET_OUT_BAD;
   779	
 > 780		if (hdr->vx_flags & VXLAN_F_GPE) {
   781			struct vxlanhdr_gpe *gpe = (struct vxlanhdr_gpe *)hdr;
   782	
   783			/* Need to have Next Protocol set for interfaces in GPE mode. */
   784			if (!gpe->np_applied)
   785				return FLOW_DISSECT_RET_OUT_BAD;
   786	
   787			/* The initial version is 0 */
   788			if (gpe->version != 0)
   789				return FLOW_DISSECT_RET_OUT_GOOD;
   790	
   791			/* "When the O bit is set to 1, the packet is an OAM packet and
   792			 * OAM so ignore
   793			 */
   794			if (gpe->oam_flag)
   795				return FLOW_DISSECT_RET_OUT_GOOD;
   796	
   797			protocol = tun_p_to_eth_p(gpe->next_protocol);
   798			if (!protocol)
   799				return FLOW_DISSECT_RET_OUT_GOOD;
   800		} else {
   801			protocol = htons(ETH_P_TEB);
   802		}
   803	
   804		*p_nhoff += sizeof(struct vxlanhdr);
   805		*p_proto = protocol;
   806	
   807		return FLOW_DISSECT_RET_PROTO_AGAIN;
   808	}
   809	

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