[PATCH] crypto: talitos - properly lock access to global talitos registers

2012-03-30 Thread Horia Geanta
Access to global talitos registers must be protected for the case when affinities are configured such that primary and secondary talitos irqs run on different cpus. Signed-off-by: Horia Geanta horia.gea...@freescale.com Signed-off-by: Kim Phillips kim.phill...@freescale.com --- drivers/crypto

[RFC/PATCH] crypto: talitos - replace the tasklet implementation with NAPI

2012-05-21 Thread Horia Geanta
adding the netdev folks to comment, advise. Thanks, Horia From 30f6247fa5ada7e53523492ca4e70b61e3f5aeeb Mon Sep 17 00:00:00 2001 From: Horia Geanta horia.gea...@freescale.com Date: Wed, 2 May 2012 18:40:03 +0300 Subject: [RFC/PATCH] crypto: talitos - replace the tasklet implementation with NAPI

[PATCH 3/4] crypto: talitos - add sha224, sha384 and sha512 to existing AEAD algorithms

2012-07-03 Thread Horia Geanta
With this, now all combinations of CBC: AES, 3DES-EDE with HMAC: SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 are supported. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/talitos.c | 161 +- drivers/crypto/talitos.h |6

[PATCH 2/4] crypto: talitos - export the talitos_submit function

2012-07-03 Thread Horia Geanta
This patch exports the talitos_submit function so that on need basis same can be used by other entities. Signed-off-by: Sandeep Malik sandeep.ma...@freescale.com Signed-off-by: Kim Phillips kim.phill...@freescale.com Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto

[PATCH 1/4] crypto: talitos - move talitos structures to header file

2012-07-03 Thread Horia Geanta
This patch moves the talitos structure definitions from c file to its header file so that the same can be shared on need basis. Signed-off-by: Sandeep Malik sandeep.ma...@freescale.com Signed-off-by: Kim Phillips kim.phill...@freescale.com Signed-off-by: Horia Geanta horia.gea...@freescale.com

[PATCH 4/4] crypto: testmgr - add aead cbc aes hmac sha1,256,512 test vectors

2012-07-03 Thread Horia Geanta
Test vectors were generated starting from existing CBC(AES) test vectors (RFC3602, NIST SP800-38A) and adding HMAC(SHA*) computed with Crypto++ and double-checked with HashCalc. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- crypto/testmgr.c | 36 +++ crypto/testmgr.h | 834

[PATCH] crypto: testmgr - make the assoc data and iv contiguous for aead tests

2012-07-09 Thread Horia Geanta
.) Signed-off-by: Horia Geanta horia.gea...@freescale.com --- crypto/testmgr.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index ee62d5c..af2a1a3 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -374,7 +374,7 @@ static int

[PATCH 2/5] crypto: talitos - prune unneeded descriptor allocation param

2012-08-02 Thread Horia Geanta
talitos_edesc_alloc does not need hash_result param. Checking whether dst scatterlist is NULL or not is all that is required. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/talitos.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git

[PATCH 3/5] crypto: talitos - change type and name for [src|dst]_is_chained

2012-08-02 Thread Horia Geanta
It's more natural to think of these vars as bool rather than int. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/talitos.c | 41 - 1 files changed, 20 insertions(+), 21 deletions(-) diff --git a/drivers/crypto/talitos.c b

[PATCH 1/5] crypto: talitos - fix icv management on outbound direction

2012-08-02 Thread Horia Geanta
the condition edesc-dma_len 0 must be more specific, i.e. must depend on the type of the output buffer - fragmented or not. Testing was performed by modifying testmgr to support src != dst, since currently native kernel IPsec does in-place encryption (src == dst). Signed-off-by: Horia Geanta horia.gea

[PATCH 4/5] crypto: talitos - support for assoc data provided as scatterlist

2012-08-02 Thread Horia Geanta
Generate a link table in case assoc data is a scatterlist. While at it, add support for handling non-contiguous assoc data and iv. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/talitos.c | 176 - 1 files changed, 125

[PATCH 5/5] crypto: talitos - add IPsec ESN support

2012-08-02 Thread Horia Geanta
Suuport for ESNs (extended sequence numbers). Tested with strongswan on a P2020RDB back-to-back setup. From /etc/ipsec.conf: esp=aes-sha1-esn-modp4096! Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/talitos.c | 318 ++ 1

[PATCH v2 5/5] crypto: talitos - add IPsec ESN support

2012-08-08 Thread Horia Geanta
Support for ESNs (extended sequence numbers). Tested with strongswan on a P2020RDB back-to-back setup. Extracted from /etc/ipsec.conf: esp=aes-sha1-esn-modp4096! Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/talitos.c | 30 -- 1 files

[PATCH] crypto: caam - add IPsec ESN support

2012-09-04 Thread Horia Geanta
Support for ESNs (extended sequence numbers). Tested with strongswan by connecting back-to-back P1010RDB with P2020RDB. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamalg.c | 27 +-- drivers/crypto/caam/compat.h |1 + 2 files

[PATCH] crypto: caam - fix error IDs for SEC v5.x RNG4

2012-09-14 Thread Horia Geanta
According to SEC v5.0-v5.3 reference manuals. Signed-off-by: Horia Geanta horia.gea...@freescale.com Acked-by: Kim Phillips kim.phill...@freescale.com --- drivers/crypto/caam/error.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/caam/error.c b/drivers

Re: [PATCHv1] crypto-caam: added entry for P5040 in SEC-VID to SEC-ERA mapping table.

2012-09-18 Thread Horia Geanta
On 9/17/2012 10:33 AM, Vakul Garg wrote: On P5040, SEC-ERA does not print correctly. This is because SEC-VID to SEC-ERA mapping table does not contain information for P5040. This patch adds this information. Signed-off-by: Vakul Garg va...@freescale.com --- Please update the patch with the

[PATCH 1/3] crypto: talitos - fix icv management on outbound direction

2012-09-19 Thread Horia Geanta
the condition edesc-dma_len 0 must be more specific, i.e. must depend on the type of the output buffer - fragmented or not. Testing was performed by modifying testmgr to support src != dst, since currently native kernel IPsec does in-place encryption (src == dst). Signed-off-by: Horia Geanta horia.gea

[PATCH 2/3] crypto: talitos - support for assoc data provided as scatterlist

2012-09-19 Thread Horia Geanta
Generate a link table in case assoc data is a scatterlist. While at it, add support for handling non-contiguous assoc data and iv. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/talitos.c | 177 - 1 files changed, 126

[PATCH 3/3] crypto: talitos - corrrectly handle zero-length assoc data

2012-09-19 Thread Horia Geanta
. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/talitos.c | 21 - 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 9975718..3ebc1bf 100644 --- a/drivers/crypto/talitos.c +++ b

[PATCH 0/3] crypto: talitos fixes for 3.6-rc7

2012-09-19 Thread Horia Geanta
crash with zero-length assoc data from crypto tree fixes for native crypto. (http://www.mail-archive.com/linux-crypto@vger.kernel.org/msg07662.html) AFAICT, patches apply cleanly both on crypto and 3.6-rc6 ToT. Thanks, Horia Horia Geanta (3): crypto: talitos - fix icv management on outbound

Re: [PATCH 0/3] crypto: talitos fixes for 3.6-rc7

2012-09-27 Thread Horia Geanta
On 9/27/2012 8:25 AM, Herbert Xu wrote: On Wed, Sep 19, 2012 at 09:53:37PM +0300, Horia Geanta wrote: Hi Herbert, I know these patches come late and might not be included in 3.6. But two of them are already sitting in cryptodev tree for some time. (Don't know where my head was :/). I'm

Re: [PATCH 0/3] crypto: talitos fixes for 3.6-rc7

2012-09-27 Thread Horia Geanta
On 9/27/2012 11:14 AM, Herbert Xu wrote: On Thu, Sep 27, 2012 at 11:01:50AM +0300, Horia Geanta wrote: Again, this patch (e46e9a) is not the culprit, it merely exposes the deficiencies in the talitos driver. AFAICT, these cases (zero assoc data, noncontiguous iv and assoc data) have never been

[PATCH] Revert crypto: talitos - add IPsec ESN support

2013-03-20 Thread Horia Geanta
the sequence SPI, SeqNum-High, SeqNum-Low, IV, Payload instead of SPI, SeqNum-Low, IV, Payload, SeqNum-High. Cc: sta...@vger.kernel.org # 3.8, 3.7 Reported-by: Chaoxing Lin chaoxing@ultra-3eti.com Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/talitos.c | 30

[PATCH] Revert crypto: caam - add IPsec ESN support

2013-03-20 Thread Horia Geanta
instead of SPI, SeqNum-Low, IV, Payload, SeqNum-High. Cc: sta...@vger.kernel.org # 3.8, 3.7 Reported-by: Chaoxing Lin chaoxing@ultra-3eti.com Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamalg.c | 27 ++- drivers/crypto/caam/compat.h

[PATCH] crypto: caam - fix inconsistent assoc dma mapping direction

2013-05-10 Thread Horia Geanta
req-assoc is dma mapped BIDIRECTIONAL and unmapped TO_DEVICE. Since it is read-only for the device, use TO_DEVICE both for mapping and unmapping. Cc: sta...@vger.kernel.org # 3.9, 3.8 Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamalg.c |4 ++-- 1 files

[PATCH] crypto: talitos - fix locating offending descriptor in error path

2013-11-13 Thread Horia Geanta
, leading to an oops when trying to return desc-hdr (desc is zero) -read channel's .tail only once; the tail is a moving target; use a local variable for the end of search condition Signed-off-by: Lei Xu lei...@freescale.com Signed-off-by: Horia Geanta horia.gea...@freescale.com Tested-by: Kalyani

[PATCH] crypto: talitos - corrrectly handle zero-length assoc data

2013-11-19 Thread Horia Geanta
. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- This patch was submitted late in the 3.6 cycle, but has not showed up - neither in 3.6 nor in 3.7. Please apply. drivers/crypto/talitos.c | 21 - 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH 3/4] crypto: talitos - fix aead sglen for case 'dst != src'

2013-11-28 Thread Horia Geanta
80e90004 38630001 8109000c 70ea0002 ---[ end trace 4498123cd8478591 ]--- Signed-off-by: Horia Geanta horia.gea...@freescale.com --- Please apply the following first (sent 11/19/2013): crypto: talitos - corrrectly handle zero-length assoc data https://www.mail-archive.com/linux-crypto@vger.kernel.org

[PATCH 4/4] crypto: testmgr - fix sglen in test_aead for case 'dst != src'

2013-11-28 Thread Horia Geanta
encryption / decryption adds / removes the ICV. Cc: Jussi Kivilinna jussi.kivili...@mbnet.fi Signed-off-by: Horia Geanta horia.gea...@freescale.com --- crypto/testmgr.c | 26 -- 1 files changed, 12 insertions(+), 14 deletions(-) diff --git a/crypto/testmgr.c b/crypto

[PATCH] crypto: caam - simplify and harden key parsing

2013-12-19 Thread Horia Geanta
Use the common helper function crypto_authenc_extractkeys() for key parsing. Also fix the key buffer overflow condition: use split key pad length instead of authentication key length. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamalg.c | 36

[PATCH cryptodev 4/4] crypto: caam - add support for aead null encryption

2014-03-14 Thread Horia Geanta
Add support for the following combinations: -encryption: null -authentication: md5, sha* (1, 224, 256, 384, 512) Signed-off-by: Tudor Ambarus tudor.amba...@freescale.com Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamalg.c | 327

[PATCH cryptodev 2/4] crypto: export NULL algorithms defines

2014-03-14 Thread Horia Geanta
These defines might be needed by crypto drivers. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- crypto/crypto_null.c | 6 +- include/crypto/null.h | 11 +++ 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 include/crypto/null.h diff --git a/crypto

[PATCH cryptodev 1/4] crypto: caam - remove error propagation handling

2014-03-14 Thread Horia Geanta
no meaning for SHARE_SERIAL. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamalg.c | 54 ++- 1 file changed, 7 insertions(+), 47 deletions(-) diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index

[PATCH cryptodev 3/4] crypto: testmgr - add aead null encryption test vectors

2014-03-14 Thread Horia Geanta
Add test vectors for aead with null encryption and md5, respectively sha1 authentication. Input data is taken from test vectors listed in RFC2410. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- crypto/tcrypt.c | 8 +++ crypto/testmgr.c | 32 ++ crypto/testmgr.h | 180

[PATCH crypto] crypto: caam - add missing key_dma unmap

2014-03-14 Thread Horia Geanta
(struct caam_ctx) ctx-key_dma needs to be unmapped when context is cleaned up. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamalg.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index

[PATCH crypto 1/2] crypto: caam - fix mem leak in ahash_setkey

2014-04-18 Thread Horia Geanta
In case hash key is bigger than algorithm block size, it is hashed. In this case, memory is allocated to keep this hash in hashed_key. hashed_key has to be freed on the key_dma dma mapping error path. Cc: sta...@vger.kernel.org # 3.10+ Signed-off-by: Horia Geanta horia.gea...@freescale.com

[PATCH crypto 2/2] crypto: caam - add allocation failure handling in SPRINTFCAT macro

2014-04-18 Thread Horia Geanta
GFP_ATOMIC memory allocation could fail. In this case, avoid NULL pointer dereference and notify user. Cc: sta...@vger.kernel.org # 3.2+ Cc: Kim Phillips kim.phill...@freescale.com Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/error.c | 10 +++--- 1 file

[PATCH 00/10] CAAM - DMA API fixes

2014-07-11 Thread Horia Geanta
, Horia Horia Geanta (10): crypto: testmgr - avoid DMA mapping from text, rodata, stack crypto: caam - set coherent_dma_mask crypto: caam - fix typo in dma_mapping_error crypto: caam - fix failed to check map error DMA warnings crypto: caam - fix DMA unmapping error in hash_digest_key

[PATCH 08/10] crypto: caam - fix uninitialized S/G table size in ahash_digest

2014-07-11 Thread Horia Geanta
] ret_from_kernel_thread+0x5c/0x64 Instruction dump: 41de01c8 80a9002c 2f85 40fe0008 80a90008 80fa0018 3c60c06d 811a001c 3863f4a4 813a0020 815a0024 4830cd01 0fe0 81340048 2f89 40feff48 Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamhash.c | 1 + 1 file changed, 1

[PATCH 05/10] crypto: caam - fix DMA unmapping error in hash_digest_key

2014-07-11 Thread Horia Geanta
] test_hash+0x28/0xb0 [c0230458] alg_test_hash+0x48/0xc0 [c022fa94] alg_test+0x114/0x2e0 Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamhash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto

[PATCH 09/10] crypto: caam - fix uninitialized edesc-dst_dma field

2014-07-11 Thread Horia Geanta
] ret_from_kernel_thread+0x5c/0x64 Instruction dump: 41de01c8 80a9002c 2f85 40fe0008 80a90008 80fa0018 3c60c06d 811a001c 3863f4a4 813a0020 815a0024 4830cd01 0fe0 81340048 2f89 40feff48 Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamhash.c | 2 ++ 1 file changed, 2

[PATCH 07/10] crypto: caam - fix DMA direction mismatch in ahash_done_ctx_src

2014-07-11 Thread Horia Geanta
at: [f96251bc] ahash_final_ctx+0x14c/0x7b0 [caamhash] [c022ff4c] __test_hash+0x2ac/0x6c0 [c0230388] test_hash+0x28/0xb0 [c02304a4] alg_test_hash+0x94/0xc0 [c022fa94] alg_test+0x114/0x2e0 Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamhash.c | 2 +- 1 file

