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
.config.gz
Description: application/gzip