From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heinrich Schuchardt Date: Thu, 25 Jan 2018 17:53:21 +0100 Subject: [U-Boot] [PATCH] crypto/fsl: instantiate all rng state handles In-Reply-To: References: <20180125131117.21077-1-lukas.auer@aisec.fraunhofer.de> Message-ID: <494b7167-73e2-3e2d-b5cd-5ec9e13d53fc@gmx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de On 01/25/2018 04:53 PM, Bryan O'Donoghue wrote: > > > On 25/01/18 13:11, Lukas Auer wrote: >> Extend the instantiate_rng() function and the corresponding CAAM job >> descriptor to instantiate all RNG state handles. This moves the RNG >> instantiation code in line with the CAAM kernel driver. >> >> Previously, only the first state handle was instantiated. The second one >> was instantiated by the CAAM kernel driver. This works if the kernel >> runs in secure mode, but fails in non-secure mode since the kernel >> driver uses DEC0 directly instead of over the job ring interface. >> Instantiating all RNG state handles in u-boot removes the need for using >> DEC0 in the kernel driver, making it possible to use the CAAM in >> non-secure mode. >> >> Signed-off-by: Lukas Auer > > git apply < \[PATCH\]\ crypto_fsl\:\ instantiate\ all\ rng\ state\ > handles.eml > :107: trailing whitespace. > void inline_cnstr_jobdesc_rng_instantiation(uint32_t *desc, int handle) > :130: trailing whitespace. >             (handle << OP_ALG_AAI_SHIFT) | OP_ALG_AS_INIT); > :131: trailing whitespace. > > :132: trailing whitespace. >     /* For SH0, Secure Keys must be generated as well */ > :133: trailing whitespace. >     if (handle == 0) { > error: patch failed: drivers/crypto/fsl/jobdesc.c:257 > error: drivers/crypto/fsl/jobdesc.c: patch does not apply > error: patch failed: drivers/crypto/fsl/jobdesc.h:40 > error: drivers/crypto/fsl/jobdesc.h: patch does not apply > error: patch failed: drivers/crypto/fsl/jr.c:444 > error: drivers/crypto/fsl/jr.c: patch does not apply > error: patch failed: drivers/crypto/fsl/jr.h:40 > error: drivers/crypto/fsl/jr.h: patch does not apply > error: patch failed: include/fsl_sec.h:67 > error: include/fsl_sec.h: patch does not apply The patch provided by Lukas is applicable to git HEAD (fb4413295c765aa8c013650984dc2d908964c81d). File MAINTAINERS does not indicate another git repository for drivers/crypto/fsl/jobdesc.c. Pleae, rebase your local repository. Best regards Heinrich > > git show HEAD > commit c761a7e29d703d60208585bb7d8415e00aa22556 > Author: Tom Rini > Date:   Mon Jan 22 21:06:41 2018 -0500 > >     Revert "travis-ci: Add qemu-x86_64 target" > >