Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3949426pxf; Tue, 6 Apr 2021 04:34:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1qNebpuLjhlZL6DywSm4PWfY05F4pt7moFb5g3SWDZ1EUvTDYfBlnHwpVZjQ5tyqXPHGs X-Received: by 2002:a17:906:58d6:: with SMTP id e22mr32969766ejs.112.1617708875191; Tue, 06 Apr 2021 04:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617708875; cv=none; d=google.com; s=arc-20160816; b=hFvOE9hx0CxwQVPRU1yxOLhKQ3xW13XJIFDKjIhJXv8afaRIOSPs5DqFiM6FwrGhVT jTKyqvBBixs2SE5xLiCRIl8NT+qANDk3sj263IrdlSJPy31e2/Ak/rfyx8AyHPcx3uwy C5gXxVTLZYZXnZ3H0H621zTULCRuGyIJ+1IhISDFzhCTOwlUrIfr/QGn+iDDvC9P9bls ODSxyqsMVokCiTaGjpxq1y6xeoFI5xq/YL8FZ5EF3VrD096lJtg9r70SS4WdciuGHuXP 3jyyvkKiejtE7TWxbPJ5gVBV+vgHWW/Y6XMJhC6dauZnB1DNrFe63WTRCP7A2nyXS9oj K7HA== 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=2H8bscW4/QkNnb3KjtqWCRH1KhC8UgoXOKNrEQ1QKTA=; b=IzyJmlRTi6fIQW29UPWXcPxW9Pn5EW88lmsVbD7In2dMl4S7SYj3fa40/gbJ5hbahs LMrNyvJRI7fZ1afXouyy1yHLVesraL/9bpwuvahCv7Qycq0/+LQ8JLNIR5UzpTwCrDbS aUXQugsVBJgTDEJvVhtIdEHyvBejBW56tXSZ3cdpUzbohUor/DxtGNmyfrf71UvuqyvW Gn/sGwklbJtb1IPVO8K1En030Ee2KhoQWuyX0g5sOv3bm5eSe4hLARB+NhXw1q022W+C unwQdEx0+MNsZK9r8A1n9e5j2nUrczndf101gzHEOf/0mtzQYz0IjRFq8cYM3fWOC3bz wI9w== 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 n5si15510540eji.285.2021.04.06.04.34.03; Tue, 06 Apr 2021 04:34:35 -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 S238577AbhDFAwS (ORCPT + 99 others); Mon, 5 Apr 2021 20:52:18 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:15599 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237938AbhDFAwS (ORCPT ); Mon, 5 Apr 2021 20:52:18 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FDppH5dlHz18H8f; Tue, 6 Apr 2021 08:49:59 +0800 (CST) Received: from [10.67.103.10] (10.67.103.10) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Tue, 6 Apr 2021 08:52:00 +0800 Subject: Re: [PATCH] crypto: hisilicon/hpre - rsa key should not be empty To: Herbert Xu CC: , , , , , References: <1616739212-7751-1-git-send-email-yumeng18@huawei.com> <20210402071225.GA10423@gondor.apana.org.au> <7384e015-5514-d6b2-4215-beb1f4701adb@huawei.com> <20210402102223.GA24978@gondor.apana.org.au> From: yumeng Message-ID: <639630ef-f0c3-1ccb-983d-0cb9d2ac2952@huawei.com> Date: Tue, 6 Apr 2021 08:51:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20210402102223.GA24978@gondor.apana.org.au> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.10] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org ?? 2021/4/2 18:22, Herbert Xu ะด??: > On Fri, Apr 02, 2021 at 06:16:16PM +0800, yumeng wrote: >> >> I think it is not a real bug, and soft fallback setkey can always catch the >> error. >> But our original intention was to make it don't go to 'xxx_set_pub_key' >> when the key is null, and it can return an error earlier. >> But maybe it is not good. > > It might make sense to check them twice if you were touching them > directly, e.g., poking inside the key. However, it appears that > your driver simply palms off the key to rsa_helper.c which should > check the key/keylen too so I think there is no need for this patch > for now. > > Thanks, > OK, thank you.