Revision tags: v4.9 |
|
#
1a0166f1 |
| 22-Nov-2016 |
Horia Geantă <horia.geanta@nxp.com> |
crypto: caam - refactor ahash shared descriptor generation Move ahash shared descriptor generation into a single function. Currently there is no plan to support ahash on any other interf
crypto: caam - refactor ahash shared descriptor generation Move ahash shared descriptor generation into a single function. Currently there is no plan to support ahash on any other interface besides the Job Ring, thus for now the functionality is not exported. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
6655cb8e |
| 22-Nov-2016 |
Horia Geantă <horia.geanta@nxp.com> |
crypto: caam - consolidate split key length computation Move split key length and padded length computation from caamalg.c and caamhash.c to key_gen.c. Signed-off-by: Horia Gean
crypto: caam - consolidate split key length computation Move split key length and padded length computation from caamalg.c and caamhash.c to key_gen.c. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
281669df |
| 22-Nov-2016 |
Horia Geantă <horia.geanta@nxp.com> |
crypto: caam - rewrite some generic inline append cmds A few descriptor commands are generated using generic inline append "append_cmd" function. Rewrite them using specific inline a
crypto: caam - rewrite some generic inline append cmds A few descriptor commands are generated using generic inline append "append_cmd" function. Rewrite them using specific inline append functions. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
488ebc3a |
| 22-Nov-2016 |
Horia Geantă <horia.geanta@nxp.com> |
crypto: caam - remove superfluous alg_op algorithm param Information carried by alg_op can be deduced from adata->algtype plus some fixed flags. Signed-off-by: Horia Geantă <hor
crypto: caam - remove superfluous alg_op algorithm param Information carried by alg_op can be deduced from adata->algtype plus some fixed flags. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
db57656b |
| 22-Nov-2016 |
Horia Geantă <horia.geanta@nxp.com> |
crypto: caam - group algorithm related params In preparation of factoring out the shared descriptors, struct alginfo is introduced to group the algorithm related parameters.
crypto: caam - group algorithm related params In preparation of factoring out the shared descriptors, struct alginfo is introduced to group the algorithm related parameters. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
Revision tags: openbmc-4.4-20161121-1, v4.4.33, v4.4.32, v4.4.31 |
|
#
9a1a1c08 |
| 09-Nov-2016 |
Horia Geantă <horia.geanta@nxp.com> |
crypto: caam - merge identical ahash_final/finup shared desc Shared descriptors used by ahash_final() and ahash_finup() are identical, thus get rid of one of them (sh_desc_finup).
crypto: caam - merge identical ahash_final/finup shared desc Shared descriptors used by ahash_final() and ahash_finup() are identical, thus get rid of one of them (sh_desc_finup). Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
4ca7c7d8 |
| 09-Nov-2016 |
Horia Geantă <horia.geanta@nxp.com> |
crypto: caam - trivial code clean-up -replace offsetof with container_of -remove unused "assoc_nents", "iv_dma" from aead_edesc and fix comments -remove unused CAAM_MAX_IV_LENGTH
crypto: caam - trivial code clean-up -replace offsetof with container_of -remove unused "assoc_nents", "iv_dma" from aead_edesc and fix comments -remove unused CAAM_MAX_IV_LENGTH #define Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
39957c8e |
| 09-Nov-2016 |
Horia Geantă <horia.geanta@nxp.com> |
crypto: caam - completely remove error propagation handling Commit 4464a7d4f53d756101291da26563f37f7fce40f3 ("crypto: caam - remove error propagation handling") removed error propaga
crypto: caam - completely remove error propagation handling Commit 4464a7d4f53d756101291da26563f37f7fce40f3 ("crypto: caam - remove error propagation handling") removed error propagation handling only from caamalg. Do this in all other places: caamhash, caamrng. Update descriptors' lengths appropriately. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
Revision tags: v4.4.30, v4.4.29, v4.4.28, v4.4.27, v4.7.10, openbmc-4.4-20161021-1, v4.7.9, v4.4.26, v4.7.8, v4.4.25, v4.4.24, v4.7.7, v4.8, v4.4.23, v4.7.6, v4.7.5, v4.4.22 |
|
#
06435f34 |
| 15-Sep-2016 |
Markus Elfring <elfring@users.sourceforge.net> |
crypto: caam - Move common error handling code in two functions Move statements for error handling which were identical in two if branches to the end of these functions. Signed-
crypto: caam - Move common error handling code in two functions Move statements for error handling which were identical in two if branches to the end of these functions. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
9e6df0fd |
| 15-Sep-2016 |
Markus Elfring <elfring@users.sourceforge.net> |
crypto: caam - Delete an unnecessary initialisation in seven functions The local variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at
crypto: caam - Delete an unnecessary initialisation in seven functions The local variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
e6cc5b8d |
| 15-Sep-2016 |
Markus Elfring <elfring@users.sourceforge.net> |
crypto: caam - Return a value directly in caam_hash_cra_init() * Return a value at the end without storing it in an intermediate variable. * Delete the local variable "ret" which be
crypto: caam - Return a value directly in caam_hash_cra_init() * Return a value at the end without storing it in an intermediate variable. * Delete the local variable "ret" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
58b0e5d0 |
| 15-Sep-2016 |
Markus Elfring <elfring@users.sourceforge.net> |
crypto: caam - Rename a jump label in five functions Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourcefo
crypto: caam - Rename a jump label in five functions Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
d6e7a7d0 |
| 15-Sep-2016 |
Markus Elfring <elfring@users.sourceforge.net> |
crypto: caam - Rename jump labels in ahash_setkey() Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourcefor
crypto: caam - Rename jump labels in ahash_setkey() Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
e7a33c4d |
| 15-Sep-2016 |
Markus Elfring <elfring@users.sourceforge.net> |
crypto: caam - Use kmalloc_array() in ahash_setkey() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed.
crypto: caam - Use kmalloc_array() in ahash_setkey() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
Revision tags: v4.4.21, v4.7.4, v4.7.3, v4.4.20, v4.7.2, v4.4.19, openbmc-4.4-20160819-1, v4.7.1, v4.4.18, v4.4.17 |
|
#
65cf164a |
| 08-Aug-2016 |
Russell King <rmk+kernel@arm.linux.org.uk> |
crypto: caam - add ahash_edesc_add_src() Add a helper to map the source scatterlist into the descriptor. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by:
crypto: caam - add ahash_edesc_add_src() Add a helper to map the source scatterlist into the descriptor. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
30a43b44 |
| 08-Aug-2016 |
Russell King <rmk+kernel@arm.linux.org.uk> |
crypto: caam - move job descriptor initialisation to ahash_edesc_alloc() Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
5588d039 |
| 08-Aug-2016 |
Russell King <rmk+kernel@arm.linux.org.uk> |
crypto: caam - add ahash_edesc_alloc() for descriptor allocation Add a helper function to perform the descriptor allocation. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk
crypto: caam - add ahash_edesc_alloc() for descriptor allocation Add a helper function to perform the descriptor allocation. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
bc13c69e |
| 08-Aug-2016 |
Russell King <rmk+kernel@arm.linux.org.uk> |
crypto: caam - check and use dma_map_sg() return code Strictly, dma_map_sg() may coalesce SG entries, but in practise on iMX hardware, this will never happen. However, dma_map_sg() can
crypto: caam - check and use dma_map_sg() return code Strictly, dma_map_sg() may coalesce SG entries, but in practise on iMX hardware, this will never happen. However, dma_map_sg() can fail, and we completely fail to check its return value. So, fix this properly. Arrange the code to map the scatterlist early, so we know how many scatter table entries to allocate, and then fill them in. This allows us to keep relatively simple error cleanup paths. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
32686d34 |
| 08-Aug-2016 |
Russell King <rmk+kernel@arm.linux.org.uk> |
crypto: caam - ensure that we clean up after an error Ensure that we clean up allocations and DMA mappings after encountering an error rather than just giving up and leaking memory and r
crypto: caam - ensure that we clean up after an error Ensure that we clean up allocations and DMA mappings after encountering an error rather than just giving up and leaking memory and resources. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
343e44b1 |
| 08-Aug-2016 |
Russell King <rmk+kernel@arm.linux.org.uk> |
crypto: caam - replace sec4_sg pointer with array Since the extended descriptor includes the hardware descriptor, and the sec4 scatterlist immediately follows this, we can declare it as
crypto: caam - replace sec4_sg pointer with array Since the extended descriptor includes the hardware descriptor, and the sec4 scatterlist immediately follows this, we can declare it as a array at the very end of the extended descriptor. This allows us to get rid of an initialiser for every site where we allocate an extended descriptor. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
d7b24ed4 |
| 08-Aug-2016 |
Russell King <rmk+kernel@arm.linux.org.uk> |
crypto: caam - mark the hardware descriptor as cache line aligned Mark the hardware descriptor as being cache line aligned; on DMA incoherent architectures, the hardware descriptor shoul
crypto: caam - mark the hardware descriptor as cache line aligned Mark the hardware descriptor as being cache line aligned; on DMA incoherent architectures, the hardware descriptor should sit in a separate cache line from the CPU accessed data to avoid polluting the caches. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
64ce56cb |
| 08-Aug-2016 |
Russell King <rmk+kernel@arm.linux.org.uk> |
crypto: caam - incorporate job descriptor into struct ahash_edesc Rather than giving the descriptor as hw_desc[0], give it's real size. All places where we allocate an ahash_edesc incorp
crypto: caam - incorporate job descriptor into struct ahash_edesc Rather than giving the descriptor as hw_desc[0], give it's real size. All places where we allocate an ahash_edesc incorporate DESC_JOB_IO_LEN bytes of job descriptor. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
e11793f5 |
| 08-Aug-2016 |
Russell King <rmk+kernel@arm.linux.org.uk> |
crypto: caam - ensure descriptor buffers are cacheline aligned Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
3d5a2db6 |
| 08-Aug-2016 |
Russell King <rmk+kernel@arm.linux.org.uk> |
crypto: caam - fix DMA API mapping leak caamhash contains this weird code: src_nents = sg_count(req->src, req->nbytes); dma_map_sg(jrdev, req->src, src_nents ? :
crypto: caam - fix DMA API mapping leak caamhash contains this weird code: src_nents = sg_count(req->src, req->nbytes); dma_map_sg(jrdev, req->src, src_nents ? : 1, DMA_TO_DEVICE); ... edesc->src_nents = src_nents; sg_count() returns zero when sg_nents_for_len() returns zero or one. This means we don't need to use a hardware scatterlist. However, setting src_nents to zero causes problems when we unmap: if (edesc->src_nents) dma_unmap_sg_chained(dev, req->src, edesc->src_nents, DMA_TO_DEVICE, edesc->chained); as zero here means that we have no entries to unmap. This causes us to leak DMA mappings, where we map one scatterlist entry and then fail to unmap it. This can be fixed in two ways: either by writing the number of entries that were requested of dma_map_sg(), or by reworking the "no SG required" case. We adopt the re-work solution here - we replace sg_count() with sg_nents_for_len(), so src_nents now contains the real number of scatterlist entries, and we then change the test for using the hardware scatterlist to src_nents > 1 rather than just non-zero. This change passes my sshd, openssl tests hashing /bin and tcrypt tests. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
#
a0118c8b |
| 09-Aug-2016 |
Russell King <rmk+kernel@armlinux.org.uk> |
crypto: caam - fix non-hmac hashes Since 6de62f15b581 ("crypto: algif_hash - Require setkey before accept(2)"), the AF_ALG interface requires userspace to provide a key to any algori
crypto: caam - fix non-hmac hashes Since 6de62f15b581 ("crypto: algif_hash - Require setkey before accept(2)"), the AF_ALG interface requires userspace to provide a key to any algorithm that has a setkey method. However, the non-HMAC algorithms are not keyed, so setting a key is unnecessary. Fix this by removing the setkey method from the non-keyed hash algorithms. Fixes: 6de62f15b581 ("crypto: algif_hash - Require setkey before accept(2)") Cc: <stable@vger.kernel.org> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|