Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp238297pxb; Sat, 20 Feb 2021 01:50:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIekftCVOQx/Ke8PKlzjMqUGgooqIDnB1yF+QbpG3lDkn/ngzhBPEB+xvpGKt/pIakZOgF X-Received: by 2002:aa7:c2cc:: with SMTP id m12mr13106319edp.72.1613814637532; Sat, 20 Feb 2021 01:50:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613814637; cv=none; d=google.com; s=arc-20160816; b=shKPkgGsw8GVbbElwEbrOXIPa2KxxU09SFjTLkqZSELxqI7fj4GvpvLmX4YsPWFea4 Vm5UVu4uVndA+Bzu+q6LuY+EckjPsetQcjF9UM5o1K1oV4bW5zQ1xI3O8TJktsgwm2Tt Lc3BmRdzmDmGig/ibK2G6XC/YLvQxm7aGc2kJK/0+x1HENlVbkezxlP4U7IPxl7wg+mS yQ06Z0cvOzCMobpvRwTiAosAH9QbCTwvtISwhmES6d5z+w8+f3uvpKr+KEyyXbJkqhWF hDZLQD6aNU1r0m1P610e/E3zrkhrqIT/y75esl2g55gUijkVuqdSG2GsSGIStT1ewRXX jd/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=mDc/9rmBExRo86yiYCRceZr/hFyHALp9+4WEVAOGn0E=; b=MZy9jh+FVT5OrV4ijhYn34l//S4UaRJyNi8YJRw4ZMQbd1wGkHpZ9zmxMB62VJW4/V 94KdzdjhGRjf2X/fcO10ZEPmBLMirs622sWpixI9wjMdK4dVzNjAXYvefGFZA+nEifz1 pwfJ7+6RrecOGm5df/SpjaQbK6inkKzW9C2EVEV+3igHsZpD2j9U2AbHpv9YbZtTgZKs HDa1pvPRdASNsvHWgtKcxLE9I/c1m3Zp0d7MuqMGIjEYCzNHXewHoVIeVPkFv3/49N+L VFgA869MtZbzYiaZc7NyG3slliEkS+C8W5FzJo6DKloEyI7BBUbqzGIW192lp5KC7yy/ 27Kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si8835711ejb.681.2021.02.20.01.49.57; Sat, 20 Feb 2021 01:50:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229657AbhBTJs1 (ORCPT + 99 others); Sat, 20 Feb 2021 04:48:27 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:12986 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbhBTJs0 (ORCPT ); Sat, 20 Feb 2021 04:48:26 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DjNqk29NDzjQNd; Sat, 20 Feb 2021 17:46:10 +0800 (CST) Received: from [10.67.102.118] (10.67.102.118) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.498.0; Sat, 20 Feb 2021 17:47:35 +0800 Subject: Re: [PATCH v2 3/3] crypto: hisilicon/sec - fixes shash test error To: Herbert Xu CC: , , , References: <1612692280-11386-1-git-send-email-liulongfang@huawei.com> <1612692280-11386-4-git-send-email-liulongfang@huawei.com> <20210210064328.GA15849@gondor.apana.org.au> <0afaed85-eeb0-236c-817f-a0f9cf02c65a@huawei.com> <20210218020647.GB30659@gondor.apana.org.au> From: liulongfang Message-ID: Date: Sat, 20 Feb 2021 17:47:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20210218020647.GB30659@gondor.apana.org.au> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.118] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 2021/2/18 10:06, Herbert Xu wrote: > On Thu, Feb 18, 2021 at 10:01:58AM +0800, liulongfang wrote: >> >>>> diff --git a/drivers/crypto/hisilicon/sec2/sec_crypto.c b/drivers/crypto/hisilicon/sec2/sec_crypto.c >>>> index d2c4a2c..988faf7 100644 >>>> --- a/drivers/crypto/hisilicon/sec2/sec_crypto.c >>>> +++ b/drivers/crypto/hisilicon/sec2/sec_crypto.c >>>> @@ -7,6 +7,7 @@ >>>> #include >>>> #include >>>> #include >>>> +#include >>> >>> Please explain what exactly in this file needs this header file. >>> >>> As it stands you could just be hiding real bugs. >>> >>> Thanks, >>> >> The crypto_alloc_shash() interface in the header file >> will be used in the function sec_aead_ctx_init(), >> If this header file is not added, calling the interface >> crypto_alloc_shash() during the initialization of the >> aead algorithm will return an error. > > This makes no sense whatsoever as crypto_alloc_shash is defiend > by crypto/hash.h and you've already included that. > > Cheers, > On this kernel version, those modules set to Y will not use the sha512 algorithm. And our SEC module selects it "select CRYPTO_SHA512", so it is compiled into ko: "sha512_generic.ko". Because we did not load the "sha512_generic.ko" when we loaded the ko of SEC, the sha512 algorithm test failed, Therefore, before using SEC, we need to load this ko first, so this patch is not required, please ignore it. Thanks Longfang.