- 23 7月, 2014 1 次提交
-
-
由 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: NHoria Geanta <horia.geanta@freescale.com> Acked-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 10 7月, 2014 1 次提交
-
-
由 Ruchika Gupta 提交于
The layer which registers with the crypto API should check for the presence of the CAAM device it is going to use. If the platform's device tree doesn't have the required CAAM node, the layer should return an error and not register the algorithms with crypto API layer. Signed-off-by: NRuchika Gupta <ruchika.gupta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 25 6月, 2014 1 次提交
-
-
由 Ruchika Gupta 提交于
At few places in caamhash and caamalg, after allocating a dmable buffer for sg table , the buffer was being modified. As per definition of DMA_FROM_DEVICE ,afer allocation the memory should be treated as read-only by the driver. This patch shifts the allocation of dmable buffer for sg table after it is populated by the driver, making it read-only as per the DMA API's requirement. Signed-off-by: NRuchika Gupta <ruchika.gupta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 13 5月, 2014 1 次提交
-
-
由 Vakul Garg 提交于
Re-initialize keys_fit_inline to avoid using its stale encrypt() shared descriptor value prior to building descriptors for the decrypt() and givencrypt() cases. Signed-off-by: NVakul Garg <vakul@freescale.com> [reworded commit text, enhanced code readability] Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 08 5月, 2014 1 次提交
-
-
由 Marek Vasut 提交于
The tentacles of this function were firmly attached to various places in the CAAM code. Just cut them, or this cthulhu function will sprout them anew. Signed-off-by: NMarek Vasut <marex@denx.de> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Horia Geanta <horia.geanta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 21 3月, 2014 3 次提交
-
-
由 Horia Geanta 提交于
(struct caam_ctx) ctx->key_dma needs to be unmapped when context is cleaned up. Signed-off-by: NHoria Geanta <horia.geanta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Horia Geanta 提交于
Add support for the following combinations: -encryption: null -authentication: md5, sha* (1, 224, 256, 384, 512) Signed-off-by: NTudor Ambarus <tudor.ambarus@freescale.com> Signed-off-by: NHoria Geanta <horia.geanta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Horia Geanta 提交于
Commit 61bb86bb ("crypto: caam - set descriptor sharing type to SERIAL") changed the descriptor sharing mode from SHARE_WAIT to SHARE_SERIAL. All descriptor commands that handle the "ok to share" and "error propagation" settings should also go away, since they have no meaning for SHARE_SERIAL. Signed-off-by: NHoria Geanta <horia.geanta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 20 12月, 2013 1 次提交
-
-
由 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: NHoria Geanta <horia.geanta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 28 11月, 2013 1 次提交
-
-
由 Horia Geanta 提交于
For aead case when source and destination buffers are different, there is an incorrect assumption that the source length includes the ICV length. Fix this, since it leads to an oops when using sg_count() to find the number of nents in the scatterlist: Unable to handle kernel paging request for data at address 0x00000004 Faulting instruction address: 0xf91f7634 Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=8 P4080 DS Modules linked in: caamalg(+) caam_jr caam CPU: 1 PID: 1053 Comm: cryptomgr_test Not tainted 3.11.0 #16 task: eeb24ab0 ti: eeafa000 task.ti: eeafa000 NIP: f91f7634 LR: f91f7f24 CTR: f91f7ef0 REGS: eeafbbc0 TRAP: 0300 Not tainted (3.11.0) MSR: 00029002 <CE,EE,ME> CR: 44044044 XER: 00000000 DEAR: 00000004, ESR: 00000000 GPR00: f91f7f24 eeafbc70 eeb24ab0 00000002 ee8e0900 ee8e0800 00000024 c45c4462 GPR08: 00000010 00000000 00000014 0c0e4000 24044044 00000000 00000000 c0691590 GPR16: eeab0000 eeb23000 00000000 00000000 00000000 00000001 00000001 eeafbcc8 GPR24: 000000d1 00000010 ee2d5000 ee49ea10 ee49ea10 ee46f640 ee46f640 c0691590 NIP [f91f7634] aead_edesc_alloc.constprop.14+0x144/0x780 [caamalg] LR [f91f7f24] aead_encrypt+0x34/0x288 [caamalg] Call Trace: [eeafbc70] [a1004000] 0xa1004000 (unreliable) [eeafbcc0] [f91f7f24] aead_encrypt+0x34/0x288 [caamalg] [eeafbcf0] [c020d77c] __test_aead+0x3ec/0xe20 [eeafbe20] [c020f35c] test_aead+0x6c/0xe0 [eeafbe40] [c020f420] alg_test_aead+0x50/0xd0 [eeafbe60] [c020e5e4] alg_test+0x114/0x2e0 [eeafbee0] [c020bd1c] cryptomgr_test+0x4c/0x60 [eeafbef0] [c0047058] kthread+0xa8/0xb0 [eeafbf40] [c000eb0c] ret_from_kernel_thread+0x5c/0x64 Instruction dump: 69084321 7d080034 5508d97e 69080001 0f080000 81290024 552807fe 0f080000 3a600001 5529003a 2f8a0000 40dd0028 <80e90004> 3ab50001 8109000c 70e30002 ---[ end trace b3c3e23925c7484e ]--- While here, add a tcrypt mode for making it easy to test authenc (needed for triggering case above). Signed-off-by: NHoria Geanta <horia.geanta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 30 10月, 2013 2 次提交
-
-
由 Ruchika Gupta 提交于
- Earlier interface layers - caamalg, caamhash, caamrng were directly using the Controller driver private structure to access the Job ring. - Changed the above to use alloc/free API's provided by Job Ring Drive Signed-off-by: NRuchika Gupta <ruchika.gupta@freescale.com> Reviewed-by: NGarg Vakul-B16394 <vakul@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Ruchika Gupta 提交于
The SEC Job Rings are now available as individual devices. This would enable sharing of job rings between kernel and user space. Job Rings can now be dynamically bound/unbound from kernel. Changes are made in the following layers of CAAM Driver 1. Controller driver - Does basic initialization of CAAM Block. - Creates platform devices for Job Rings. (Earlier the initialization of Job ring was done by the controller driver) 2. JobRing Platform driver - Manages the platform Job Ring devices created by the controller driver Signed-off-by: NRuchika Gupta <ruchika.gupta@freescale.com> Reviewed-by: NGarg Vakul-B16394 <vakul@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 13 9月, 2013 1 次提交
-
-
由 Alex Porosanu 提交于
If the CAAM driver initialization failed (due to various reasons, e.g. RNG4 initialization failed), then the registration of hash/algorithms/rng shouldn't take place. This patch adds the necessary code to prevent this registration. Signed-off-by: NAlex Porosanu <alexandru.porosanu@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 21 8月, 2013 1 次提交
-
-
由 Alex Porosanu 提交于
CAAM driver contains one macro (xstr) used for printing the line location in a file where a memdump is done. This patch replaces the xstr macro with the already existing __stringify macro that performs the same function. Signed-off-by: NAlex Porosanu <alexandru.porosanu@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 10 7月, 2013 1 次提交
-
-
由 Vakul Garg 提交于
DESC_JOB_IO_LEN is a generic macro which indicates the space required in the descriptor for placing SEQIN/OUT commands, job descriptor header, shared descriptor pointer. Moving it to descriptor construction file which can be supposedly included by different algo offload files. Change-Id: Ic8900990d465e9079827b0c7fcacc61766d7efb6 Signed-off-by: NVakul Garg <vakul@freescale.com> Reviewed-by: NGeanta Neag Horia Ioan-B05471 <horia.geanta@freescale.com> Reviewed-by: NFleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: NFleming Andrew-AFLEMING <AFLEMING@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 14 5月, 2013 1 次提交
-
-
由 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: <stable@vger.kernel.org> # 3.9, 3.8 Signed-off-by: NHoria Geanta <horia.geanta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 22 3月, 2013 1 次提交
-
-
由 Vakul Garg 提交于
Following AEAD algo templates are updated for '.type' initialization. (a) authenc(hmac(sha224),cbc(aes)) (b) authenc(hmac(sha384),cbc(aes)) (c) authenc(hmac(sha224),cbc(des3_ede)) (d) authenc(hmac(sha384),cbc(des3_ede)) (e) authenc(hmac(sha224),cbc(des)) (f) authenc(hmac(sha384),cbc(des)) Signed-off-by: NVakul Garg <vakul@freescale.com> Reviewed-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 21 3月, 2013 1 次提交
-
-
由 Horia Geanta 提交于
This reverts commit 891104ed. Current IPsec ESN implementation for authencesn(cbc(aes), hmac(sha)) (separate encryption and integrity algorithms) does not conform to RFC4303. ICV is generated by hashing the sequence SPI, SeqNum-High, SeqNum-Low, IV, Payload instead of SPI, SeqNum-Low, IV, Payload, SeqNum-High. Cc: <stable@vger.kernel.org> # 3.8, 3.7 Reported-by: NChaoxing Lin <Chaoxing.Lin@ultra-3eti.com> Signed-off-by: NHoria Geanta <horia.geanta@freescale.com> Reviewed-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 07 9月, 2012 2 次提交
-
-
由 Horia Geanta 提交于
Support for ESNs (extended sequence numbers). Tested with strongswan by connecting back-to-back P1010RDB with P2020RDB. Signed-off-by: NHoria Geanta <horia.geanta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Kim Phillips 提交于
use true/false for bool, fix code alignment, and fix two allocs with no test. Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 01 8月, 2012 1 次提交
-
-
由 Kim Phillips 提交于
SHARE_WAIT, whilst more optimal for association-less crypto, has the ability to start thrashing the CCB descriptor/key caches, given high levels of traffic across multiple security associations (and thus keys). Switch to using the SERIAL sharing type, which prefers the last used CCB for the SA. On a 2-DECO platform such as the P3041, this can improve performance by about 3.7%. Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 27 6月, 2012 6 次提交
-
-
由 Yuan Kang 提交于
support chained scatterlists for aead, ablkcipher and ahash. Signed-off-by: NYuan Kang <Yuan.Kang@freescale.com> - fix dma unmap leak - un-unlikely src == dst, due to experience with AF_ALG Signed-off-by: NKudupudi Ugendreshwar <B38865@freescale.com> Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Yuan Kang 提交于
- rename scatterlist and link_tbl functions - link_tbl changed to sec4_sg - sg_to_link_tbl_one changed to dma_to_sec4_sg_one, since no scatterlist is use Signed-off-by: NYuan Kang <Yuan.Kang@freescale.com> Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Yuan Kang 提交于
create separate files for split key generation and scatterlist functions. Signed-off-by: NYuan Kang <Yuan.Kang@freescale.com> Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Yuan Kang 提交于
remove caam_jr_register and caam_jr_deregister to allow sharing of job rings. Signed-off-by: NYuan Kang <Yuan.Kang@freescale.com> Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Yuan Kang 提交于
functions for external storage of seq in/out lengths, i.e., for 32-bit lengths. These type-dependent functions automatically determine whether to store the length internally (embedded in the command header word) or externally (after the address pointer), based on size of the type given. Signed-off-by: NYuan Kang <Yuan.Kang@freescale.com> Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Kim Phillips 提交于
presumably leftovers from possible macro development. Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 29 3月, 2012 1 次提交
-
-
由 Shengzhou Liu 提交于
In some device trees of previous version, there were string "fsl,sec4.0". To be backward compatible with device trees, we have CAAM driver first check "fsl,sec-v4.0", if it fails, then check for "fsl,sec4.0". Signed-off-by: NShengzhou Liu <Shengzhou.Liu@freescale.com> Acked-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 13 1月, 2012 3 次提交
-
-
由 Kim Phillips 提交于
sha224 and 384 support extends caam noise to 21 lines. Do the same as commit 5b859b6e "crypto: talitos - be less noisy on startup", but for caam, and display: caam ffe300000.crypto: fsl,sec-v4.0 algorithms registered in /proc/crypto Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Hemant Agrawal 提交于
Signed-off-by: NHemant Agrawal <hemant@freescale.com> Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Nikos Mavrogiannopoulos 提交于
The added CRYPTO_ALG_KERN_DRIVER_ONLY indicates whether a cipher is only available via a kernel driver. If the cipher implementation might be available by using an instruction set or by porting the kernel code, then it must not be set. Signed-off-by: NNikos Mavrogiannopoulos <nmav@gnutls.org> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 20 12月, 2011 1 次提交
-
-
由 Kim Phillips 提交于
the polarity of the definition for error propagation was reverse in the initial desc.h. Fix desc.h and its users. Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 21 11月, 2011 1 次提交
-
-
由 Kim Phillips 提交于
specifically, add these algorithm combinations: authenc-hmac-md5-cbc-aes-caam authenc-hmac-md5-cbc-des3_ede-caam authenc-hmac-md5-cbc-des-caam Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 15 7月, 2011 4 次提交
-
-
由 Yuan Kang 提交于
caam now supports encrypt and decrypt for aes, des and 3des Signed-off-by: NYuan Kang <Yuan.Kang@freescale.com> Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Yuan Kang 提交于
Job descriptors only contain header and seq pointers. Other commands are stored in separate shared descriptors for encrypt, decrypt and givencrypt, stored as arrays in caam_ctx. This requires additional macros to create math commands to calculate assoclen and cryptlen. Signed-off-by: NYuan Kang <Yuan.Kang@freescale.com> Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Yuan Kang 提交于
caam_ctx.key_phys to key_dma caam_alg_template supports multiple algorithm types listed in union, which requires cases for different types in function caam_alg_alloc Signed-off-by: NYuan Kang <Yuan.Kang@freescale.com> Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Yuan Kang 提交于
"aead_authenc" and "ipsec_esp" changed to "aead," except for function "ipsec_esp," which is changed to "init_aead_job." Variable name of aead_request structures changed to "req" and name of aead_givcrypt_request structure changed to "areq" Signed-off-by: NYuan Kang <Yuan.Kang@freescale.com> Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 30 6月, 2011 1 次提交
-
-
由 Kim Phillips 提交于
setkey allocates 16 bytes (CAAM_CMD_SZ * DESC_AEAD_SHARED_TEXT_LEN) shy of what is needed to store the shared descriptor, resulting in memory corruption. Fix this. Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 19 5月, 2011 2 次提交
-
-
由 Kim Phillips 提交于
In doing so, sha512 sized keys would not fit with the current descriptor inlining mechanism, so we now calculate whether keys should be referenced instead by pointers in the shared descriptor. also, use symbols for descriptor text lengths, and, ahem, unmap and free key i/o memory in cra_exit. Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Kim Phillips 提交于
Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-