From: Herbert Xu Subject: Re: [PATCH 0/7] crypto: caam - RNG4 patches and fixes Date: Fri, 13 Sep 2013 22:23:29 +1000 Message-ID: <20130913122329.GE8579@gondor.apana.org.au> References: <1378742194-32194-1-git-send-email-alexandru.porosanu@freescale.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-crypto@vger.kernel.org, horia.geanta@freescale.com, vakul@freescale.com To: Alex Porosanu Return-path: Received: from ringil.hengli.com.au ([178.18.16.133]:54645 "EHLO fornost.hengli.com.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754840Ab3IMMXd (ORCPT ); Fri, 13 Sep 2013 08:23:33 -0400 Content-Disposition: inline In-Reply-To: <1378742194-32194-1-git-send-email-alexandru.porosanu@freescale.com> Sender: linux-crypto-owner@vger.kernel.org List-ID: On Mon, Sep 09, 2013 at 06:56:27PM +0300, Alex Porosanu wrote: > This patch series attempts to fix some identified issues and add some new > functionalities regarding the RNG4 block in the CAAM driver: > o if the CAAM driver isn't properly instantiated (e.g. RNG4 initialization > fails), then there's an illegal memory access generated by the modules > depending on it; patch 1 in the patch-set fixes this; > o if the CAAM module is removed, the state handles are not uninstantiated; > patch 3 in the patch-set adds the necessary descriptor to uninstantiate > state handle 0; > o the RNG4 block in CAAM needs to be 'seeded' first before being used > for generating pseudo-random data. The 'seeding' is done by getting > entropy from the TRNG ring oscillator. The RTFRQMAX register controls > the maximum allowable number of samples that can be acquired during > an entropy sample. Depending on the clock at which the RNG4 block > (and for that matter the SEC block) runs, it's possible that a > hard-coded value for the maximum frequency is inadequate, i.e. more > samples than needed are taken. This leads to failures on devices > like BSC913x. Patch number 2 fixes this issue by using a kind of > a software loop to increase the maximum number of samples taken > until the state handle can be properly initialized; o there are two > state handles present in the RNG4 block and only one > is initialized; patch 5 in the patch-set fixes this issue, also > adding the necessary code for deinstantiation only the handles that were > instantiated by the driver. All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt