[PATCH 10/10] crypto: caam - add support for RSA algorithm

2016-03-19 Thread Tudor Ambarus
Add RSA support to caam driver. Coauthored-by: Yashpal Dutta Signed-off-by: Tudor Ambarus --- drivers/crypto/caam/Kconfig| 12 + drivers/crypto/caam/Makefile | 4 + drivers/crypto/caam/caampkc.c | 513

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Sinan Kaya
On 3/18/2016 7:25 AM, Robin Murphy wrote: > On 18/03/16 09:30, Boris Brezillon wrote: >> On Thu, 17 Mar 2016 23:50:20 + >> Russell King - ARM Linux wrote: >> >>> On Thu, Mar 17, 2016 at 07:17:24PM -0400, ok...@codeaurora.org wrote: What is the correct way? I don't

[PATCH 02/10] crypto: rsa_helper - add raw integer parser actions

2016-03-19 Thread Tudor Ambarus
Dedicated to RSA (hardware) implementations that want to use raw integers instead of MPI keys. Signed-off-by: Tudor Ambarus --- crypto/rsa.c | 15 crypto/rsa_helper.c | 158 ++

[PATCH] crypto: marvell/cesa - forward devm_ioremap_resource() error code

2016-03-19 Thread Boris Brezillon
Forward devm_ioremap_resource() error code instead of returning -ENOMEM. Signed-off-by: Boris Brezillon Reported-by: Russell King - ARM Linux Fixes: f63601fd616a ("crypto: marvell/cesa - add a new driver for Marvell's CESA") Cc:

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Sinan Kaya
On 3/18/2016 9:51 AM, Sinan Kaya wrote: > Another option is I can write > > engine->sram_dma = swiotlb_dma_to_phys(res->start) I realized that I made a mistake in the commit message and the code above. The code is trying to find DMA address from physical address. Not the other way around.

Re: [PATCH] crypto: marvell/cesa - forward devm_ioremap_resource() error code

2016-03-19 Thread Boris Brezillon
Sorry for the noise, just sent twice the same patch :-/. Please ignore this one. On Thu, 17 Mar 2016 10:47:11 +0100 Boris Brezillon wrote: > Forward devm_ioremap_resource() error code instead of returning > -ENOMEM. > > Signed-off-by: Boris Brezillon

Re: [PATCH 1/2] crypto: marvell/cesa - fix memory leak

2016-03-19 Thread Boris Brezillon
On Thu, 17 Mar 2016 10:21:34 +0100 Boris Brezillon wrote: > Crypto requests are not guaranteed to be finalized (->final() call), > and can be freed at any moment, without getting any notification from > the core. This can lead to memory leaks of the ->cache

Re: [PATCH] crypto: ccp - fix lock acquisition code

2016-03-19 Thread Herbert Xu
On Wed, Mar 16, 2016 at 09:02:26AM -0500, Gary R Hook wrote: > This patch simplifies an unneeded read-write lock. > > Signed-off-by: Gary R Hook Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP

Re: [PATCH v3 2/8] crypto: add driver-side scomp interface

2016-03-19 Thread Giovanni Cabiddu
Hi Herbert, I would like to have some clarifications before submitting a v4. On Thu, Mar 17, 2016 at 07:00:27PM +0800, Herbert Xu wrote: > On Wed, Feb 24, 2016 at 05:51:44PM +, Giovanni Cabiddu wrote: > > > > +#define CRYPTO_SCOMP_DECOMP_NOCTX CRYPTO_ALG_PRIVATE > > I don't think this

[PATCH] crypto: marvell/cesa - forward devm_ioremap_resource() error code

2016-03-19 Thread Boris Brezillon
Forward devm_ioremap_resource() error code instead of returning -ENOMEM. Signed-off-by: Boris Brezillon Reported-by: Russell King - ARM Linux Fixes: f63601fd616a ("crypto: marvell/cesa - add a new driver for Marvell's CESA") Cc:

[PATCH] crypto: gcm - Fix rfc4543 decryption crash

2016-03-19 Thread Herbert Xu
This bug has already bee fixed upstream since 4.2. However, it was fixed during the AEAD conversion so no fix was backported to the older kernels. When we do an RFC 4543 decryption, we will end up writing the ICV beyond the end of the dst buffer. This should lead to a crash but for some reason

[PATCH] x86: Avoid undefined behavior in macro expansion

2016-03-19 Thread Vinicius Tinti
C11 standard (at 6.10.3.3) says that ## operator (paste) has undefined behavior when one of the result operands is not a valid preprocessing token. Therefore the macro expansion may depend on compiler implementation which may or no preserve the leading white space. Moreover other places in

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Boris Brezillon
On Fri, 18 Mar 2016 11:25:48 + Robin Murphy wrote: > On 18/03/16 09:30, Boris Brezillon wrote: > > On Thu, 17 Mar 2016 23:50:20 + > > Russell King - ARM Linux wrote: > > > >> On Thu, Mar 17, 2016 at 07:17:24PM -0400, ok...@codeaurora.org

[PATCH 06/10] crypto: qat - fix address leaking of RSA public exponent

2016-03-19 Thread Tudor Ambarus
Signed-off-by: Tudor Ambarus --- drivers/crypto/qat/qat_common/qat_asym_algs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c b/drivers/crypto/qat/qat_common/qat_asym_algs.c index 8dbbf084..05f49d4

[PATCH] PKCS#7: fix missing break on OID_sha224 case

2016-03-19 Thread Colin King
From: Colin Ian King The OID_sha224 case is missing a break and it falls through to the -ENOPKG error default. Since HASH_ALGO_SHA224 seems to be supported, this looks like an unintentional missing break. Fixes: 07f081fb5057 ("PKCS#7: Add OIDs for sha224, sha284 and

Re: [PATCH 10/10] crypto: caam - add support for RSA algorithm

2016-03-19 Thread Stephan Mueller
Am Freitag, 18. März 2016, 20:32:07 schrieb Tudor Ambarus: Hi Tudor, > Add RSA support to caam driver. > > Coauthored-by: Yashpal Dutta > > Signed-off-by: Tudor Ambarus > --- > drivers/crypto/caam/Kconfig| 12 + >

[PATCH 04/10] crypto: rsa_helper - export symbols for asn1 structures

2016-03-19 Thread Tudor Ambarus
Export rsapubkey_decoder and rsaprivkey_decoder structures, since they can (will) be used by caam and qat drivers. Signed-off-by: Tudor Ambarus --- crypto/rsa_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/rsa_helper.c b/crypto/rsa_helper.c

Re: [PATCH v3 2/8] crypto: add driver-side scomp interface

2016-03-19 Thread Herbert Xu
On Wed, Feb 24, 2016 at 05:51:44PM +, Giovanni Cabiddu wrote: > > +#define CRYPTO_SCOMP_DECOMP_NOCTX CRYPTO_ALG_PRIVATE I don't think this should be an scomp-specific flag. The point of noctx is that we don't need to do a request-specific vmalloc. Chances are that with hardware offload that

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Robin Murphy
On 18/03/16 09:30, Boris Brezillon wrote: On Thu, 17 Mar 2016 23:50:20 + Russell King - ARM Linux wrote: On Thu, Mar 17, 2016 at 07:17:24PM -0400, ok...@codeaurora.org wrote: What is the correct way? I don't want to write engine->sram_dma = sram Well, what the

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread kbuild test robot
Hi Sinan, [auto build test ERROR on arm64/for-next/core] [also build test ERROR on v4.5 next-20160318] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url:

RE: RE

2016-03-19 Thread Robert
Please confirm receipt of my previous mail..When can i call you -- 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 http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread okaya
On 2016-03-17 18:54, Russell King - ARM Linux wrote: On Thu, Mar 17, 2016 at 06:02:15PM -0400, Sinan Kaya wrote: Getting ready to remove dma_to_phys API. Drivers should not be using this API for DMA operations. Instead, they should go through the dma_map or dma_alloc APIs. Signed-off-by: Sinan

Re: [PATCH 02/10] crypto: rsa_helper - add raw integer parser actions

2016-03-19 Thread Stephan Mueller
Am Freitag, 18. März 2016, 20:31:59 schrieb Tudor Ambarus: Hi Tudor, > Dedicated to RSA (hardware) implementations that want to use > raw integers instead of MPI keys. > > Signed-off-by: Tudor Ambarus > --- > crypto/rsa.c | 15 >

[PATCH 01/10] crypto: rsa - generalize ASN.1 sequences

2016-03-19 Thread Tudor Ambarus
Use common ASN.1 sequences for all RSA implementations. Give hardware RSA implementations the chance to use the RSA's software implementation parser even if they are likely to want to use raw integers. The parser expects a context that contains at the first address a struct rsa_asn1_action with

Re: [PATCH] crypto: gcm - Fix rfc4543 decryption crash

2016-03-19 Thread Herbert Xu
On Fri, Mar 18, 2016 at 10:34:23AM -0700, Greg KH wrote: > On Fri, Mar 18, 2016 at 10:42:40PM +0800, Herbert Xu wrote: > > This bug has already bee fixed upstream since 4.2. However, it > > was fixed during the AEAD conversion so no fix was backported to > > the older kernels. > > What was the

[PATCH 07/10] crypto: qat - remove duplicate ASN.1 parser

2016-03-19 Thread Tudor Ambarus
Use the RSA's software implementation parser with raw integer actions. Compile-tested only. Signed-off-by: Tudor Ambarus --- drivers/crypto/qat/Kconfig| 3 +- drivers/crypto/qat/qat_common/Makefile| 10 +-

[PATCH 03/10] crypto: add CONFIG_ symbol for rsa helper

2016-03-19 Thread Tudor Ambarus
All RSA implementations can now use the key extract symbols by selecting CRYPTO_RSA_HELPER. Signed-off-by: Tudor Ambarus --- crypto/Kconfig | 8 ++-- crypto/Makefile | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/crypto/Kconfig

[PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Sinan Kaya
Getting ready to remove dma_to_phys API. Drivers should not be using this API for DMA operations. Instead, they should go through the dma_map or dma_alloc APIs. Signed-off-by: Sinan Kaya --- drivers/crypto/marvell/cesa.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 08/10] crypto: scatterwak - Add scatterwalk_sg_copychunks

2016-03-19 Thread Tudor Ambarus
This patch adds the function scatterwalk_sg_copychunks which writes a chunk of data from a scatterwalk to another scatterwalk. It will be used by caam driver to remove the leading zeros of RSA's algorithm output. Signed-off-by: Tudor Ambarus --- crypto/scatterwalk.c

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Russell King - ARM Linux
On Thu, Mar 17, 2016 at 07:17:24PM -0400, ok...@codeaurora.org wrote: > What is the correct way? I don't want to write engine->sram_dma = sram Well, what the driver _is_ wanting to do is to go from a CPU physical address to a device DMA address. phys_to_dma() looks like the correct thing there

[PATCH] crypto: ccp - fix lock acquisition code

2016-03-19 Thread Gary R Hook
This patch simplifies an unneeded read-write lock. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/ccp/ccp-dev.c b/drivers/crypto/ccp/ccp-dev.c index 336e5b7..4dbc187

[PATCH] crypto: n2 - Remove return statement from void function

2016-03-19 Thread Amitoj Kaur Chawla
Return statement at the end of a void function is useless. The Coccinelle semantic patch used to make this change is as follows: // @@ identifier f; expression e; @@ void f(...) { <... - return e; ...> } // Signed-off-by: Amitoj Kaur Chawla --- drivers/crypto/n2_core.c

[PATCH 05/10] crypto: qat - avoid memory corruption or undefined behaviour

2016-03-19 Thread Tudor Ambarus
memcopying to a (null pointer + offset) will result in memory corruption or undefined behaviour. Signed-off-by: Tudor Ambarus --- drivers/crypto/qat/qat_common/qat_asym_algs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

КЛИЕНТСКИЕ БАЗЫ! Тел\Viber\Whatsapp: +79139393506 Email: mnoskova...@gmail.com Skype: prodawez389

2016-03-19 Thread linux-crypto@vger.kernel.org
КЛИЕНТСКИЕ БАЗЫ! Соберем для Вас по интернет базу данных потенциальных клиентов для Вашего Бизнеса! Много! Быстро! Недорого! Узнайте об этом подробнее по Тел: +79139393506 Viber: +79139393506 Whatsapp: +79139393506 Skype: prodawez389 Email: mnoskova...@gmail.com -- To unsubscribe from this

[PATCH] crypto: cleaning and refactoring in rsa.c

2016-03-19 Thread maitesin
* Removed several unused initializations of variables. * Inlined couple of functions. * rsa_check_key_length: changed to use only the switch statement. * rsa_setkey: refactored the implementation to be closer to the other functions in the file. Signed-off-by: Oscar Forner Martinez

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Boris Brezillon
On Fri, 18 Mar 2016 09:51:37 -0400 Sinan Kaya wrote: > On 3/18/2016 7:25 AM, Robin Murphy wrote: > > On 18/03/16 09:30, Boris Brezillon wrote: > >> On Thu, 17 Mar 2016 23:50:20 + > >> Russell King - ARM Linux wrote: > >> > >>> On Thu, Mar 17,

Re: [PATCH] crypto: gcm - Fix rfc4543 decryption crash

2016-03-19 Thread Greg KH
On Fri, Mar 18, 2016 at 10:42:40PM +0800, Herbert Xu wrote: > This bug has already bee fixed upstream since 4.2. However, it > was fixed during the AEAD conversion so no fix was backported to > the older kernels. What was the commit id of that fix? > > When we do an RFC 4543 decryption, we

[PATCH 09/10] crypto: scatterwalk - export scatterwalk_pagedone

2016-03-19 Thread Tudor Ambarus
Used in caam driver. Export the symbol since the caam driver can be built as a module. Signed-off-by: Tudor Ambarus --- crypto/scatterwalk.c | 5 +++-- include/crypto/scatterwalk.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Russell King - ARM Linux
On Thu, Mar 17, 2016 at 06:02:15PM -0400, Sinan Kaya wrote: > Getting ready to remove dma_to_phys API. Drivers should not be > using this API for DMA operations. Instead, they should go > through the dma_map or dma_alloc APIs. > > Signed-off-by: Sinan Kaya > --- >

Re: [PATCH] crypto: cleaning and refactoring in rsa.c

2016-03-19 Thread Herbert Xu
On Fri, Mar 18, 2016 at 08:39:51PM +, maitesin wrote: > * Removed several unused initializations of variables. > * Inlined couple of functions. > * rsa_check_key_length: changed to use only the switch statement. > * rsa_setkey: refactored the implementation to be closer to the other >

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Boris Brezillon
On Thu, 17 Mar 2016 23:50:20 + Russell King - ARM Linux wrote: > On Thu, Mar 17, 2016 at 07:17:24PM -0400, ok...@codeaurora.org wrote: > > What is the correct way? I don't want to write engine->sram_dma = sram > > Well, what the driver _is_ wanting to do is to go

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Sinan Kaya
On 3/18/2016 10:20 AM, Boris Brezillon wrote: > On Fri, 18 Mar 2016 09:51:37 -0400 > Sinan Kaya wrote: > >> On 3/18/2016 7:25 AM, Robin Murphy wrote: >>> On 18/03/16 09:30, Boris Brezillon wrote: On Thu, 17 Mar 2016 23:50:20 + Russell King - ARM Linux

[PATCH 2/2] crypto: marvell/cesa - initialize hash states

2016-03-19 Thread Boris Brezillon
->export() might be called before we have done an update operation, and in this case the ->state field is left uninitialized. Put the correct default value when initializing the request. Signed-off-by: Boris Brezillon --- drivers/crypto/marvell/hash.c | 20