Re: [PATCH v12 00/11] Appended signatures support for IMA appraisal

2019-07-03 Thread Thiago Jung Bauermann
Mimi Zohar writes: > On Thu, 2019-06-27 at 23:19 -0300, Thiago Jung Bauermann wrote: >> Hello, >> >> This version is essentially identical to the last one. >> >> It is only a rebase on top of today's linux-integrity/next-queued-testing, >> prompted by conflicts with Prakhar Srivastava's patch

Re: [PATCH v12 01/11] MODSIGN: Export module signature definitions

2019-07-03 Thread Thiago Jung Bauermann
Jessica Yu writes: > +++ Thiago Jung Bauermann [27/06/19 23:19 -0300]: >>IMA will use the module_signature format for append signatures, so export >>the relevant definitions and factor out the code which verifies that the >>appended signature trailer is valid. >> >>Also, create a CONFIG_MODULE_

Re: [PATCH v4 03/16] crypto: caam - move tasklet_init() call down

2019-07-03 Thread Leonard Crestez
On 7/3/2019 8:14 PM, Andrey Smirnov wrote: > On Wed, Jul 3, 2019 at 6:51 AM Leonard Crestez > wrote: >> On 7/3/2019 11:14 AM, Andrey Smirnov wrote: >>> Move tasklet_init() call further down in order to simplify error path >>> cleanup. No functional change intended. >>> >>> diff --git a/drivers/cr

testmgr question

2019-07-03 Thread Pascal Van Leeuwen
Hi, I'm currently busy adding support for some AES-CTR based authenticated encryption suites to the inside-secure driver, and I got the distinct impression they were silently not getting tested at all. Looking at testmgr.c, I noticed that they point to alg_test_null, confirming my suspicion. I

Re: [PATCH] crypto: user - prevent operating on larval algorithms

2019-07-03 Thread Michal Suchánek
On Wed, 3 Jul 2019 13:31:29 -0700 Eric Biggers wrote: > Hi Michal, > > On Wed, Jul 03, 2019 at 10:21:08PM +0200, Michal Suchánek wrote: > > On Wed, 3 Jul 2019 22:30:57 +0800 > > Herbert Xu wrote: > > > > > On Tue, Jul 02, 2019 at 02:17:00PM -0700, Eric Biggers wrote: > > > > From: Eric Big

Re: [PATCH] crypto: user - prevent operating on larval algorithms

2019-07-03 Thread Eric Biggers
Hi Michal, On Wed, Jul 03, 2019 at 10:21:08PM +0200, Michal Suchánek wrote: > On Wed, 3 Jul 2019 22:30:57 +0800 > Herbert Xu wrote: > > > On Tue, Jul 02, 2019 at 02:17:00PM -0700, Eric Biggers wrote: > > > From: Eric Biggers > > > > > > Michal Suchanek reported [1] that running the pcrypt_aead

Re: [PATCH] crypto: user - prevent operating on larval algorithms

2019-07-03 Thread Michal Suchánek
On Wed, 3 Jul 2019 22:30:57 +0800 Herbert Xu wrote: > On Tue, Jul 02, 2019 at 02:17:00PM -0700, Eric Biggers wrote: > > From: Eric Biggers > > > > Michal Suchanek reported [1] that running the pcrypt_aead01 test from > > LTP [2] in a loop and holding Ctrl-C causes a NULL dereference of > > alg-

[PATCH] crypto: ccp - memset structure fields to zero before reuse

2019-07-03 Thread Hook, Gary
The AES GCM function reuses an 'op' data structure, which members contain values that must be cleared for each (re)use. Fixes: 36cf515b9bbe ("crypto: ccp - Enable support for AES GCM on v5 CCPs") Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-ops.c | 12 +++- 1 file changed, 11

Re: crypto: x86/crct10dif-pcl - cleanup and optimizations

2019-07-03 Thread Nick Desaulniers
On Wed, Jul 3, 2019 at 9:15 AM Eric Biggers wrote: > Sorry, I am still confused. Are you saying that something still needs to be > fixed in the kernel code, and if so, why? To reiterate, the byteshift_table > doesn't actually *need* any particular alignment. Would it avoid the > confusion > if

Re: [PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Michael S. Tsirkin
On Thu, Jul 04, 2019 at 12:27:08AM +0800, Fuqian Huang wrote: > kmemdup is introduced to duplicate a region of memory in a neat way. > Rather than kmalloc/kzalloc + memcpy, which the programmer needs to > write the size twice (sometimes lead to mistakes), kmemdup improves > readability, leads to sm

Re: [RFC/RFT PATCH] crypto: aes/generic - use unaligned loads to eliminate 50% of lookup tables

2019-07-03 Thread Ard Biesheuvel
On Wed, 3 Jul 2019 at 15:25, Herbert Xu wrote: > > Ard Biesheuvel wrote: > > > > +config CRYPTO_AES_REDUCED_TABLES > > + bool "Use reduced AES table set" > > + depends on CRYPTO_AES && HAVE_EFFICIENT_UNALIGNED_ACCESS > > + default y > > + help > > + Use a set of AE

Re: [PATCH v4 03/16] crypto: caam - move tasklet_init() call down

2019-07-03 Thread Andrey Smirnov
On Wed, Jul 3, 2019 at 6:51 AM Leonard Crestez wrote: > > On 7/3/2019 11:14 AM, Andrey Smirnov wrote: > > Move tasklet_init() call further down in order to simplify error path > > cleanup. No functional change intended. > > > > diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c > > i

Re: [PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Horia Geanta
On 7/3/2019 7:27 PM, Fuqian Huang wrote: > kmemdup is introduced to duplicate a region of memory in a neat way. > Rather than kmalloc/kzalloc + memcpy, which the programmer needs to > write the size twice (sometimes lead to mistakes), kmemdup improves > readability, leads to smaller code and also r

[PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use

Re: crypto: x86/crct10dif-pcl - cleanup and optimizations

2019-07-03 Thread Eric Biggers
Hi Sedat, On Wed, Jul 03, 2019 at 05:16:40PM +0200, Sedat Dilek wrote: > > Hi Eric, Hi Nick, > > I am building Linux v5.1.16 with a new llvm-toolchain including the fix for > LLD: > > "[ELF] Allow placing SHF_MERGE sections with different alignments into > the same MergeSyntheticSection" > >

Re: [net/tls] Re: KMSAN: uninit-value in aesti_encrypt

2019-07-03 Thread Eric Biggers
On Thu, Jun 27, 2019 at 12:01:23PM -0700, Eric Biggers wrote: > On Thu, Jun 27, 2019 at 11:19:51AM -0700, John Fastabend wrote: > > Eric Biggers wrote: > > > [+TLS maintainers] > > > > > > Very likely a net/tls bug, not a crypto bug. > > > > > > Possibly a duplicate of other reports such as "KMSA

Re: crypto: x86/crct10dif-pcl - cleanup and optimizations

2019-07-03 Thread Sedat Dilek
On Mon, Jun 17, 2019 at 8:23 PM Eric Biggers wrote: > > On Mon, Jun 17, 2019 at 11:06:21AM -0700, Nick Desaulniers wrote: > > On Mon, Jun 17, 2019 at 6:35 AM Sedat Dilek wrote: > > > > > > Hi, > > > > > > while digging through a ClangBuiltLinux issue when linking with LLD > > > linker on x86-64 I

Re: [PATCH] crypto: user - prevent operating on larval algorithms

2019-07-03 Thread Herbert Xu
On Tue, Jul 02, 2019 at 02:17:00PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Michal Suchanek reported [1] that running the pcrypt_aead01 test from > LTP [2] in a loop and holding Ctrl-C causes a NULL dereference of > alg->cra_users.next in crypto_remove_spawns(), via crypto_del_alg(). >

Re: [PATCH] crypto: cryptd - Fix skcipher instance memory leak

2019-07-03 Thread Herbert Xu
Vincent Whitchurch wrote: > cryptd_skcipher_free() fails to free the struct skcipher_instance > allocated in cryptd_create_skcipher(), leading to a memory leak. This > is detected by kmemleak on bootup on ARM64 platforms: > > unreferenced object 0x80003377b180 (size 1024): > comm "cryptomg

Re: [PATCH v2 05/27] crypto: remove memset after dma_alloc_coherent

2019-07-03 Thread Herbert Xu
On Fri, Jun 28, 2019 at 10:46:31AM +0800, Fuqian Huang wrote: > In commit af7ddd8a627c > ("Merge tag 'dma-mapping-4.21' of > git://git.infradead.org/users/hch/dma-mapping"), > dma_alloc_coherent has already zeroed the memory. > So memset is not needed. > > Signed-off-by: Fuqian Huang > --- > dr

Re: [PATCH 0/2] crypto: stm32/hash: Fix bug in hmac mode

2019-07-03 Thread Herbert Xu
On Fri, Jun 28, 2019 at 01:26:53PM +0200, Lionel Debieve wrote: > This series fixes issues discovered while using libkcapi library. Some > more tests show wrong key management in hmac mode. It is fixes by these > patches and prevent a potential issue in case of interrupt while processing > in dma

Re: [PATCH 1/1] crypto: stm32/crc32 - rename driver file

2019-07-03 Thread Herbert Xu
On Fri, Jun 28, 2019 at 01:26:41PM +0200, Lionel Debieve wrote: > Use the same naming convention for all stm32 crypto > drivers. > > Signed-off-by: Lionel Debieve > --- > drivers/crypto/stm32/Makefile | 2 +- > drivers/crypto/stm32/{stm32_crc32.c => stm32-crc32.c} | 0 >

Re: [PATCH] crypto: ccp - Switch to SPDX license identifiers

2019-07-03 Thread Herbert Xu
On Thu, Jun 27, 2019 at 04:23:29PM +, Hook, Gary wrote: > Add an SPDX identifier and remove any specific statements. > > Signed-off-by: Gary R Hook > --- > drivers/crypto/ccp/ccp-crypto-aes-cmac.c |5 + > drivers/crypto/ccp/ccp-crypto-aes-galois.c |5 + > drivers/crypto/ccp

Re: [PATCH v2] crypto: ccp - Validate the the error value used to index error messages

2019-07-03 Thread Herbert Xu
On Thu, Jun 27, 2019 at 04:16:23PM +, Hook, Gary wrote: > The error code read from the queue status register is only 6 bits wide, > but we need to verify its value is within range before indexing the error > messages. > > Fixes: 81422badb3907 ("crypto: ccp - Make syslog errors human-readable")

Re: [PATCH v2 0/2] Clean up crypto documentation

2019-07-03 Thread Herbert Xu
On Tue, Jun 25, 2019 at 11:43:36PM +, Hook, Gary wrote: > Tidy up the crypto documentation by filling in some variable > descriptions, make some grammatical corrections, and enhance > formatting. > > Changes since v1: > - Remove patch with superfluous change to index (patch 2) > - Remove unn

Re: [PATCH 0/2] crypto: arm64/aes-ce - implement 5-way interleave for some modes

2019-07-03 Thread Herbert Xu
On Mon, Jun 24, 2019 at 07:38:29PM +0200, Ard Biesheuvel wrote: > As it turns out, even a 4-way interleave is not sufficient to saturate > the ThunderX2 pipeline with AES instructions, so this series implements > 5-way interleave for modes that can be modified without running out of > registers to

Re: [PATCH v5 0/4] *** SUBJECT HERE ***

2019-07-03 Thread Herbert Xu
On Mon, Jun 24, 2019 at 07:20:13AM +, Christophe Leroy wrote: > This series is the last set of fixes for the Talitos driver. > > We now get a fully clean boot on both SEC1 (SEC1.2 on mpc885) and > SEC2 (SEC2.2 on mpc8321E) with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS: > > [3.385197] bus: 'platf

crypto: stm32/hash - Fix incorrect printk modifier for size_t

2019-07-03 Thread Herbert Xu
This patch fixes a warning when compiling stm32 because %d is being used on a size_t argument instead of %zd. Signed-off-by: Herbert Xu diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c index 33a0612efa57..7c81f0f234ae 100644 --- a/drivers/crypto/stm32/stm32-has

Re: [PATCH v3 27/30] crypto: des - split off DES library from generic DES cipher driver

2019-07-03 Thread Herbert Xu
On Fri, Jun 28, 2019 at 11:35:26AM +0200, Ard Biesheuvel wrote: > > static int des_setkey(struct crypto_tfm *tfm, const u8 *key, > unsigned int keylen) > { > struct des_ctx *dctx = crypto_tfm_ctx(tfm); > - u32 *flags = &tfm->crt_flags; > - u32 tmp[DES_EXPKEY_WORD

Re: [PATCH v4 02/16] crypto: caam - simplify clock initialization

2019-07-03 Thread Leonard Crestez
On 7/3/2019 11:14 AM, Andrey Smirnov wrote: > Simplify clock initialization code by converting it to use clk-bulk, > devres and soc_device_match() match table. No functional change > intended. > > Signed-off-by: Andrey Smirnov Reviewed-by: Leonard Crestez This data-driven approach is much easi

Re: [PATCH v4 03/16] crypto: caam - move tasklet_init() call down

2019-07-03 Thread Leonard Crestez
On 7/3/2019 11:14 AM, Andrey Smirnov wrote: > Move tasklet_init() call further down in order to simplify error path > cleanup. No functional change intended. > > diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c > index 4b25b2fa3d02..a7ca2bbe243f 100644 > --- a/drivers/crypto/caam/j

[PATCH] Crypto: aegis128l: fix a coding stlye issue

2019-07-03 Thread Fatih ALTINPINAR
From: Fatih ALTINPINAR Fixed a coding style issue. Removed curly brackets of an one line for statement. Signed-of-by: Fatih ALTINPINAR --- crypto/aegis128l.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/aegis128l.c b/crypto/aegis128l.c index 9bca3d619a22..6c70e7

Re: [RFC/RFT PATCH] crypto: aes/generic - use unaligned loads to eliminate 50% of lookup tables

2019-07-03 Thread Herbert Xu
Ard Biesheuvel wrote: > > +config CRYPTO_AES_REDUCED_TABLES > + bool "Use reduced AES table set" > + depends on CRYPTO_AES && HAVE_EFFICIENT_UNALIGNED_ACCESS > + default y > + help > + Use a set of AES lookup tables that is only half the size, but > + uses u

[PATCH 05/30] crypto: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use

[PATCH v4 3/7] crypto: aegis128 - drop empty TFM init/exit routines

2019-07-03 Thread Ard Biesheuvel
TFM init/exit routines are optional, so no need to provide empty ones. Reviewed-by: Ondrej Mosnacek Signed-off-by: Ard Biesheuvel --- crypto/aegis128.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/crypto/aegis128.c b/crypto/aegis128.c index d78f77fc5dd1..32840d5e7f65 100644 -

[PATCH v4 7/7] crypto: tcrypt - add a speed test for AEGIS128

2019-07-03 Thread Ard Biesheuvel
Reviewed-by: Ondrej Mosnacek Signed-off-by: Ard Biesheuvel --- crypto/tcrypt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 798253f05203..72dc84e1c647 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -2332,6 +2332,13 @@ static int do_tes

[PATCH v4 6/7] crypto: aegis128 - provide a SIMD implementation based on NEON intrinsics

2019-07-03 Thread Ard Biesheuvel
Provide an accelerated implementation of aegis128 by wiring up the SIMD hooks in the generic driver to an implementation based on NEON intrinsics, which can be compiled to both ARM and arm64 code. This results in a performance of 2.2 cycles per byte on Cortex-A53, which is a performance increase o

[PATCH v4 5/7] crypto: aegis128 - add support for SIMD acceleration

2019-07-03 Thread Ard Biesheuvel
Add some plumbing to allow the AEGIS128 code to be built with SIMD routines for acceleration. Reviewed-by: Ondrej Mosnacek Signed-off-by: Ard Biesheuvel --- crypto/Makefile| 1 + crypto/aegis.h | 14 +++ crypto/{aegis128.c => aegis128-core.c}

[PATCH v4 4/7] crypto: aegis - avoid prerotated AES tables

2019-07-03 Thread Ard Biesheuvel
The generic AES code provides four sets of lookup tables, where each set consists of four tables containing the same 32-bit values, but rotated by 0, 8, 16 and 24 bits, respectively. This makes sense for CISC architectures such as x86 which support memory operands, but for other architectures, the

[PATCH v4 0/7] crypto: CAESAR final portfolio follow-up

2019-07-03 Thread Ard Biesheuvel
This v2/v3/v4 is a follow-up to both 'crypto: aegis128 - add NEON intrinsics version for ARM/arm64' [0] and 'crypto: morus - remove generic and x86 implementations' [1]. Since there is some overlap, it makes sense to merge them and avoid merge conflicts. Now that aegis128 has been announced as one

[PATCH v4 2/7] crypto: aegis128l/aegis256 - remove x86 and generic implementations

2019-07-03 Thread Ard Biesheuvel
Three variants of AEGIS were proposed for the CAESAR competition, and only one was selected for the final portfolio: AEGIS128. The other variants, AEGIS128L and AEGIS256, are not likely to ever turn up in networking protocols or other places where interoperability between Linux and other systems i

[PATCH v4 02/16] crypto: caam - simplify clock initialization

2019-07-03 Thread Andrey Smirnov
Simplify clock initialization code by converting it to use clk-bulk, devres and soc_device_match() match table. No functional change intended. Signed-off-by: Andrey Smirnov Cc: Chris Spencer Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Aymen Sghaier Cc: Leonard Creste

[PATCH v4 04/16] crypto: caam - use deveres to allocate 'entinfo'

2019-07-03 Thread Andrey Smirnov
Use deveres to allocate 'entinfo' and drop corresponding call to kfree(). No functional change intended. Signed-off-by: Andrey Smirnov Cc: Chris Spencer Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Aymen Sghaier Cc: Leonard Crestez Cc: linux-crypto@vger.kernel.org Cc

[PATCH v4 06/16] crypto: caam - use devres to allocate 'inpring'

2019-07-03 Thread Andrey Smirnov
Use devres to allocate 'inpring' and drop corresponding dma_free_coherent() call as well explicit references to size of 'inpring' elemet (needet in following commits). No functional change intended. Signed-off-by: Andrey Smirnov Cc: Chris Spencer Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach

[PATCH v4 14/16] crypto: caam - force DMA address to 32-bit on 64-bit i.MX SoCs

2019-07-03 Thread Andrey Smirnov
i.MX8 SoC still use 32-bit addresses in its CAAM implmentation, so change all of the code to be able to handle that. Signed-off-by: Andrey Smirnov Cc: Chris Spencer Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Aymen Sghaier Cc: Leonard Crestez Cc: linux-crypto@vger.k

[PATCH v4 15/16] crypto: caam - always select job ring via RSR on i.MX8MQ

2019-07-03 Thread Andrey Smirnov
Per feedback from NXP tech support the way to use register based service interface on i.MX8MQ is to follow the same set of steps outlined for the case when virtualization is enabled, regardless if it is. Current version of SRM for i.MX8MQ speaks of DECO DID_MS and DECO DID_LS registers, but apparen

[PATCH v4 09/16] crypto: caam - drop 64-bit only wr/rd_reg64()

2019-07-03 Thread Andrey Smirnov
Since 32-bit of both wr_reg64 and rd_reg64 now use 64-bit IO helpers, these functions should no longer be necessary. No functional change intended. Signed-off-by: Andrey Smirnov Cc: Chris Spencer Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Aymen Sghaier Cc: Leonard C

[PATCH v4 03/16] crypto: caam - move tasklet_init() call down

2019-07-03 Thread Andrey Smirnov
Move tasklet_init() call further down in order to simplify error path cleanup. No functional change intended. Signed-off-by: Andrey Smirnov Cc: Chris Spencer Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Aymen Sghaier Cc: Leonard Crestez Cc: linux-crypto@vger.kernel.o

[PATCH v4 13/16] crypto: caam - don't hardcode inpentry size

2019-07-03 Thread Andrey Smirnov
Using dma_addr_t for elements of JobR input ring is not appropriate on all 64-bit SoCs, some of which, like i.MX8MQ, use only 32-bit wide pointers there. Convert all of the code to use explicit helper function that can be later extended to support i.MX8MQ. No functional change intended. Signed-off

[PATCH v4 16/16] crypto: caam - add clock entry for i.MX8MQ

2019-07-03 Thread Andrey Smirnov
Add clock entry needed to support i.MX8MQ. Signed-off-by: Andrey Smirnov Cc: Chris Spencer Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Aymen Sghaier Cc: Leonard Crestez Cc: linux-crypto@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/crypto/caam/ctrl.c

[PATCH v4 10/16] crypto: caam - make CAAM_PTR_SZ dynamic

2019-07-03 Thread Andrey Smirnov
In order to be able to configure CAAM pointer size at run-time, which needed to support i.MX8MQ, which is 64-bit SoC with 32-bit pointer size, convert CAAM_PTR_SZ to refer to a global variable of the same name ("caam_ptr_sz") and adjust the rest of the code accordingly. No functional change intende

[PATCH v4 11/16] crypto: caam - move cpu_to_caam_dma() selection to runtime

2019-07-03 Thread Andrey Smirnov
Instead of selecting the implementation of cpu_to_caam_dma()/caam_dma_to_cpu() at build time using the preprocessor, convert the code to do that at run-time using IS_ENABLED macro. This is needed to add support for i.MX8MQ. No functional change intended. Signed-off-by: Andrey Smirnov Cc: Chris Sp

[PATCH v4 05/16] crypto: caam - use devres to allocate 'outring'

2019-07-03 Thread Andrey Smirnov
Use devres to allocate 'outring' and drop corresponding call to dma_free_coherent() as well as extra references to 'struct jr_outentry' (needed in following commits). No functional change inteded. Signed-off-by: Andrey Smirnov Cc: Chris Spencer Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach C

[PATCH v4 12/16] crypto: caam - drop explicit usage of struct jr_outentry

2019-07-03 Thread Andrey Smirnov
Using struct jr_outentry to specify the layout of JobR output ring is not appropriate for all 64-bit SoC, since some of them, like i.MX8MQ, use 32-bit pointers there which doesn't match 64-bit dma_addr_t. Convert existing code to use explicit helper functions to access any of the JobR output ring e

[PATCH v4 07/16] crytpo: caam - make use of iowrite64*_hi_lo in wr_reg64

2019-07-03 Thread Andrey Smirnov
In order to be able to unify 64 and 32 bit implementations of wr_reg64, let's convert it to use helpers from first. Here are the steps of the transformation: 1. Inline wr_reg32 helpers: if (!caam_imx && caam_little_end) { if (caam_little_end) { iow

[PATCH v4 08/16] crypto: caam - use ioread64*_hi_lo in rd_reg64

2019-07-03 Thread Andrey Smirnov
Following the same transformation logic as outlined in previous commit converting wr_reg64, convert rd_reg64 to use helpers from first. No functional change intended. Signed-off-by: Andrey Smirnov Cc: Chris Spencer Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Aymen Sg

[PATCH v4 01/16] crypto: caam - move DMA mask selection into a function

2019-07-03 Thread Andrey Smirnov
Exactly the same code to figure out DMA mask is repeated twice in the driver code. To avoid repetition, move that logic into a standalone subroutine in intern.h. While at it re-shuffle the code to make it more readable with early returns. Signed-off-by: Andrey Smirnov Reviewed-by: Horia Geantă C

[PATCH v4 00/16] crypto: caam - Add i.MX8MQ support

2019-07-03 Thread Andrey Smirnov
Everyone: Picking up where Chris left off (I chatted with him privately beforehead), this series adds support for i.MX8MQ to CAAM driver. Just like [v1], this series is i.MX8MQ only. Feedback is welcome! Thanks, Andrey Smirnov Changes since [v3]: - Patchset changed to select DMA size at runti