[PATCH 28/30] crypto: skcipher - Add skcipher walk interface

2016-07-11 Thread Herbert Xu
This patch adds the skcipher walk interface which replaces both blkcipher walk and ablkcipher walk. Just like blkcipher walk it can also be used for AEAD algorithms. Signed-off-by: Herbert Xu --- crypto/skcipher.c | 506

[PATCH 26/30] crypto: scatterwalk - Remove unnecessary BUG in scatterwalk_start

2016-07-11 Thread Herbert Xu
Nothing bad will happen even if sg->length is zero, so there is no point in keeping this BUG_ON in scatterwalk_start. Signed-off-by: Herbert Xu --- crypto/scatterwalk.c |3 --- 1 file changed, 3 deletions(-) diff --git a/crypto/scatterwalk.c

[PATCH 24/30] crypto: scatterwalk - Fix test in scatterwalk_done

2016-07-11 Thread Herbert Xu
When there is more data to be processed, the current test in scatterwalk_done may prevent us from calling pagedone even when we should. In particular, if we're on an SG entry spanning multiple pages where the last page is not a full page, we will incorrectly skip calling pagedone on the second

[PATCH 29/30] crypto: aes-ce-ccm - Use skcipher walk interface

2016-07-11 Thread Herbert Xu
This patch makes use of the new skcipher walk interface instead of the obsolete blkcipher walk interface. Signed-off-by: Herbert Xu --- arch/arm64/crypto/aes-ce-ccm-glue.c | 50 +--- 1 file changed, 13 insertions(+), 37

[PATCH 30/30] crypto: lrw - Convert to skcipher

2016-07-11 Thread Herbert Xu
This patch converts lrw over to the skcipher interface. It also optimises the implementation to be based on ECB instead of the underlying cipher. For compatibility the existing naming scheme of lrw(aes) is maintained as opposed to the more obvious one of lrw(ecb(aes)). Signed-off-by: Herbert Xu

[PATCH 25/30] crypto: scatterwalk - Remove unnecessary advance in scatterwalk_pagedone

2016-07-11 Thread Herbert Xu
The offset advance in scatterwalk_pagedone not only is unnecessary, but it was also buggy when it was needed by scatterwalk_copychunks. As the latter has long ago been fixed to call scatterwalk_advance directly, we can remove this unnecessary offset adjustment. Signed-off-by: Herbert Xu

[PATCH 27/30] crypto: scatterwalk - Inline start/map/done

2016-07-11 Thread Herbert Xu
This patch inlines the functions scatterwalk_start, scatterwalk_map and scatterwalk_done as they're all tiny and mostly used by the block cipher walker. Signed-off-by: Herbert Xu --- crypto/scatterwalk.c | 43

[PATCH 23/30] crypto: api - Optimise away crypto_yield when hard preemption is on

2016-07-11 Thread Herbert Xu
When hard preemption is enabled there is no need to explicitly call crypto_yield. This patch eliminates it if that is the case. Signed-off-by: Herbert Xu --- include/crypto/algapi.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/include/crypto/algapi.h

[PATCH 11/30] crypto: aead - Add skcipher null for IV generators

2016-07-11 Thread Herbert Xu
This patch adds an skcipher null object alongside the existing null blkcipher so that IV generators using it can switch over to skcipher. Signed-off-by: Herbert Xu --- crypto/aead.c | 10 +- include/crypto/internal/geniv.h |1 + 2

[PATCH 5/30] crypto: authencesn - Use skcipher

2016-07-11 Thread Herbert Xu
This patch converts authencesn to use the new skcipher interface as opposed to ablkcipher. It also fixes a little bug where if a sync version of authencesn is requested we may still end up using an async ahash. This should have no effect as none of the authencesn users can request for a sync

[PATCH 18/30] crypto: skcipher - Remove top-level givcipher interface

2016-07-11 Thread Herbert Xu
This patch removes the old crypto_grab_skcipher helper and replaces it with crypto_grab_skcipher2. As this is the final entry point into givcipher this patch also removes all traces of the top-level givcipher interface, including all implicit IV generators such as chainiv. The bottom-level

[PATCH 12/30] crypto: echainiv - Use skcipher

2016-07-11 Thread Herbert Xu
This patch replaces use of the obsolete blkcipher with skcipher. Signed-off-by: Herbert Xu --- crypto/echainiv.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/crypto/echainiv.c b/crypto/echainiv.c index b96a8456..1b01fe9

[PATCH 20/30] crypto: omap - Stop using crypto scatterwalk_bytes_sglen

2016-07-11 Thread Herbert Xu
We already have a generic function sg_nents_for_len which does the same thing. This patch switches omap over to it and also adds error handling in case the SG list is short. Signed-off-by: Herbert Xu --- drivers/crypto/omap-aes.c | 16 ++--

[PATCH 7/30] crypto: ccm - Use skcipher

2016-07-11 Thread Herbert Xu
This patch converts ccm to use the new skcipher interface as opposed to ablkcipher. Signed-off-by: Herbert Xu --- crypto/ccm.c | 72 ++- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git

[PATCH 17/30] crypto: user - Remove crypto_lookup_skcipher call

2016-07-11 Thread Herbert Xu
As there are no more kernel users of built-in IV generators we can remove the special lookup for skciphers. Signed-off-by: Herbert Xu --- crypto/crypto_user.c | 37 + 1 file changed, 1 insertion(+), 36 deletions(-) diff --git

[PATCH 16/30] crypto: cts - Convert to skcipher

2016-07-11 Thread Herbert Xu
This patch converts cts over to the skcipher interface. It also optimises the implementation to use one CBC operation for all but the last block, which is then processed separately. Signed-off-by: Herbert Xu --- crypto/cts.c | 495

[PATCH 15/30] crypto: null - Remove default null blkcipher

2016-07-11 Thread Herbert Xu
The default null blkcipher is no longer used and can now be removed. Signed-off-by: Herbert Xu --- crypto/crypto_null.c | 49 ++--- include/crypto/null.h | 14 +++--- 2 files changed, 17 insertions(+), 46

[PATCH 13/30] crypto: seqiv - Use skcipher

2016-07-11 Thread Herbert Xu
This patch replaces use of the obsolete blkcipher with skcipher. Signed-off-by: Herbert Xu --- crypto/seqiv.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/crypto/seqiv.c b/crypto/seqiv.c index 15a749a..a859b3a 100644 ---

[PATCH 6/30] crypto: ctr - Use skcipher in rfc3686

2016-07-11 Thread Herbert Xu
This patch converts rfc3686 to use the new skcipher interface as opposed to ablkcipher. Signed-off-by: Herbert Xu --- crypto/ctr.c | 183 ++- 1 file changed, 94 insertions(+), 89 deletions(-) diff --git

[PATCH 3/30] crypto: aead - Add chunk size

2016-07-11 Thread Herbert Xu
This patch adds a chunk size parameter to aead algorithms, just like the chunk size for skcipher algorithms. However, unlike skcipher we do not currently export this to AEAD users. It is only meant to be used by AEAD implementors for now. Signed-off-by: Herbert Xu

[PATCH 10/30] crypto: cryptd - Add support for skcipher

2016-07-11 Thread Herbert Xu
This patch adds skcipher support to cryptd alongside ablkcipher. Signed-off-by: Herbert Xu --- crypto/cryptd.c | 280 +++- include/crypto/cryptd.h | 13 ++ 2 files changed, 291 insertions(+), 2 deletions(-)

[PATCH 21/30] crypto: scatterwalk - Remove scatterwalk_bytes_sglen

2016-07-11 Thread Herbert Xu
This patch removes the now unused scatterwalk_bytes_sglen. Anyone using this out-of-tree should switch over to sg_nents_for_len. Signed-off-by: Herbert Xu --- crypto/scatterwalk.c | 22 -- include/crypto/scatterwalk.h |2 -- 2