[PATCH 02/10] crypto: caam - set coherent_dma_mask

2014-07-11 Thread Horia Geanta
Replace dma_set_mask with dma_set_mask_and_coherent, since both streaming and coherent DMA mappings are being used. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/ctrl.c | 6 +++--- drivers/crypto/caam/jr.c | 6 +++--- 2 files changed, 6 insertions(+), 6

[PATCH 06/10] crypto: caam - fix DMA direction mismatch in ahash_done_ctx_dst

2014-07-11 Thread Horia Geanta
at: [f9352454] ahash_update_first+0x5b4/0xba0 [caamhash] [c022ff28] __test_hash+0x288/0x6c0 [c0230388] test_hash+0x28/0xb0 [c02304a4] alg_test_hash+0x94/0xc0 [c022fa94] alg_test+0x114/0x2e0 Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamhash.c | 2 +- 1 file

[PATCH 04/10] crypto: caam - fix failed to check map error DMA warnings

2014-07-11 Thread Horia Geanta
Use dma_mapping_error for every dma_map_single / dma_map_page. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamalg.c | 34 +++-- drivers/crypto/caam/caamhash.c | 106 ++--- drivers/crypto/caam/caamrng.c | 51

[PATCH 03/10] crypto: caam - fix typo in dma_mapping_error

2014-07-11 Thread Horia Geanta
dma_mapping_error checks for an incorrect DMA address: s/ctx-sh_desc_enc_dma/ctx-sh_desc_dec_dma Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamalg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/caam/caamalg.c b/drivers

[PATCH 01/10] crypto: testmgr - avoid DMA mapping from text, rodata, stack

2014-07-11 Thread Horia Geanta
With DMA_API_DEBUG set, following warnings are emitted (tested on CAAM accelerator): DMA-API: device driver maps memory from kernel text or rodata DMA-API: device driver maps memory from stack and the culprits are: -key in __test_aead and __test_hash -result in __test_hash Signed-off-by: Horia

[PATCH 10/10] crypto: caam - fix uninitialized state-buf_dma field

2014-07-11 Thread Horia Geanta
] [c00497a4] kthread+0xc4/0xe0 [eebd1f40] [c000f2fc] ret_from_kernel_thread+0x5c/0x64 Instruction dump: 41de01c8 80a9002c 2f85 40fe0008 80a90008 80fa0018 3c60c06d 811a001c 3863f4a4 813a0020 815a0024 4830cd01 0fe0 81340048 2f89 40feff48 Signed-off-by: Horia Geanta horia.gea

[PATCH 4/9] crypto: caam - move sec4_sg_entry to sg_sw_sec4.h

2014-07-18 Thread Horia Geanta
sec4_sg_entry structure is used only by helper functions in sg_sw_sec4.h. Since SEC HW S/G entries are to be manipulated only indirectly, via these functions, move sec4_sg_entry to the corresponding header. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/desc.h

[PATCH 3/9] crypto: caam - code cleanup

2014-07-18 Thread Horia Geanta
array size is 16, the condition err_id ARRAY_SIZE(err_id_list) is always true. 3. remove unused / unneeded variables 4. remove precision loss warning - offset field in HW s/g table 5. replace offsetof with container_of Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto

[PATCH] crypto: caam - fix DECO RSR polling

2014-07-21 Thread Horia Geanta
RSR (Request Source Register) is not used when virtualization is disabled, thus don't poll for Valid bit. Besides this, if used, timeout has to be reinitialized. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- Only compile-tested. Ruchika / Kim, please review / test. drivers/crypto

[PATCH v2 01/10] crypto: testmgr - avoid DMA mapping from text, rodata, stack

2014-07-23 Thread Horia Geanta
to accommodate maximum key length from existing test vectors in crypto/testmgr.h (131 bytes) and rounded. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- v2: Addressed Kim's comments. crypto/testmgr.c | 57 crypto/testmgr.h | 2

[PATCH v2 00/12] crypto: caam - Add RTA descriptor creation library

2014-08-14 Thread Horia Geanta
files. Patch 12 adds support for generating kernel-doc for RTA. It depends on upstream (torvalds/linux.git) commit cbb4d3e6510b99522719c5ef0cd0482886a324c0 (scripts/kernel-doc: handle object-like macros) Thanks, Horia Horia Geanta (12): crypto: caam - completely remove error propagation handling

[PATCH v2 03/12] crypto: caam - code cleanup

2014-08-14 Thread Horia Geanta
array size is 16, the condition err_id ARRAY_SIZE(err_id_list) is always true. 3. remove unused / unneeded variables 4. remove precision loss warning - offset field in HW s/g table 5. replace offsetof with container_of Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto

[PATCH v2 02/12] crypto: caam - desc.h fixes

2014-08-14 Thread Horia Geanta
arithmetic source mask 5. rename LDST_SRCDST_WORD_CLASS1_ICV_SZ to LDST_SRCDST_WORD_CLASS1_IV_SZ (it refers to IV, not ICV). Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/desc.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH v2 05/12] crypto: caam - add Run Time Library (RTA) - part 1

2014-08-14 Thread Horia Geanta
defining the API -part 3 - replace desc.h with a newer version (from within library) Signed-off-by: Horia Geanta horia.gea...@freescale.com Signed-off-by: Carmen Iorga carmen.io...@freescale.com --- drivers/crypto/caam/flib/rta/fifo_load_store_cmd.h | 303 drivers/crypto/caam/flib/rta

[PATCH v2 08/12] crypto: caam - use RTA instead of inline append

2014-08-14 Thread Horia Geanta
IPAD | OPAD HMAC keys encrypted with JDKEK (Job Descriptor Key-Encryption Key); JDKEK changes at device POR. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamalg.c | 668 + drivers/crypto/caam/caamhash.c | 389

[PATCH v2 09/12] crypto: caam - completely remove inline append

2014-08-14 Thread Horia Geanta
desc_constr.h no longer has users, being replaced by RTA, so get rid of it. pdb.h is removed since its structures are not currently used. Future protocol descriptors will add these when needed in flib/desc/ directory. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto

[PATCH v2 06/12] crypto: caam - add Run Time Library (RTA) - part 2

2014-08-14 Thread Horia Geanta
Add headers defining the RTA API. Signed-off-by: Horia Geanta horia.gea...@freescale.com Signed-off-by: Carmen Iorga carmen.io...@freescale.com --- drivers/crypto/caam/flib/rta.h | 980 drivers/crypto/caam/flib/rta/protocol_cmd.h | 595

[PATCH v2 10/12] crypto: caam - refactor descriptor creation

2014-08-14 Thread Horia Geanta
Refactor descriptor creation in caamalg and caamhash, i.e. create whole descriptors in the same place / function. This makes the code more comprehensible and easier to maintain. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/caamalg.c | 244

[PATCH] crypto: tcrypt - fix uninit sg entries in test_acipher_speed

2015-03-09 Thread Horia Geanta
90010024 8123 552917be 1d290320 7d295214 ---[ end trace ff191e5b504b4671 ]--- Signed-off-by: Horia Geanta horia.gea...@freescale.com --- This might affect other drivers, haven't checked. There might be other cases failing too. Please carrefuly review side effects of commit 5be4d4c94b1f. crypto

[PATCH v2 3/4] crypto: talitos - move talitos_{edesc,request} to request private ctx

2015-03-13 Thread Horia Geanta
talitos_edesc and talitos_request structures are moved to crypto request private context. This avoids allocating memory in the driver in the cases when data (assoc, in, out) is not scattered. It is also an intermediary step towards adding backlogging support. Signed-off-by: Horia Geanta

[PATCH 2/4] net: esp: check CRYPTO_TFM_REQ_DMA flag when allocating crypto request

2015-03-13 Thread Horia Geanta
Some crypto backends might require the requests' private contexts to be allocated in DMA-able memory. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- Depends on patch 1/4 (sent only on crypto list) that adds the CRYPTO_TFM_REQ_DMA flag. net/ipv4/esp4.c | 7 ++- net/ipv6/esp6.c

[PATCH 3/4] crypto: talitos - move talitos_{edesc,request} to request private ctx

2015-03-13 Thread Horia Geanta
talitos_edesc and talitos_request structures are moved to crypto request private context. This avoids allocating memory in the driver in the cases when data (assoc, in, out) is not scattered. It is also an intermediary step towards adding backlogging support. Signed-off-by: Horia Geanta

[PATCH 1/4] crypto: add CRYPTO_TFM_REQ_DMA flag

2015-03-13 Thread Horia Geanta
The CRYPTO_TFM_REQ_DMA flag can be used by backend implementations to indicate to crypto API the need to allocate GFP_DMA memory for private contexts of the crypto requests. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- include/linux/crypto.h | 9 + 1 file changed, 9

[PATCH v2 1/4] crypto: add CRYPTO_TFM_REQ_DMA flag

2015-03-13 Thread Horia Geanta
The CRYPTO_TFM_REQ_DMA flag can be used by backend implementations to indicate to crypto API the need to allocate GFP_DMA memory for private contexts of the crypto requests. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- include/crypto/hash.h | 4 include/linux/crypto.h | 9

[PATCH 4/4] crypto: talitos - add software backlog queue handling

2015-03-13 Thread Horia Geanta
is returned. The queued requests are dispatched to the hardware in received order as hardware FIFO slots become available. Signed-off-by: Martin Hicks m...@bork.org Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/talitos.c | 107

[PATCH v2 4/4] crypto: talitos - add software backlog queue handling

2015-03-13 Thread Horia Geanta
is returned. The queued requests are dispatched to the hardware in received order as hardware FIFO slots become available. Signed-off-by: Martin Hicks m...@bork.org Signed-off-by: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/talitos.c | 107

[PATCH v2 2/4] net: esp: check CRYPTO_TFM_REQ_DMA flag when allocating crypto request

2015-03-13 Thread Horia Geanta
Some crypto backends might require the requests' private contexts to be allocated in DMA-able memory. Signed-off-by: Horia Geanta horia.gea...@freescale.com --- Depends on patch 1/4 (sent only on crypto list) that adds the CRYPTO_TFM_REQ_DMA flag. net/ipv4/esp4.c | 7 ++- net/ipv6/esp6.c

Re: [RESEND PATCH 2/2] crypto: caam - Support deferred probing in JR dependent drivers

2018-08-07 Thread Horia Geanta
On 8/7/2018 11:00 AM, Marcin Niestroj wrote: > It is possible, that caam_jr_alloc() is called before JR devices are > probed. Return -EPROBE_DEFER in drivers that rely on JR devices, so > they are probed at later stage. > These drivers don't have a probe() callback. Returning -EPROBE_DEFER in

Re: crypto-caamhash: Fine-tuning for several function implementations

2016-09-15 Thread Horia Geanta Neag
On 9/15/2016 5:37 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 15 Sep 2016 16:27:23 +0200 > > Some update suggestions were taken into account > from static source code analysis. > > Markus Elfring (6): > Use kmalloc_array() in ahash_setkey()

Re: [PATCH] crypto: caam: add support for iMX6UL

2016-10-06 Thread Horia Geanta Neag
On 10/4/2016 10:33 AM, Marcus Folkesson wrote: > i.MX6UL does only require three clocks to enable CAAM module. > > Signed-off-by: Marcus Folkesson Reviewed-by: Horia Geantă Thanks, Horia -- To unsubscribe from this list: send the line

