Netdev List
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Ilya Lesokhin <ilyal@mellanox.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org, davejwatson@fb.com,
	aviadye@mellanox.com, Ilya Lesokhin <ilyal@mellanox.com>,
	Boris Pismenny <borisp@mellanox.com>
Subject: Re: [PATCH 3/3] tls: Use correct sk->sk_prot for IPV6
Date: Fri, 11 Aug 2017 23:06:23 +0800	[thread overview]
Message-ID: <201708112307.qBWXyuLc%fengguang.wu@intel.com> (raw)
In-Reply-To: <1502361196-127278-4-git-send-email-ilyal@mellanox.com>

[-- Attachment #1: Type: text/plain, Size: 3248 bytes --]

Hi Ilya,

[auto build test ERROR on net/master]
[also build test ERROR on v4.13-rc4 next-20170811]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Ilya-Lesokhin/ipv6-Prevent-unexpected-sk-sk_prot-changes/20170811-223050
config: i386-randconfig-x018-201732 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   net/tls/tls_main.c: In function 'do_tls_setsockopt_tx':
>> net/tls/tls_main.c:362:43: error: 'TLSV6' undeclared (first use in this function)
     int ip_ver = sk->sk_family == AF_INET6 ? TLSV6 : TLSV4;
                                              ^~~~~
   net/tls/tls_main.c:362:43: note: each undeclared identifier is reported only once for each function it appears in

vim +/TLSV6 +362 net/tls/tls_main.c

   354	
   355	static int do_tls_setsockopt_tx(struct sock *sk, char __user *optval,
   356					unsigned int optlen)
   357	{
   358		struct tls_crypto_info *crypto_info, tmp_crypto_info;
   359		struct tls_context *ctx = tls_get_ctx(sk);
   360		struct proto *prot = NULL;
   361		int rc = 0;
 > 362		int ip_ver = sk->sk_family == AF_INET6 ? TLSV6 : TLSV4;
   363	
   364		if (!optval || (optlen < sizeof(*crypto_info))) {
   365			rc = -EINVAL;
   366			goto out;
   367		}
   368	
   369		rc = copy_from_user(&tmp_crypto_info, optval, sizeof(*crypto_info));
   370		if (rc) {
   371			rc = -EFAULT;
   372			goto out;
   373		}
   374	
   375		/* check version */
   376		if (tmp_crypto_info.version != TLS_1_2_VERSION) {
   377			rc = -ENOTSUPP;
   378			goto out;
   379		}
   380	
   381		/* get user crypto info */
   382		crypto_info = &ctx->crypto_send;
   383	
   384		/* Currently we don't support set crypto info more than one time */
   385		if (TLS_CRYPTO_INFO_READY(crypto_info))
   386			goto out;
   387	
   388		switch (tmp_crypto_info.cipher_type) {
   389		case TLS_CIPHER_AES_GCM_128: {
   390			if (optlen != sizeof(struct tls12_crypto_info_aes_gcm_128)) {
   391				rc = -EINVAL;
   392				goto out;
   393			}
   394			rc = copy_from_user(
   395			  crypto_info,
   396			  optval,
   397			  sizeof(struct tls12_crypto_info_aes_gcm_128));
   398	
   399			if (rc) {
   400				rc = -EFAULT;
   401				goto err_crypto_info;
   402			}
   403			break;
   404		}
   405		default:
   406			rc = -EINVAL;
   407			goto out;
   408		}
   409	
   410		ctx->sk_write_space = sk->sk_write_space;
   411		sk->sk_write_space = tls_write_space;
   412	
   413		ctx->sk_proto_close = sk->sk_prot->close;
   414	
   415		/* currently SW is default, we will have ethtool in future */
   416		rc = tls_set_sw_offload(sk, ctx);
   417		prot = &tls_prots[ip_ver][TLS_SW_TX];
   418		if (rc)
   419			goto err_crypto_info;
   420	
   421		sk->sk_prot = prot;
   422		goto out;
   423	
   424	err_crypto_info:
   425		memset(crypto_info, 0, sizeof(*crypto_info));
   426	out:
   427		return rc;
   428	}
   429	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33510 bytes --]

  reply	other threads:[~2017-08-11 15:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 10:33 [PATCH 0/3] tls: Use correct sk->sk_prot for IPV6 Ilya Lesokhin
2017-08-10 10:33 ` [PATCH 1/3] ipv6: Prevent unexpected sk->sk_prot changes Ilya Lesokhin
2017-08-10 10:33 ` [PATCH 2/3] net: Export tcpv6_prot Ilya Lesokhin
2017-08-11 21:34   ` David Miller
2017-08-10 10:33 ` [PATCH 3/3] tls: Use correct sk->sk_prot for IPV6 Ilya Lesokhin
2017-08-11 15:06   ` kbuild test robot [this message]
2017-08-11 21:36   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201708112307.qBWXyuLc%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=aviadye@mellanox.com \
    --cc=borisp@mellanox.com \
    --cc=davejwatson@fb.com \
    --cc=ilyal@mellanox.com \
    --cc=kbuild-all@01.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox