Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp170437pxb; Mon, 25 Oct 2021 06:07:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgddTtPsIWu0tWpHfMXBmuS32TVgHBj0pZWOxpbMHp8q9Hu28WFJKDWAMZxsanQhtjQIlW X-Received: by 2002:a63:f34c:: with SMTP id t12mr3383109pgj.70.1635167258677; Mon, 25 Oct 2021 06:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635167258; cv=none; d=google.com; s=arc-20160816; b=Kwj2HUNT5g/D+HPU+Uc2NsgqNIq0k65mmfp8OGKJcSNyCpqp+2fUeLOJs2BUzkV95J aJCcLHAzaJkF2kgHfYPVr7iL/p6YeLCblsCNCp2w08Y/g4ODNRbHwUcSa62FN7lMDOnn YBZGUBH8EIACHvhKi+F5Mbo2eAQevuYMjCtar1dZLw+uYF95/OQUtLeNfbiIgGRoAt3Z +5gmijulIif8SDvkPXy/Rvl9hUyJipxoDuw44dP5dZqHiIJE3S44Mw9eOUAvmc0YcVG4 tqj5/FDzHvBBNrqwegb/IRn64xrpFJqco3ZGX3RWoFczIPIGQ99+kqkwsJcqjFkZ49lw +I+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=pLqAkB7e884BHF3nnEFDhtnHI4ST50aMBQpZCAYEKXc=; b=z7J9fBfbaAAL4HIiMk8H4yPIir4u3IHX5O3BejWYfLAOTfII1h3HdXHyKdxQKFtyRk ocxuFk7vLekwPnrCZ8ZrQYVPSF+qoAc7oIEEK9EbYddoBgFcw5AB7xYTrc5I++dESnRm byluXmcJp5dH7zNg5+liN99J7GVYzMmUz9dXm9C2iIqDr+TPAeTsVNlWuV7R2itD5Iip jPFeSxKZUCwRk+AGeJxpTnljyILoYtY8+IO4QX6eszv3gxVAQFPr6lneP8g32JlbAIY9 mPRY+NGxu5Jd7jRiTOcCTQ9LjqMEQ8Iw0oHN2Rss107bdUJbr0Sz2wz2J1WXFTvI+nwD Ntvw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h126si25013759pgc.276.2021.10.25.06.07.23; Mon, 25 Oct 2021 06:07:38 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233400AbhJYNHF (ORCPT + 99 others); Mon, 25 Oct 2021 09:07:05 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:58934 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233340AbhJYNHE (ORCPT ); Mon, 25 Oct 2021 09:07:04 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R791e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UtcfbEE_1635167079; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0UtcfbEE_1635167079) by smtp.aliyun-inc.com(127.0.0.1); Mon, 25 Oct 2021 21:04:40 +0800 From: Tianjia Zhang To: "David S. Miller" , Jakub Kicinski , Boris Pismenny , John Fastabend , Daniel Borkmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tianjia Zhang Subject: [PATCH] net/tls: tls_crypto_context add supported algorithms context Date: Mon, 25 Oct 2021 21:04:39 +0800 Message-Id: <20211025130439.92746-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.3.ge56e4f7 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tls already supports the SM4 GCM/CCM algorithms. It is also necessary to add support for these two algorithms in tls_crypto_context to avoid potential issues caused by forced type conversion. Signed-off-by: Tianjia Zhang --- include/net/tls.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net/tls.h b/include/net/tls.h index b6d40642afdd..adab19a8aed7 100644 --- a/include/net/tls.h +++ b/include/net/tls.h @@ -221,6 +221,8 @@ union tls_crypto_context { struct tls12_crypto_info_aes_gcm_128 aes_gcm_128; struct tls12_crypto_info_aes_gcm_256 aes_gcm_256; struct tls12_crypto_info_chacha20_poly1305 chacha20_poly1305; + struct tls12_crypto_info_sm4_gcm sm4_gcm; + struct tls12_crypto_info_sm4_ccm sm4_ccm; }; }; -- 2.19.1.3.ge56e4f7