Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp968050pxj; Fri, 21 May 2021 03:26:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUGOQyAkdNUkVTmEG+5ziCphAzmvpJnaa5FOhHX4eNaTcMaUEPzqq5ozSGCDZlje8o2OUm X-Received: by 2002:a5d:9916:: with SMTP id x22mr10487729iol.160.1621592802672; Fri, 21 May 2021 03:26:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621592802; cv=none; d=google.com; s=arc-20160816; b=H67WQgBIj5cf40GiNZO9tyYkkc5NEb1NurGWuNAbBSLfl/5g33kgRkqe03nAKaA6YI Xi6sWACswQDhHIZSRIME0Vz6mLXSjhNZBfOyNE+ql9BNc6T9iXrXoa/XlCCVc2yiuyOt EsS+FCygkgElDjd2xEpHUjwVXhdrz3eQ0koCwy0F7rzBfONWlz29k6y1uomY1Vtz2Fch EFrr1TWfa/7KTHS4fR0tUd0K/njWLb0wsfJFZAHHQCnWuJ8uvVeNETBgCmnZM35ts7fh ShgirHl18SPo/CQkQDK6lc/EMJ707sXHI/UlQAeI7tfJr1Nbw5Ms+pz8MY0Dc+dzuBBY W2uA== 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:cc:references:to :subject; bh=qd/haH5JbO10LyxOsxc194Xwm7fSGUjppu0EjPB6b+k=; b=1Gj6q6QouLnhubAt0JmvtP4ZndmiuXywTMrWbZCslY9oyHMZY584Zd0r3/sZK0pkEC nhsJJvv2gh3X4EebnworauLwflTKEDnXlL1yYKz4DMaqKEDZDxshUmZkgZ0HkgEhuvLa P67IMZLmGoKdJcbp4bUXcrrZj072lBNhZUiq0Hl+u8N+Ps6L5PWZXHbkBxahi9Lf5xM3 OUYzacvCaKteS2Hf2iKsMcz85ea53HT1k9wIJeNGwZEpL9he/jfSzwTFguOaPvfjWZ94 1WPd7otam2fvxXzgXBKT9PkSrYIt7ACP2RpWVx5Uc2MHhW0N+dMyV2qcOupPK+JZJ3bA sGeA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x99si5207893jah.122.2021.05.21.03.26.26; Fri, 21 May 2021 03:26:42 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236437AbhEUIMH (ORCPT + 99 others); Fri, 21 May 2021 04:12:07 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3611 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236465AbhEUIK2 (ORCPT ); Fri, 21 May 2021 04:10:28 -0400 Received: from dggems701-chm.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FmfK24Z86zQp22; Fri, 21 May 2021 16:04:38 +0800 (CST) Received: from dggemi760-chm.china.huawei.com (10.1.198.146) by dggems701-chm.china.huawei.com (10.3.19.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Fri, 21 May 2021 16:08:10 +0800 Received: from [10.67.101.248] (10.67.101.248) by dggemi760-chm.china.huawei.com (10.1.198.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 21 May 2021 16:08:10 +0800 Subject: Re: [PATCH 1/3] crypto: ecdh - fix 'ecdh_init' To: Herbert Xu References: <1620801602-49287-1-git-send-email-tanghui20@huawei.com> <1620801602-49287-2-git-send-email-tanghui20@huawei.com> <20210521074553.w6qtqv5nnbdbqycx@gondor.apana.org.au> CC: , , , , From: Hui Tang Message-ID: <2a5bcd22-455d-6348-9a72-dc5a7ab49ca6@huawei.com> Date: Fri, 21 May 2021 16:08:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20210521074553.w6qtqv5nnbdbqycx@gondor.apana.org.au> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.101.248] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggemi760-chm.china.huawei.com (10.1.198.146) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 2021/5/21 15:45, Herbert Xu wrote: > On Wed, May 12, 2021 at 02:40:00PM +0800, Hui Tang wrote: >> NIST P192 is not unregistered if failed to register NIST P256, >> actually it need to unregister the algorithms already registered. >> >> Signed-off-by: Hui Tang >> --- >> crypto/ecdh.c | 11 ++++++++++- >> 1 file changed, 10 insertions(+), 1 deletion(-) > > Thanks for catching this. The variable ecdh_nist_p192_registered > is bogus. You should just make it so that if p192 fails to > register then the init function aborts. There would then be > no need to check for the registered state in the exit function. > Okay, I will fix it in next version, and 'ecdsa_init' should do the same thing too? >