[PATCH 8/30] crypto: gcm - Use skcipher

2016-07-11 Thread Herbert Xu
This patch converts gcm to use the new skcipher interface as opposed to ablkcipher. Signed-off-by: Herbert Xu --- crypto/gcm.c | 111 ++- 1 file changed, 58 insertions(+), 53 deletions(-) diff --git

[PATCH 1/30] crypto: skcipher - Add low-level skcipher interface

2016-07-11 Thread Herbert Xu
This patch allows skcipher algorithms and instances to be created and registered with the crypto API. They are accessible through the top-level skcipher interface, along with ablkcipher/blkcipher algorithms and instances. This patch also introduces a new parameter called chunk size which is

[PATCH 2/30] crypto: null - Add new default null skcipher

2016-07-11 Thread Herbert Xu
Current the default null skcipher is actually a crypto_blkcipher. This patch creates a synchronous crypto_skcipher version of the null cipher which unfortunately has to settle for the name skcipher2. Signed-off-by: Herbert Xu --- crypto/crypto_null.c | 38

[PATCH 19/30] crypto: simd - Add simd skcipher helper

2016-07-11 Thread Herbert Xu
This patch adds the simd skcipher helper which is meant to be a replacement for ablk helper. It replaces the underlying blkcipher interface with skcipher, and also presents the top-level algorithm as an skcipher. Signed-off-by: Herbert Xu --- crypto/Kconfig

[PATCH 14/30] crypto: aead - Remove blkcipher null for IV generators

2016-07-11 Thread Herbert Xu
The blkcipher null object is no longer used and can now be removed. Signed-off-by: Herbert Xu --- crypto/aead.c |8 include/crypto/internal/geniv.h |1 - 2 files changed, 9 deletions(-) diff --git a/crypto/aead.c b/crypto/aead.c

[PATCH 4/30] crypto: authenc - Use skcipher

2016-07-11 Thread Herbert Xu
This patch converts authenc to use the new skcipher interface as opposed to ablkcipher. It also fixes a little bug where if a sync version of authenc is requested we may still end up using an async ahash. This should have no effect as none of the authenc users can request for a sync authenc.

[PATCH 9/30] crypto: chacha20poly1305 - Use skcipher

2016-07-11 Thread Herbert Xu
This patch converts chacha20poly1305 to use the new skcipher interface as opposed to ablkcipher. It also fixes a buglet where we may end up with an async poly1305 when the user asks for a async algorithm. This shouldn't be a problem yet as there aren't any async implementations of poly1305 out

[PATCH 0/30] crypto: skcipher - skcipher algorithm conversion part 2

2016-07-11 Thread Herbert Xu
Hi: This patch series continues the task of converting blkcipher and ablkcipher implementations over to the unified skcipher interface. It includes a repost of patches in the previous series which have not been included because of the addition of the chunksize parameter (block size for stream

Re: [PATCH 3/3] crypto: Added Chelsio Menu to the Kconfig file

2016-07-11 Thread kbuild test robot
Hi, [auto build test WARNING on net-next/master] [also build test WARNING on v4.7-rc7 next-20160711] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Yeshaswi-M-R-Gowda/crypto-chcr-Add-Chelsio

Re: [PATCH 3/3] crypto: Added Chelsio Menu to the Kconfig file

2016-07-11 Thread kbuild test robot
Hi, [auto build test WARNING on net-next/master] [also build test WARNING on v4.7-rc7 next-20160711] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Yeshaswi-M-R-Gowda/crypto-chcr-Add-Chelsio

Re: [PATCH 1/2] crypto: vmx - Adding asm subroutines for XTS

2016-07-11 Thread Stephen Rothwell
Hi Paulo, On Mon, 11 Jul 2016 16:07:39 -0300 Paulo Flabiano Smorigo wrote: > > diff --git a/drivers/crypto/vmx/aesp8-ppc.pl b/drivers/crypto/vmx/aesp8-ppc.pl > index 2280539..813ffcc 100644 > --- a/drivers/crypto/vmx/aesp8-ppc.pl > +++

Re: [PATCH 3/3] crypto: Added Chelsio Menu to the Kconfig file

2016-07-11 Thread kbuild test robot
Hi, [auto build test WARNING on net-next/master] [also build test WARNING on v4.7-rc7 next-20160711] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Yeshaswi-M-R-Gowda/crypto-chcr-Add-Chelsio

[PATCH 2/2] crypto: vmx - Adding support for XTS

2016-07-11 Thread Paulo Flabiano Smorigo
From: "Leonidas S. Barbosa" This patch add XTS support using VMX-crypto driver. Signed-off-by: Leonidas S. Barbosa Signed-off-by: Paulo Flabiano Smorigo --- drivers/crypto/vmx/Makefile | 2 +-

[PATCH 1/2] crypto: vmx - Adding asm subroutines for XTS

2016-07-11 Thread Paulo Flabiano Smorigo
This patch add XTS subroutines using VMX-crypto driver. It gives a boost of 20 times using XTS. These code has been adopted from OpenSSL project in collaboration with the original author (Andy Polyakov ). Signed-off-by: Leonidas S. Barbosa

Re: [PATCH 2/3] chcr: Support for Chelsio's Crypto Hardware

2016-07-11 Thread Joe Perches
On Mon, 2016-07-11 at 11:28 -0700, Yeshaswi M R Gowda wrote: > The Chelsio's Crypto Hardware can perform the following operations: > SHA1, SHA224, SHA256, SHA384 and SHA512, HMAC(SHA1), HMAC(SHA224), > HMAC(SHA256), HMAC(SHA384), HAMC(SHA512), AES-128-CBC, AES-192-CBC, > AES-256-CBC, AES-128-XTS,

[PATCH 1/3] cxgb4: Add Chelsio LLD support Chelsio Crypto ULD

2016-07-11 Thread Yeshaswi M R Gowda
The Chelsio crypto driver is an Upper Layer Driver (ULD), making use of the Chelsio Lower Layer Driver (LLD - cxgb4). The LLD facilitates the basic infrastructure services of the ULD. These services include queue allocation, deallocation and registration with LLD. The queues are used for sending

[PATCH 2/3] chcr: Support for Chelsio's Crypto Hardware

2016-07-11 Thread Yeshaswi M R Gowda
The Chelsio's Crypto Hardware can perform the following operations: SHA1, SHA224, SHA256, SHA384 and SHA512, HMAC(SHA1), HMAC(SHA224), HMAC(SHA256), HMAC(SHA384), HAMC(SHA512), AES-128-CBC, AES-192-CBC, AES-256-CBC, AES-128-XTS, AES-256-XTS This patch implements the driver for above mentioned

[PATCH 0/3] crypto/chcr: Add Chelsio Crypto Driver

2016-07-11 Thread Yeshaswi M R Gowda
Hi Herbert, This patch series contains 3 patches that add support for Chelsio's Crypto Hardware. The patch series has been created against Herbert Xu's tree (crypto-2.6). It includes patches for Chelsio Low Level Driver(cxgb4) and adds the new crypto Upper Layer Driver(chcr) under a new

[PATCH 3/3] crypto: Added Chelsio Menu to the Kconfig file

2016-07-11 Thread Yeshaswi M R Gowda
Adds the config entry for the Chelsio Crypto Driver, Makefile changes for the same. Signed-off-by: Yeshaswi M R Gowda --- drivers/crypto/Kconfig |2 ++ drivers/crypto/Makefile |1 + 2 files changed, 3 insertions(+) diff --git a/drivers/crypto/Kconfig

Re: [patch] crypto: sha256-mb - cleanup a || vs | typo

2016-07-11 Thread Herbert Xu
On Fri, Jul 08, 2016 at 09:28:03AM -0700, Tim Chen wrote: > > From: Tim Chen > Subject: [PATCH] crypto: Cleanup sha multi-buffer code to use || instead of | > for condition comparison and cleanup multiline comment style > > In sha*_ctx_mgr_submit, we currently use

Re: [PATCH] [linux-next] crypto: doc- Fix double words "the the" in crypto-API.tmpl

2016-07-11 Thread Herbert Xu
On Thu, Jul 07, 2016 at 09:58:16PM +0900, Masanari Iida wrote: > This patch fix double words "the the" in crypto-API.tmpl. > > Signed-off-by: Masanari Iida Patch applied. Thanks. -- Email: Herbert Xu Home Page:

Re: [PATCH] crypto: qat - Add DH support

2016-07-11 Thread Herbert Xu
On Thu, Jul 07, 2016 at 03:27:29PM +0100, Salvatore Benedetto wrote: > Add DH support under kpp api. Drop struct qat_rsa_request and > introduce a more generic struct qat_asym_request and share it > between RSA and DH requests. > > Signed-off-by: Salvatore Benedetto

Re: [PATCH] crypto: qat - Stop dropping leading zeros from RSA output

2016-07-11 Thread Herbert Xu
On Thu, Jul 07, 2016 at 03:52:17PM +0100, Salvatore Benedetto wrote: > There is not need to drop leading zeros from the RSA output > operations results. > > Signed-off-by: Salvatore Benedetto Patch applied. Thanks. -- Email: Herbert Xu

[PATCH 1/6] crypto: img-hash - Fix null pointer exception

2016-07-11 Thread Will Thomas
Sporadic null pointer exceptions came from here. Fix them. Signed-off-by: Will Thomas Reviewed-by: James Hartley --- drivers/crypto/img-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/img-hash.c

[PATCH 5/6] crypto: img-hash - Add support for export and import

2016-07-11 Thread Will Thomas
From: James Hartley Currently the img-hash accelerator does not probe successfully due to a change in the checks made during registration with the crypto framework. This is due to import and export functions not being defined. Correct this. Signed-off-by: James Hartley

[PATCH 0/6] crypto: img-hash - fixes and interface changes

2016-07-11 Thread Will Thomas
This patch set includes small stability fixes, power management and import/export interface functions for the img-hash driver. Govindraj Raja (1): crypto: img-hash - Add suspend resume hooks for img hash James Hartley (2): crypto: img-hash - Add support for export and import crypto:

[PATCH 6/6] crypto: img-hash - log a successful probe

2016-07-11 Thread Will Thomas
From: James Hartley Currently the probe function only emits an output on success when debug is specifically enabled. It would be more useful if this happens by default. Signed-off-by: James Hartley Reviewed-by: Will Thomas

[PATCH 2/6] crypto: img-hash - Fix hash request context

2016-07-11 Thread Will Thomas
Move 0 length buffer to end of structure to stop overwriting fallback request data. This doesn't cause a bug itself as the buffer is never used alongside the fallback but should be changed. Signed-off-by: Will Thomas Reviewed-by: James Hartley

[PATCH 4/6] crypto: img-hash - Add suspend resume hooks for img hash

2016-07-11 Thread Will Thomas
From: Govindraj Raja Current img hash claims sys and periph gate clocks and this can be gated in system suspend scenarios. Add support for Device pm ops for img hash to gate the clocks claimed by img hash. Signed-off-by: Govindraj Raja

[PATCH 3/6] crypto: img-hash - Reconfigure DMA Burst length

2016-07-11 Thread Will Thomas
Burst length of 16 drives the hash accelerator out of spec and causes stability issues in some cases. Reduce this to stop data being lost. Signed-off-by: Will Thomas Reviewed-by: James Hartley --- drivers/crypto/img-hash.c | 3 ++- 1 file

Re: [patch] crypto: sha256-mb - cleanup a || vs | typo

2016-07-11 Thread Geert Uytterhoeven
Hi Linus, On Fri, Jul 8, 2016 at 7:19 PM, Linus Torvalds wrote: > (c) > // This can be a single line. Or many. Your choice. > The (c) form is particularly good for things like enum or structure > member comments at the end of code, where you might want to