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>] [day] [month] [year] [list]
Message-ID: <201807170125.UimDJTrz%fengguang.wu@intel.com>
Date:   Tue, 17 Jul 2018 01:43:28 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Boris Pismenny <borisp@...lanox.com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org,
        Ilya Lesokhin <ilyal@...lanox.com>
Subject: [net-next:master 716/721]
 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c:329:66: sparse:
 incorrect type in argument 6 (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   aea06eb276d99590f400c877ca2bd74b4db91330
commit: 00aebab27c8752c7420dce286270ccedc70ac39a [716/721] net/mlx5e: TLS, add Innova TLS rx data path
reproduce:
        # apt-get install sparse
        git checkout 00aebab27c8752c7420dce286270ccedc70ac39a
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c:329:66: sparse: incorrect type in argument 6 (different base types) @@    expected unsigned short const [unsigned] [usertype] hnum @@    got  const [unsigned] [usertype] hnum @@
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c:329:66:    expected unsigned short const [unsigned] [usertype] hnum
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c:329:66:    got restricted __be16 [usertype] dest
>> include/net/tls.h:435:47: sparse: cast from restricted __be32

vim +329 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c

   302	
   303	static int tls_update_resync_sn(struct net_device *netdev,
   304					struct sk_buff *skb,
   305					struct mlx5e_tls_metadata *mdata)
   306	{
   307		struct sock *sk = NULL;
   308		struct iphdr *iph;
   309		struct tcphdr *th;
   310		__be32 seq;
   311	
   312		if (mdata->ethertype != htons(ETH_P_IP))
   313			return -EINVAL;
   314	
   315		iph = (struct iphdr *)(mdata + 1);
   316	
   317		th = ((void *)iph) + iph->ihl * 4;
   318	
   319		if (iph->version == 4) {
   320			sk = inet_lookup_established(dev_net(netdev), &tcp_hashinfo,
   321						     iph->saddr, th->source, iph->daddr,
   322						     th->dest, netdev->ifindex);
   323	#if IS_ENABLED(CONFIG_IPV6)
   324		} else {
   325			struct ipv6hdr *ipv6h = (struct ipv6hdr *)iph;
   326	
   327			sk = __inet6_lookup_established(dev_net(netdev), &tcp_hashinfo,
   328							&ipv6h->saddr, th->source,
 > 329							&ipv6h->daddr, th->dest,
   330							netdev->ifindex, 0);
   331	#endif
   332		}
   333		if (!sk || sk->sk_state == TCP_TIME_WAIT)
   334			goto out;
   335	
   336		skb->sk = sk;
   337		skb->destructor = sock_edemux;
   338	
   339		memcpy(&seq, &mdata->content.recv.sync_seq, sizeof(seq));
   340		tls_offload_rx_resync_request(sk, seq);
   341	out:
   342		return 0;
   343	}
   344	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