Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3692456ybv; Mon, 10 Feb 2020 04:48:59 -0800 (PST) X-Google-Smtp-Source: APXvYqz4aLkjGEx3n6+nx97PvTj2HbIWZz8oCRVRELlxZkACQ1N8Nw8JQSK+JxMo+4vRvOz0qyBe X-Received: by 2002:a05:6830:10d5:: with SMTP id z21mr990815oto.30.1581338939165; Mon, 10 Feb 2020 04:48:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581338939; cv=none; d=google.com; s=arc-20160816; b=KIY8l5hY8DBdCopJlalpHC9IwPX+yoVk744g0j18AKS8CVsKp0obgh3rfiuyVoAbJg BRH69oIczzUOrZH9B1hu7LXVmW5vPbka+u+dXyDBlgCjBX9DWjexz52bUTl6Mup/L44d PptY5UI1j3/ASVVX/sdjkvJUJ5Qt6LBYfq5rZWznHpuUmarRFtvVU7RaWGNichV7yFTT GFLBk91nG0pbdBwbbcWZMbZy5gUCLHXCciSPjht4VfdV475DwtLc87HmcON8jsZC/whI kLD73M+aZ/78nu4A8BjCoAfHRMWEq58xoRcGBHwIXuWKjXABMcV1HCegyzrY61mOgRis 7WRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=4a0vWv8F4DhwxYsMcsHf7MJ3rRIFWcuT/B0yRkFO3yw=; b=N9BbGuIp4ALjZRBfI3s/XM+9z0bmweN4FqJfZ1JhI9pHpuQeKSjbgaJOCMqbKr+9dA tM8vZhUc1Y/dF4jScvrdfTEfNg2yIc+gQ0a9bgaR3NohBLugVzErBsI28vWyYKBqjGT6 FYF4XqEpzWgLr/k37iMCeXEVIjQwFA98oasobdGItPNGBpuJiAPRT1a2/Bxvj1MLPzt3 jZ8ASFv7+kzzH2AgK+aOdKxpyW30NxHxaTgamGVRRjsKEnrgsWJF/A4ubFq/PUo35mgG LT6kQNQS/Hbt44x/4TB/gHlBZR8MG6QU7UD7pFDaLUh1x0cZCVKtfJN3oqOL5Jsl9qIb iqvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id d28si133404otc.123.2020.02.10.04.48.47; Mon, 10 Feb 2020 04:48:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730873AbgBJMru (ORCPT + 99 others); Mon, 10 Feb 2020 07:47:50 -0500 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:60893 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730700AbgBJMou (ORCPT ); Mon, 10 Feb 2020 07:44:50 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R481e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04446;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0Tpbr4vV_1581338685; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0Tpbr4vV_1581338685) by smtp.aliyun-inc.com(127.0.0.1); Mon, 10 Feb 2020 20:44:45 +0800 From: Tianjia Zhang To: herbert@gondor.apana.org.au, davem@davemloft.net, zohar@linux.ibm.com, dmitry.kasatkin@gmail.com, jmorris@namei.org, serge@hallyn.com, ebiggers@kernel.org Cc: linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ima: add sm3 algorithm to hash algorithm configuration list Date: Mon, 10 Feb 2020 20:44:40 +0800 Message-Id: <20200210124440.23929-3-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200210124440.23929-1-tianjia.zhang@linux.alibaba.com> References: <20200210124440.23929-1-tianjia.zhang@linux.alibaba.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sm3 has been supported by the ima hash algorithm, but it is not yet in the Kconfig configuration list. After adding, both ima and tpm2 can support sm3 well. Signed-off-by: Tianjia Zhang --- security/integrity/ima/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig index 838476d780e5..ace6762c1cf1 100644 --- a/security/integrity/ima/Kconfig +++ b/security/integrity/ima/Kconfig @@ -112,6 +112,10 @@ choice config IMA_DEFAULT_HASH_WP512 bool "WP512" depends on CRYPTO_WP512=y && !IMA_TEMPLATE + + config IMA_DEFAULT_HASH_SM3 + bool "SM3" + depends on CRYPTO_SM3=y && !IMA_TEMPLATE endchoice config IMA_DEFAULT_HASH @@ -121,6 +125,7 @@ config IMA_DEFAULT_HASH default "sha256" if IMA_DEFAULT_HASH_SHA256 default "sha512" if IMA_DEFAULT_HASH_SHA512 default "wp512" if IMA_DEFAULT_HASH_WP512 + default "sm3" if IMA_DEFAULT_HASH_SM3 config IMA_WRITE_POLICY bool "Enable multiple writes to the IMA policy" -- 2.17.1