Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3709209iob; Mon, 2 May 2022 03:46:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW2bIAYj+y8iGHjyi4OvuvWkcvXblm/wFj3y/R8EitdaTaMp6V95TFjS9MiKF69AG4m5iz X-Received: by 2002:a62:bd14:0:b0:50d:4bec:ff78 with SMTP id a20-20020a62bd14000000b0050d4becff78mr10470837pff.71.1651488417773; Mon, 02 May 2022 03:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651488417; cv=none; d=google.com; s=arc-20160816; b=Ovny4mNU/gqwhDSRHkSwzqgcZ4VuAdZyhxvz67QZO8ysNoAiz6Vce/1qbKndH4/Y8a F0hedBkhXpPxXT9eoVWRRmS3dM72yaPwRZFsrtJq3JXhX9/XejW35q9udhzZaEzOicvi vwaJ90iJp4zfjLvzkfa+1PwohaE5zzS6g7TCCMUxBkwfL98s661mmZcjU9wqh9XJXwST GDxeHtmdX96L42rGWkEztWKquOebYW5HNC/IelxokTglzCUgZdG4WdoiR0BiFC/YNW0P 5raReFYeUd+B7+QavZiEyGfXTd6oPstaNYMcf717yL7zzzP4raEAuEfelUgLsqY2nBHC t+sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=33yiyHFpX6o+sodgjlledid4n18prW1CwrSCdcKZIvY=; b=Vx0Vp5Bion7TdILo9NVcH8j9URUABAoXEWwFoOFts2tJexD77WDXSTLw0s1pDEJF+6 KbOoTEIBhsWK/ji8aoNPSLpjwz0AJRNFTeoXvG2wP8s//TxBG7TXfaOjdrKTFgCJlNP0 uhZGNJE13cHuixw2XBT8g2p+zbTSvh/njMWps81UFVkVu4pvS0IAyafUxzWNH/rX0CSH dvAIf/CTjVr8a+PTTU3OtJ8Q/VoU1gnkvlLkWPhKlAu2q8M5gHN3DKx8X/J5P7nfatXh gArVzr8FEh+VeFRa7dBpweQhSAJBmm/r2k2B8AoPhMOqlfxDlIlPwoj9b6mUDx7f2tIB 7zWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go4-20020a17090b03c400b001bfb0db0879si16763210pjb.88.2022.05.02.03.46.31; Mon, 02 May 2022 03:46:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349485AbiD2Fxa (ORCPT + 99 others); Fri, 29 Apr 2022 01:53:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349487AbiD2Fx3 (ORCPT ); Fri, 29 Apr 2022 01:53:29 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38D80614E; Thu, 28 Apr 2022 22:50:11 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1nkJVy-00896R-7Y; Fri, 29 Apr 2022 15:50:03 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 29 Apr 2022 13:50:02 +0800 Date: Fri, 29 Apr 2022 13:50:02 +0800 From: Herbert Xu To: Fabio Estevam Cc: horia.geanta@nxp.com, gaurav.jain@nxp.com, V.Sethi@nxp.com, linux-crypto@vger.kernel.org, Fabio Estevam , stable@vger.kernel.org Subject: Re: [PATCH v5] crypto: caam - fix i.MX6SX entropy delay value Message-ID: References: <20220420120601.1015362-1-festevam@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220420120601.1015362-1-festevam@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Apr 20, 2022 at 09:06:01AM -0300, Fabio Estevam wrote: > From: Fabio Estevam > > Since commit 358ba762d9f1 ("crypto: caam - enable prediction resistance > in HRWNG") the following CAAM errors can be seen on i.MX6SX: > > caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG: Hardware error > hwrng: no data available > > This error is due to an incorrect entropy delay for i.MX6SX. > > Fix it by increasing the minimum entropy delay for i.MX6SX > as done in U-Boot: > https://patchwork.ozlabs.org/project/uboot/patch/20220415111049.2565744-1-gaurav.jain@nxp.com/ > > As explained in the U-Boot patch: > > "RNG self tests are run to determine the correct entropy delay. > Such tests are executed with different voltages and temperatures to identify > the worst case value for the entropy delay. For i.MX6SX, it was determined > that after adding a margin value of 1000 the minimum entropy delay should be > at least 12000." > > Cc: > Fixes: 358ba762d9f1 ("crypto: caam - enable prediction resistance in HRWNG") > Signed-off-by: Fabio Estevam > Reviewed-by: Horia Geantă > --- > Changes since v4: > - Change the function name to needs_entropy_delay_adjustment() - Vabhav > - Improve the commit log by adding the explanation from the U-Boot > patch - Vabhav > > drivers/crypto/caam/ctrl.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt