Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp488172pxb; Fri, 15 Oct 2021 09:32:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuk/Uxpu2WTIXgKaDpRa+7NIIPRheiOz6VIti5qEDkujTtgDjqo8C9bmYYH8bP7CeJiEgw X-Received: by 2002:a63:8f5c:: with SMTP id r28mr9741888pgn.70.1634315542535; Fri, 15 Oct 2021 09:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634315542; cv=none; d=google.com; s=arc-20160816; b=YE0qQR34ACs7j0YD3FhuHguN3OYoz550JmkuA80Eq5g3rMmmniGR1o8iABxFLzt/E+ OtnlKUnB31hEDUvclBYWSoxUbtHXNasDCl/dq02DkXPT4PaxxwGakMvRpz5en1K5Lc3q xuaKm4IDAIlvlRfLUWPCEhN/uq1WNKvSQt39zYOjJ56VJmWAfmkbNiWxSbad/HFqLZNI hHpRR1fIQ309NfbLb8vw/1xLKz5ANmAFKXHvyulKEcP+1M6OzQRrqOhIM8fBcZLX4WSL 09q9ewmw8uTOEoHYgH1TZX0SW9QCY2sygyYj95SGikYooJfA4IKLNYX3mPu9ZNMQ525g H1hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CXlRCtGL7o0DzwzbIwbfJ2qRa+xgnxwuo7fjUGe9gzE=; b=UPDX+gnU5WqncXbA6Vj+HoMOo734cfFz6iNx1J7y+3qJ73aq7sNPdXWvvuaMI0Z+pS xF6ufXT3yQu40XAYqS8Lmo0RhLGekLfcruvMc74Bu7yCSoi5pKwEiVFv27YEOPh2R3Td x6OQIkkzrl1VDD2aIEbTa3vTbjyH7rbshS80TOBA9/jHEa5dtwlHdscLGRQ9QklITHqr iy0KT+PA2l/TeVHumPcY6alVAvGLR0U6e0O1fHo1w19xlx5IzbFcaFOjHZE85OZ5rX2m Ws9Fl5U3hqpwYsh4lmTrHFnklRazQZiHO2BzM2dzreCbV2rZqagW3si42e9oQSU9S/Ee s7fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="IRt2SM/I"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si15674139pjq.23.2021.10.15.09.32.09; Fri, 15 Oct 2021 09:32:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="IRt2SM/I"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235791AbhJOIjR (ORCPT + 99 others); Fri, 15 Oct 2021 04:39:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235726AbhJOIjP (ORCPT ); Fri, 15 Oct 2021 04:39:15 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BECAC061570; Fri, 15 Oct 2021 01:37:09 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id ls18-20020a17090b351200b001a00250584aso8831283pjb.4; Fri, 15 Oct 2021 01:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=CXlRCtGL7o0DzwzbIwbfJ2qRa+xgnxwuo7fjUGe9gzE=; b=IRt2SM/IS0fu266dFWyoQfxvRKB2Ma/1LgkI19fHHKzJqRm59Z/EpaHG9efk/m2e+B GB6HQaso0B6JlLrRasVi+aiQxVF2NwQyeW3V2AhgaBivfMqYS/ZcK02j72tHsjq6m5eU vvuqAK6OVBpBNRGmu0aAcFvi3d/61JxHNB4SWrnCj/qtWbvJPa5FSSG9sfcwbHBoykG6 e8jh9jVkETAkux2aFM8hF7JrrF7f9hMQ0xQxxhZtGELNJS9E4vnrfRwKA56jz633TTlA 6TlszRHraNvY2M2xCTh+eIiUbtWozJiBWKZmm2d5VM/1Dad2s8oNfjqURMG6YgqMQQ7J VxEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=CXlRCtGL7o0DzwzbIwbfJ2qRa+xgnxwuo7fjUGe9gzE=; b=VFFmyutrRGePYcNaYvtMVtzpdEERvusfI8I/9XuSRKqEGoEDKNifzt9mxwZdXStUP7 rYx9rHyQFr1VJ0oaqf2UpUTNErrLmcNcKpIWbuIoWQv0dRBoollbaPi+kUDheBiORWdf 2AZMegh/KMWfrOQyTFWRzowcXIkHwdEdF8SyUbiFgG6ZkJXKVMw0k/hiOEkBT6F0k+6r Ebqe0lgENuX6iyyRsGRU7X5tQK7CXiaDgdplOiWw5KATdoKPOuH6QNtbgSVGtXWEzp6z kP2uq+VGlk/5cnwh75Q5lbhDh0XJ1FDD20O4tf9LZ8QM+QXi1t/VnnexVvCQBbmHTpoc 4GmQ== X-Gm-Message-State: AOAM531yzl84RP5KzjecgQ/rGOz5W6hMwieVkew2/IlWFBxdzw4L4m4F ihkNThGKg85cXx2j6/W1uRG7dKFrzPQ= X-Received: by 2002:a17:90a:bb82:: with SMTP id v2mr26433089pjr.57.1634287028654; Fri, 15 Oct 2021 01:37:08 -0700 (PDT) Received: from Laptop-X1 ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id t9sm10809162pjm.36.2021.10.15.01.37.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 01:37:08 -0700 (PDT) Date: Fri, 15 Oct 2021 16:37:02 +0800 From: Hangbin Liu To: Tianjia Zhang Cc: "David S. Miller" , Jakub Kicinski , Shuah Khan , Boris Pismenny , John Fastabend , Daniel Borkmann , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] selftests/tls: add SM4 GCM/CCM to tls selftests Message-ID: References: <20211008091745.42917-1-tianjia.zhang@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211008091745.42917-1-tianjia.zhang@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tianjia, The new added tls selftest failed with latest net-next in RedHat CKI test env. Would you like to help check if we missed anything? Here is the pipeline page https://datawarehouse.cki-project.org/kcidb/builds/67720 Config URL: http://s3.amazonaws.com/arr-cki-prod-datawarehouse-public/datawarehouse-public/2021/10/14/388570846/redhat:388570846/redhat:388570846_x86_64_debug/.config Build Log URL: http://s3.amazonaws.com/arr-cki-prod-datawarehouse-public/datawarehouse-public/2021/10/14/388570846/redhat:388570846/redhat:388570846_x86_64_debug/build.log TLS test log: https://s3.us-east-1.amazonaws.com/arr-cki-prod-datawarehouse-public/datawarehouse-public/2021/10/14/redhat:388570846/build_x86_64_redhat:388570846_x86_64_debug/tests/1/results_0001/job.01/recipes/10799149/tasks/19/results/1634231959/logs/resultoutputfile.log Command: make -j24 INSTALL_MOD_STRIP=1 targz-pkg Architecture: x86_64 Please tell me if you need any other info. Thanks Hangbin On Fri, Oct 08, 2021 at 05:17:45PM +0800, Tianjia Zhang wrote: > Add new cipher as a variant of standard tls selftests. > > Signed-off-by: Tianjia Zhang > --- > tools/testing/selftests/net/tls.c | 28 ++++++++++++++++++++++++++-- > 1 file changed, 26 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c > index 97fceb9be9ed..d3047e251fe9 100644 > --- a/tools/testing/selftests/net/tls.c > +++ b/tools/testing/selftests/net/tls.c > @@ -29,6 +29,8 @@ struct tls_crypto_info_keys { > union { > struct tls12_crypto_info_aes_gcm_128 aes128; > struct tls12_crypto_info_chacha20_poly1305 chacha20; > + struct tls12_crypto_info_sm4_gcm sm4gcm; > + struct tls12_crypto_info_sm4_ccm sm4ccm; > }; > size_t len; > }; > @@ -49,6 +51,16 @@ static void tls_crypto_info_init(uint16_t tls_version, uint16_t cipher_type, > tls12->aes128.info.version = tls_version; > tls12->aes128.info.cipher_type = cipher_type; > break; > + case TLS_CIPHER_SM4_GCM: > + tls12->len = sizeof(struct tls12_crypto_info_sm4_gcm); > + tls12->sm4gcm.info.version = tls_version; > + tls12->sm4gcm.info.cipher_type = cipher_type; > + break; > + case TLS_CIPHER_SM4_CCM: > + tls12->len = sizeof(struct tls12_crypto_info_sm4_ccm); > + tls12->sm4ccm.info.version = tls_version; > + tls12->sm4ccm.info.cipher_type = cipher_type; > + break; > default: > break; > } > @@ -148,13 +160,13 @@ FIXTURE_VARIANT(tls) > uint16_t cipher_type; > }; > > -FIXTURE_VARIANT_ADD(tls, 12_gcm) > +FIXTURE_VARIANT_ADD(tls, 12_aes_gcm) > { > .tls_version = TLS_1_2_VERSION, > .cipher_type = TLS_CIPHER_AES_GCM_128, > }; > > -FIXTURE_VARIANT_ADD(tls, 13_gcm) > +FIXTURE_VARIANT_ADD(tls, 13_aes_gcm) > { > .tls_version = TLS_1_3_VERSION, > .cipher_type = TLS_CIPHER_AES_GCM_128, > @@ -172,6 +184,18 @@ FIXTURE_VARIANT_ADD(tls, 13_chacha) > .cipher_type = TLS_CIPHER_CHACHA20_POLY1305, > }; > > +FIXTURE_VARIANT_ADD(tls, 13_sm4_gcm) > +{ > + .tls_version = TLS_1_3_VERSION, > + .cipher_type = TLS_CIPHER_SM4_GCM, > +}; > + > +FIXTURE_VARIANT_ADD(tls, 13_sm4_ccm) > +{ > + .tls_version = TLS_1_3_VERSION, > + .cipher_type = TLS_CIPHER_SM4_CCM, > +}; > + > FIXTURE_SETUP(tls) > { > struct tls_crypto_info_keys tls12; > -- > 2.19.1.3.ge56e4f7 >