Re: [PATCH] crypto: caam - fix dbg_dump_sg() style issues

2016-09-22 Thread Horia Geanta Neag
On 9/22/2016 1:58 PM, Catalin Vasile wrote: > Signed-off-by: Catalin Vasile Reviewed-by: Horia Geantă -- 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

Re: [PATCH] crypto: caam - fix dbg_dump_sg() style issues

2016-09-22 Thread Horia Geanta Neag
On 9/22/2016 2:42 PM, Horia Geanta Neag wrote: > On 9/22/2016 1:58 PM, Catalin Vasile wrote: >> Signed-off-by: Catalin Vasile <cata.vas...@nxp.com> > Reviewed-by: Horia Geantă <horia.gea...@nxp.com> Actually please fix also the warning reported by kbuild test robot in

Re: [PATCH v2] crypto: caam - fix sg dump

2016-09-22 Thread Horia Geanta Neag
On 9/22/2016 11:58 AM, Catalin Vasile wrote: > Ensure scatterlists have a virtual memory mapping before dumping. > > Signed-off-by: Catalin Vasile > --- > Changes: > V2: > * resolved issue of sleeping in atomic contexts > --- > --- >

Re: [PATCH v2] crypto: caam - fix sg dump

2016-09-22 Thread Horia Geanta Neag
On 9/22/2016 1:55 PM, Herbert Xu wrote: > Horia Geanta Neag <horia.gea...@nxp.com> wrote: >> >>> + >>> +static void dbg_dump_sg(const char *level, const char *prefix_str, >>> + int prefix_type, int rowsize, int groupsize, >>&

Re: [PATCH] crypto: caam - fix sg dump

2016-09-16 Thread Horia Geanta Neag
On 9/16/2016 12:06 PM, Catalin Vasile wrote: > Ensure scatterlists have a virtual memory mapping before dumping. > > Signed-off-by: Catalin Vasile > --- > drivers/crypto/caam/caamalg.c | 65 > +-- > 1 file changed, 50 insertions(+),

Re: ahash and crc32c

2016-10-28 Thread Horia Geanta Neag
On 2/26/2013 7:11 PM, Zeev Zilberman wrote: > Hi, > > I'm working on an ahash driver that supports CRC32C. > I saw that all existing CRC32C implementations (except blackfin) are > implementing shash interface, but ahash seems to be the correct choice > in our case. > On the other hand I saw that

Re: [PATCH] crypto: caam: do not register AES-XTS mode on LP units

2016-11-07 Thread Horia Geanta Neag
On 11/5/2016 1:17 AM, Sven Ebenfeld wrote: > When using AES-XTS on a Wandboard, we receive a Mode error: > caam_jr 2102000.jr1: 20001311: CCB: desc idx 19: AES: Mode error. > > Due to the Security Reference Manual, the Low Power AES units s/Due to/According to > of the i.MX6 do not support the

Re: [PATCH] crypto: caam: fix type mismatch warning

2016-10-26 Thread Horia Geanta Neag
On 10/26/2016 12:29 AM, Arnd Bergmann wrote: > Building the caam driver on arm64 produces a harmless warning: > > drivers/crypto/caam/caamalg.c:140:139: warning: comparison of distinct > pointer types lacks a cast > > We can use min_t to tell the compiler which type we want it to use > here. >

Re: [PATCH v2] crypto: mxs-dcp - Remove hash support

2016-10-28 Thread Horia Geanta Neag
On 10/25/2016 12:33 AM, Fabio Estevam wrote: > On Mon, Oct 24, 2016 at 6:39 PM, Marek Vasut wrote: > >> Can't you rather fix it? > > I would love to have this fixed, but I don't know how. Looking on the i.MX6 Solo Lite security manual, the fix seems to consist in enabling