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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202408022046.h8kMQ01e-lkp@intel.com>
Date: Fri, 2 Aug 2024 21:00:24 +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: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	Tom Herbert <tom@...bertland.com>
Subject: Re: [PATCH 06/12] flow_dissector: UDP encap infrastructure

Hi Tom,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]
[also build test ERROR 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-7-tom%40herbertland.com
patch subject: [PATCH 06/12] flow_dissector: UDP encap infrastructure
config: um-defconfig (https://download.01.org/0day-ci/archive/20240802/202408022046.h8kMQ01e-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 430b90f04533b099d788db2668176038be38c53b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240802/202408022046.h8kMQ01e-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/202408022046.h8kMQ01e-lkp@intel.com/

All errors (new ones prefixed by >>):

   /usr/bin/ld: warning: .tmp_vmlinux1 has a LOAD segment with RWX permissions
   /usr/bin/ld: net/core/flow_dissector.o: in function `__skb_flow_dissect':
>> net/core/flow_dissector.c:874:(.ltext+0x1ff9): undefined reference to `__udp6_lib_lookup'
   clang: error: linker command failed with exit code 1 (use -v to see invocation)


vim +874 net/core/flow_dissector.c

   809	
   810	static enum flow_dissect_ret
   811	__skb_flow_dissect_udp(const struct sk_buff *skb, struct net *net,
   812			       struct flow_dissector *flow_dissector,
   813			       void *target_container, const void *data,
   814			       int *p_nhoff, int hlen, __be16 *p_proto,
   815			       u8 *p_ip_proto, int bpoff, unsigned int flags)
   816	{
   817		enum flow_dissect_ret ret;
   818		const struct udphdr *udph;
   819		struct udphdr _udph;
   820		struct sock *sk;
   821		__u8 encap_type;
   822		int nhoff;
   823	
   824		if (!(flags & FLOW_DISSECTOR_F_PARSE_UDP_ENCAPS))
   825			return FLOW_DISSECT_RET_OUT_GOOD;
   826	
   827		switch (*p_proto) {
   828		case htons(ETH_P_IP): {
   829			const struct iphdr *iph;
   830			struct iphdr _iph;
   831	
   832			iph = __skb_header_pointer(skb, bpoff, sizeof(_iph), data,
   833						   hlen, &_iph);
   834			if (!iph)
   835				return FLOW_DISSECT_RET_OUT_BAD;
   836	
   837			udph = __skb_header_pointer(skb, *p_nhoff, sizeof(_udph), data,
   838						    hlen, &_udph);
   839			if (!udph)
   840				return FLOW_DISSECT_RET_OUT_BAD;
   841	
   842			rcu_read_lock();
   843			/* Look up the UDPv4 socket and get the encap_type */
   844			sk = __udp4_lib_lookup(net, iph->saddr, udph->source,
   845					       iph->daddr, udph->dest,
   846					       inet_iif(skb), inet_sdif(skb),
   847					       net->ipv4.udp_table, NULL);
   848			if (!sk || !udp_sk(sk)->encap_type) {
   849				rcu_read_unlock();
   850				return FLOW_DISSECT_RET_OUT_GOOD;
   851			}
   852	
   853			encap_type = udp_sk(sk)->encap_type;
   854			rcu_read_unlock();
   855	
   856			break;
   857		}
   858		case htons(ETH_P_IPV6): {
   859			const struct ipv6hdr *iph;
   860			struct ipv6hdr _iph;
   861	
   862			iph = __skb_header_pointer(skb, bpoff, sizeof(_iph), data,
   863						   hlen, &_iph);
   864			if (!iph)
   865				return FLOW_DISSECT_RET_OUT_BAD;
   866	
   867			udph = __skb_header_pointer(skb, *p_nhoff, sizeof(_udph), data,
   868						    hlen, &_udph);
   869			if (!udph)
   870				return FLOW_DISSECT_RET_OUT_BAD;
   871	
   872			rcu_read_lock();
   873			/* Look up the UDPv6 socket and get the encap_type */
 > 874			sk = __udp6_lib_lookup(net, &iph->saddr, udph->source,
   875					       &iph->daddr, udph->dest,
   876					       inet_iif(skb), inet_sdif(skb),
   877					       net->ipv4.udp_table, NULL);
   878			if (!sk || !udp_sk(sk)->encap_type) {
   879				rcu_read_unlock();
   880				return FLOW_DISSECT_RET_OUT_GOOD;
   881			}
   882	
   883			encap_type = udp_sk(sk)->encap_type;
   884			rcu_read_unlock();
   885	
   886			break;
   887		}
   888		default:
   889			return FLOW_DISSECT_RET_OUT_GOOD;
   890		}
   891	
   892		nhoff = *p_nhoff + sizeof(struct udphdr);
   893		ret = FLOW_DISSECT_RET_OUT_GOOD;
   894	
   895		switch (encap_type) {
   896		default:
   897			break;
   898		}
   899	
   900		switch (ret) {
   901		case FLOW_DISSECT_RET_PROTO_AGAIN:
   902			*p_ip_proto = 0;
   903			fallthrough;
   904		case FLOW_DISSECT_RET_IPPROTO_AGAIN:
   905			*p_nhoff = nhoff;
   906			break;
   907		default:
   908			break;
   909		}
   910	
   911		return ret;
   912	}
   913	

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