From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01182C43463 for ; Fri, 18 Sep 2020 07:11:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C954F20789 for ; Fri, 18 Sep 2020 07:11:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726544AbgIRHLb (ORCPT ); Fri, 18 Sep 2020 03:11:31 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:57522 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726134AbgIRHLb (ORCPT ); Fri, 18 Sep 2020 03:11:31 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1kJAY4-0002wX-Ou; Fri, 18 Sep 2020 17:11:13 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 18 Sep 2020 17:11:12 +1000 Date: Fri, 18 Sep 2020 17:11:12 +1000 From: Herbert Xu To: Meng Yu Cc: davem@davemloft.net, linux-crypto@vger.kernel.org, xuzaibo@huawei.com, wangzhou1@hisilicon.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] crypto: hisilicon/hpre - fix a bug in dh algorithm Message-ID: <20200918071112.GA9883@gondor.apana.org.au> References: <1599737122-20734-1-git-send-email-yumeng18@huawei.com> <1599737122-20734-4-git-send-email-yumeng18@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1599737122-20734-4-git-send-email-yumeng18@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 07:25:22PM +0800, Meng Yu wrote: > > diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c b/drivers/crypto/hisilicon/hpre/hpre_crypto.c > index 0cbe99a1..2d91593 100644 > --- a/drivers/crypto/hisilicon/hpre/hpre_crypto.c > +++ b/drivers/crypto/hisilicon/hpre/hpre_crypto.c > @@ -528,6 +528,8 @@ static int hpre_dh_compute_value(struct kpp_request *req) > ret = hpre_hw_data_init(hpre_req, req->src, req->src_len, 1, 1); > if (unlikely(ret)) > goto clear_all; > + } else { > + msg->in = cpu_to_le64((u64)ctx->dh.dma_g); Why do you need the u64 cast? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt