Re: [PATCH 2/4] crypto: aesni - Enable one-sided zero copy for gcm(aes) request buffers

2018-01-22 Thread Stephan Mueller
Am Dienstag, 23. Januar 2018, 00:04:01 CET schrieb Junaid Shahid: Hi Junaid, > gcmaes_encrypt/decrypt perform zero-copy crypto if both the source and > destination satisfy certain conditions (single sglist entry located in > low-mem or within a single high-mem page). But two copies are done >

Re: [PATCH] crypto: chelsio - Delete stray tabs in create_authenc_wr()

2018-01-22 Thread Harsh Jain
On 22-01-2018 15:51, Dan Carpenter wrote: > We removed some if statements but left these statements indented too > far. HI Dan, Change already applied to cryptodev tree. https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg30560.html > > Signed-off-by: Dan Carpenter

[PATCH -next] hwrng: make symbol imx_rngc_pm_ops static

2018-01-22 Thread Wei Yongjun
Fixes the following sparse warnings: drivers/char/hw_random/imx-rngc.c:303:1: warning: symbol 'imx_rngc_pm_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/char/hw_random/imx-rngc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH -next] hwrng: bcm2835 - Remove redundant dev_err call in bcm2835_rng_probe()

2018-01-22 Thread Florian Fainelli
On 01/17/2018 03:40 AM, Wei Yongjun wrote: > There is a error message within devm_ioremap_resource > already, so remove the dev_err call to avoid redundant > error message. > > Signed-off-by: Wei Yongjun Acked-by: Florian Fainelli -- Florian

[PATCH 0/4] crypto: aesni - Use zero-copy for gcm(aes) buffers that are partially contiguous

2018-01-22 Thread Junaid Shahid
Currently, the AESNI gcm(aes) implementation uses zero-copy only when the entire src and dest request buffers, including the AAD, the data and the Auth Tag are contiguous. This series enables the use of zero-copy even if the AAD and/or Auth Tag are in different buffers than the actual data, as

[PATCH 2/4] crypto: aesni - Enable one-sided zero copy for gcm(aes) request buffers

2018-01-22 Thread Junaid Shahid
gcmaes_encrypt/decrypt perform zero-copy crypto if both the source and destination satisfy certain conditions (single sglist entry located in low-mem or within a single high-mem page). But two copies are done otherwise, even if one of source or destination still satisfies the zero-copy conditions.

[PATCH 1/4] crypto: aesni - Fix out-of-bounds access of the AAD buffer in AVX gcm-aesni

2018-01-22 Thread Junaid Shahid
The AVX/AVX2 versions of gcm-aes encryption/decryption functions can access memory after the end of the AAD buffer if the AAD length is not a multiple of 4 bytes. It didn't matter as long as the AAD and data buffers were always contiguous, since the AVX version are not used for small data sizes

[PATCH 3/4] crypto: aesni - Directly use kmap_atomic instead of scatter_walk object in gcm(aes)

2018-01-22 Thread Junaid Shahid
gcmaes_crypt uses a scatter_walk object to map and unmap the crypto request sglists. But the only purpose that appears to serve here is to allow the D-Cache to be flushed at the end for pages that were used as output. However, that is not applicable on x86, so we can avoid using the scatter_walk

[PATCH 4/4] crypto: aesni - Use zero-copy for gcm(aes) even if the AAD/Data/AuthTag are separate

2018-01-22 Thread Junaid Shahid
Enable the use of zero-copy even if the AAD and/or Auth Tag are in different buffers than the actual data, as long as each of them individually satisfies the zero-copy conditions (i.e. the entire buffer is either in low-mem or within a single high-mem page). Signed-off-by: Junaid Shahid

Re: [PATCH 0/8] crypto: arm64+generic - SHA3/SHA-512/SM-3 roundup

2018-01-22 Thread Ard Biesheuvel
On 22 January 2018 at 20:51, Arnd Bergmann wrote: > On Mon, Jan 22, 2018 at 3:54 PM, Arnd Bergmann wrote: >> On Fri, Jan 19, 2018 at 1:04 PM, Ard Biesheuvel >> I'm doing a little more randconfig build testing here now, will write back by >> the end of today in the

Re: [PATCH 0/8] crypto: arm64+generic - SHA3/SHA-512/SM-3 roundup

2018-01-22 Thread Arnd Bergmann
On Mon, Jan 22, 2018 at 3:54 PM, Arnd Bergmann wrote: > On Fri, Jan 19, 2018 at 1:04 PM, Ard Biesheuvel > I'm doing a little more randconfig build testing here now, will write back by > the end of today in the unlikely case that if I find anything else wrong. Did a few hundred

Re: [PATCH 0/8] crypto: arm64+generic - SHA3/SHA-512/SM-3 roundup

2018-01-22 Thread Arnd Bergmann
On Fri, Jan 19, 2018 at 1:04 PM, Ard Biesheuvel wrote: > This supersedes all outstanding patches from me related to SHA-3, SHA-512 > or SM-3. > > - fix a correctness issue in the SHA-3 code (#1) and a performance issue (#2), > the first one is definitely a -stable

Re: [PATCH] crypto: AF_ALG - inline IV support

2018-01-22 Thread Jonathan Cameron
On Mon, 22 Jan 2018 15:30:39 +0100 Stephan Mueller wrote: > Am Montag, 22. Januar 2018, 15:11:53 CET schrieb Jonathan Cameron: > > Hi Jonathan, Hi Stephan, > > > On Mon, 15 Jan 2018 10:35:34 +0100 > > > > Stephan Mueller wrote: > > > The kernel

Re: [PATCH] crypto: AF_ALG - inline IV support

2018-01-22 Thread Stephan Mueller
Am Montag, 22. Januar 2018, 15:11:53 CET schrieb Jonathan Cameron: Hi Jonathan, > On Mon, 15 Jan 2018 10:35:34 +0100 > > Stephan Mueller wrote: > > The kernel crypto API requires the caller to set an IV in the request > > data structure. That request data structure shall

Re: [PATCH] crypto: AF_ALG - inline IV support

2018-01-22 Thread Jonathan Cameron
On Mon, 15 Jan 2018 10:35:34 +0100 Stephan Mueller wrote: > The kernel crypto API requires the caller to set an IV in the request > data structure. That request data structure shall define one particular > cipher operation. During the cipher operation, the IV is read by the

[PATCH] crypto: chelsio - Delete stray tabs in create_authenc_wr()

2018-01-22 Thread Dan Carpenter
We removed some if statements but left these statements indented too far. Signed-off-by: Dan Carpenter diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c index a9c894bf9c01..34a02d690548 100644 --- a/drivers/crypto/chelsio/chcr_algo.c

[PATCH v2 3/7] crypto: ccree: add skcipher support

2018-01-22 Thread Gilad Ben-Yossef
Add CryptoCell skcipher support Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_buffer_mgr.c | 125 drivers/crypto/ccree/cc_buffer_mgr.h |8 + drivers/crypto/ccree/cc_cipher.c | 1130

[PATCH v2 1/7] staging: ccree: rename staging ver and mark as broken

2018-01-22 Thread Gilad Ben-Yossef
Rename the Kconfig var of the staging tree version of the driver in preparation of introducing the final version of the driver into the cryptodev tree to avoid link time symbol collisions. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/Kconfig | 4 ++--

[PATCH v2 0/7] crypto: ccree: Introduce Arm TrustZone CryptoCell

2018-01-22 Thread Gilad Ben-Yossef
Arm TrustZone CryptoCell is a security hardware IP that includes support for hardware based hash, digest, cipher and AEAD operations. This driver provides support for these as part of the Linux Crypto sub-system. The driver spent some time now in the staging tree being cleaned up and is now

[PATCH v2 2/7] crypto: ccree: introduce CryptoCell driver

2018-01-22 Thread Gilad Ben-Yossef
Introduce basic low level Arm TrustZone CryptoCell HW support. This first patch doesn't actually register any Crypto API transformations, these will follow up in the next patch. This first revision supports the CC 712 REE component. Signed-off-by: Gilad Ben-Yossef ---

[PATCH v2 5/7] crypto: ccree: add AEAD support

2018-01-22 Thread Gilad Ben-Yossef
Add CryptoCell AEAD support Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_aead.c | 2702 ++ drivers/crypto/ccree/cc_aead.h | 109 ++

[PATCH v2 4/7] crypto: ccree: add ahash support

2018-01-22 Thread Gilad Ben-Yossef
Add CryptoCell async. hash and HMAC support. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_buffer_mgr.c | 261 +++- drivers/crypto/ccree/cc_driver.c | 13 + drivers/crypto/ccree/cc_driver.h |1 +

[PATCH v2 7/7] MAINTAINERS: update ccree entry

2018-01-22 Thread Gilad Ben-Yossef
Update Arm TrustZone CryptoCell driver entry move into drivers/crypto/ Signed-off-by: Gilad Ben-Yossef --- MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1082846..560e068 100644 --- a/MAINTAINERS +++

[PATCH v2 6/7] crypto: ccree: add FIPS support

2018-01-22 Thread Gilad Ben-Yossef
Add FIPS mode support to CryptoCell driver Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/Makefile| 1 + drivers/crypto/ccree/cc_driver.c | 29 +- drivers/crypto/ccree/cc_driver.h | 1 + drivers/crypto/ccree/cc_fips.c | 111