Re: [PATCH 0/3] ARM: sun6i: Support Security System crypto engine

2015-08-13 Thread Herbert Xu
On Tue, Aug 11, 2015 at 01:32:54PM +0800, Chen-Yu Tsai wrote: Hi everyone, This series enables support for the crypto engine found in sun6i, or Allwinner A31/A31s SoCs. The crypto engine is the same hardware as on earlier sun4i/sun7i (A10/A20), with the only difference being the reset

Re: [PATCH 2/2] zram: use crypto API to compress the page

2015-08-13 Thread Joonsoo Kim
On Thu, Aug 13, 2015 at 12:51:13PM +0900, Sergey Senozhatsky wrote: On (08/13/15 11:24), Joonsoo Kim wrote: Until now, zram uses compression algorithm through direct call to core algorithm function, but, it has drawback that we need to add compression algorithm manually to zram if needed.

Re: [PATCH 2/2] zram: use crypto API to compress the page

2015-08-13 Thread Herbert Xu
On Thu, Aug 13, 2015 at 04:19:41PM +0900, Joonsoo Kim wrote: If that optimization is really needed for the case that doesn't need tfm except fetching function pointer, we can implement sharable tfm in crypto subsystem. I'm happy to consider changes to the crypto compression interface as long

Re: [PATCH 1/2] crypto: export crypto_alg_list and rwsem

2015-08-13 Thread Joonsoo Kim
On Thu, Aug 13, 2015 at 11:19:54AM +0800, Herbert Xu wrote: On Thu, Aug 13, 2015 at 11:24:13AM +0900, Joonsoo Kim wrote: Until now, zram uses compression algorithm through direct call to core algorithm function, but, it has drawback that we need to add compression algorithm manually to

Re: [cryptodev:master 119/123] warning: (CRYPTO_DEV_QAT_DH895xCCVF) selects PCI_IOV which has unmet direct dependencies (PCI)

2015-08-13 Thread Herbert Xu
On Tue, Aug 11, 2015 at 11:05:37AM -0700, Tadeusz Struk wrote: ---8--- Fix unmet direct dependencies for QAT_DH895xCCVF Reported-by: Fengguang Wu fengguang...@intel.com Signed-off-by: Tadeusz Struk tadeusz.st...@intel.com Applied. -- Email: Herbert Xu herb...@gondor.apana.org.au Home

Re: [PATCH] crypto: caam - Fix error handling in caam_rng_init()

2015-08-13 Thread Herbert Xu
On Wed, Aug 12, 2015 at 11:48:42AM -0300, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com In the error paths we should free the resources that were previously acquired, so fix it accordingly. Signed-off-by: Fabio Estevam fabio.este...@freescale.com Applied. --

Re: [PATCH] crypto: fix simple_return.cocci warnings

2015-08-13 Thread Herbert Xu
On Wed, Aug 12, 2015 at 12:50:17PM +0800, kbuild test robot wrote: drivers/crypto/qat/qat_common/adf_sriov.c:258:1-4: WARNING: end returns can be simpified and declaration on line 212 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call.

Re: [PATCH 1/2] crypto: export crypto_alg_list and rwsem

2015-08-13 Thread Joonsoo Kim
On Thu, Aug 13, 2015 at 03:29:18PM +0800, Herbert Xu wrote: On Thu, Aug 13, 2015 at 04:30:31PM +0900, Joonsoo Kim wrote: How about introducing new functions to search supported algorithm in kernel-side? As crypto API is used in more places, this interface would be requested more. Defined

Re: [PATCH 2/2] zram: use crypto API to compress the page

2015-08-13 Thread Joonsoo Kim
On Thu, Aug 13, 2015 at 03:32:33PM +0800, Herbert Xu wrote: On Thu, Aug 13, 2015 at 04:19:41PM +0900, Joonsoo Kim wrote: If that optimization is really needed for the case that doesn't need tfm except fetching function pointer, we can implement sharable tfm in crypto subsystem. I'm

Re: [PATCH] crypto: caam - fix memory corruption in ahash_final_ctx

2015-08-13 Thread Herbert Xu
On Tue, Aug 11, 2015 at 08:19:20PM +0300, Horia Geantă wrote: When doing pointer operation for accessing the HW S/G table, a value representing number of entries (and not number of bytes) must be used. Cc: sta...@vger.kernel.org # 3.6+ Fixes: 045e36780f115 (crypto: caam - ahash hmac

Re: [PATCH 1/2] crypto: export crypto_alg_list and rwsem

2015-08-13 Thread Herbert Xu
On Thu, Aug 13, 2015 at 04:30:31PM +0900, Joonsoo Kim wrote: How about introducing new functions to search supported algorithm in kernel-side? As crypto API is used in more places, this interface would be requested more. Defined list weaken the advantage of strong point of generic crypto API.

Re: [PATCH 1/2] crypto: export crypto_alg_list and rwsem

2015-08-13 Thread Herbert Xu
On Thu, Aug 13, 2015 at 03:37:55PM +0900, Joonsoo Kim wrote: Is there any way to access netlink interface and get the output from kernel-side? I'd like to show information through /sys/block/zramX/comp_algorithm, because some user program can be broken if we change output of userspace exposed

Re: [PATCH 1/2] crypto: export crypto_alg_list and rwsem

2015-08-13 Thread Joonsoo Kim
On Thu, Aug 13, 2015 at 02:38:23PM +0800, Herbert Xu wrote: On Thu, Aug 13, 2015 at 03:37:55PM +0900, Joonsoo Kim wrote: Is there any way to access netlink interface and get the output from kernel-side? I'd like to show information through /sys/block/zramX/comp_algorithm, because some

[PATCH 0/13] crypto: aead - Complete AEAD conversion

2015-08-13 Thread Herbert Xu
Hi: This series completes the AEAD type conversion by updating some small leftovers and then ripping out the old AEAD interface as well as the temporary CRYPTO_ALG_AEAD_NEW flag. Cheers, -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key:

[PATCH 5/13] crypto: seqiv - Remove AEAD compatibility code

2015-08-13 Thread Herbert Xu
Now that we no longer have any legacy AEAD implementations the compatibility code path can no longer be triggered. This patch removes it. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- crypto/seqiv.c | 127 - 1 file changed,

[PATCH 10/13] crypto: cryptd - Remove reference to crypto_aead_crt

2015-08-13 Thread Herbert Xu
Pretty soon the crypto_aead encrypt/decrypt hooks will disappear as they are now always identical to those in struct aead_alg. This patch replaces the references to these hooks with the ones from aead_alg instead. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- crypto/cryptd.c |4

[PATCH 6/13] crypto: echainiv - Remove AEAD compatibility code

2015-08-13 Thread Herbert Xu
Now that we no longer have any legacy AEAD implementations the compatibility code path can no longer be triggered. This patch removes it. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- crypto/echainiv.c |4 1 file changed, 4 deletions(-) diff --git a/crypto/echainiv.c

[PATCH 12/13] crypto: aead - Remove old AEAD interfaces

2015-08-13 Thread Herbert Xu
Now that the AEAD conversion is complete we can rip out the old AEAD interafce and associated code. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- crypto/aead.c | 606 include/crypto/aead.h | 146 -

[PATCH 9/13] crypto: echainiv - Use generic geniv init/exit helpers

2015-08-13 Thread Herbert Xu
This patch replaces the echainiv init/exit handlers with the generic geniv helpers. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- crypto/echainiv.c | 70 +- 1 file changed, 7 insertions(+), 63 deletions(-) diff --git

[PATCH 11/13] crypto: qat - Remove reference to crypto_aead_crt

2015-08-13 Thread Herbert Xu
The qat driver uses crypto_aead_crt in order to get the authsize. This patch replaces it with the crypto_aead_authsize helper instead. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- drivers/crypto/qat/qat_common/qat_algs.c |6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 4/13] crypto: seqiv - Remove seqniv

2015-08-13 Thread Herbert Xu
Now that IPsec no longer uses seqniv we can remove it. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- crypto/seqiv.c | 245 - 1 file changed, 1 insertion(+), 244 deletions(-) diff --git a/crypto/seqiv.c b/crypto/seqiv.c index

[PATCH 3/13] ipsec: Replace seqniv with seqiv

2015-08-13 Thread Herbert Xu
Now that seqniv is identical with seqiv we no longer need it. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- net/xfrm/xfrm_algo.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index 42f7c76..f07224d

[PATCH 13/13] crypto: aead - Remove CRYPTO_ALG_AEAD_NEW flag

2015-08-13 Thread Herbert Xu
This patch removes the CRYPTO_ALG_AEAD_NEW flag now that everyone has been converted. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- arch/arm64/crypto/aes-ce-ccm-glue.c |1 - arch/x86/crypto/aesni-intel_glue.c |3 +-- crypto/aead.c|6

[PATCH 1/13] crypto: algboss - Remove reference to nivaead

2015-08-13 Thread Herbert Xu
This patch removes a legacy reference to nivaead which is no longer used. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- crypto/algboss.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/crypto/algboss.c b/crypto/algboss.c index 76fc0b2..6e39d9c

[PATCH 2/13] crypto: user - Remove crypto_lookup_aead call

2015-08-13 Thread Herbert Xu
As IV generators are now standalone AEAD transforms, we no longer need to use the crypto_lookup_aead call. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- crypto/crypto_user.c | 32 1 file changed, 32 deletions(-) diff --git a/crypto/crypto_user.c

[PATCH 7/13] crypto: aead - Add type-safe geniv init/exit helpers

2015-08-13 Thread Herbert Xu
This patch adds the helpers aead_init_geniv and aead_exit_geniv which are type-safe and intended the replace the existing geniv init/exit helpers. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au --- crypto/Kconfig | 11 +--- crypto/aead.c | 55

Re: [PATCH 0/2] crypto: KEYS: convert public key to the akcipher API

2015-08-13 Thread David Howells
Can you rebase this on top of: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=modsign-pkcs7 David -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API

2015-08-13 Thread David Howells
Tadeusz Struk tadeusz.st...@intel.com wrote: const char *const pkey_algo_name[PKEY_ALGO__LAST] = { - [PKEY_ALGO_DSA] = DSA, - [PKEY_ALGO_RSA] = RSA, + [PKEY_ALGO_DSA] = dsa, + [PKEY_ALGO_RSA] = rsa, }; Be aware that these are exposed to

Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API

2015-08-13 Thread Tadeusz Struk
On 08/13/2015 07:23 AM, David Howells wrote: Tadeusz Struk tadeusz.st...@intel.com wrote: const char *const pkey_algo_name[PKEY_ALGO__LAST] = { -[PKEY_ALGO_DSA] = DSA, -[PKEY_ALGO_RSA] = RSA, +[PKEY_ALGO_DSA] = dsa, +[PKEY_ALGO_RSA] = rsa,

Re: [PATCH 2/2] crypto: qat - Don't move data inside output buffer

2015-08-13 Thread Tadeusz Struk
On 08/12/2015 08:54 PM, Tadeusz Struk wrote: Don't need to move data inside of the output buffer because SW doen't need to do this anymore sice the new MPI mpi_read_buf() has been added. Just set the correct output len. Signed-off-by: Tadeusz Struk tadeusz.st...@intel.com ---

Re: [PATCH 0/2] crypto: KEYS: convert public key to the akcipher API

2015-08-13 Thread Tadeusz Struk
On 08/13/2015 06:56 AM, David Howells wrote: Can you rebase this on top of: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=modsign-pkcs7 David Will do. -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to

Re: [PATCH 2/2] crypto: qat - Don't move data inside output buffer

2015-08-13 Thread Herbert Xu
On Wed, Aug 12, 2015 at 08:54:45PM -0700, Tadeusz Struk wrote: Don't need to move data inside of the output buffer because SW doen't need to do this anymore sice the new MPI mpi_read_buf() has been added. Just set the correct output len. Signed-off-by: Tadeusz Struk tadeusz.st...@intel.com

Re: [PATCH 1/2] crypto: KEYS: convert public key to the akcipher API

2015-08-13 Thread Herbert Xu
On Thu, Aug 13, 2015 at 03:23:16PM +0100, David Howells wrote: - /* Decode the public key */ - ret = asn1_ber_decoder(x509_rsakey_decoder, ctx, - ctx-key, ctx-key_size); - if (ret 0) + cert-pub-key = kmemdup(ctx-key, ctx-key_size, GFP_KERNEL); + if

[PATCH] crypto: amcc: Do a NULL check for pointer

2015-08-13 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com Compare pointer-typed values to NULL rather than 0. The semantic patch that makes this change is available in scripts/coccinelle/null/badzero.cocci Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- drivers/crypto/amcc/crypto4xx_core.c

[PATCH v2] crypto: amcc: Do a NULL check for pointer

2015-08-13 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com Compare pointer-typed values to NULL rather than 0. The semantic patch that makes this change is available in scripts/coccinelle/null/badzero.cocci Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v1: - Use