aboutsummaryrefslogtreecommitdiffstats
path: root/.mailmap (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2017-10-07crypto: bcm - use of_device_get_match_dataCorentin LABBE1-5/+2
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-10-07crypto: omap - use of_device_get_match_dataCorentin LABBE3-15/+6
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-10-07crypto: stm32 - use of_device_get_match_dataCorentin LABBE1-5/+2
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-10-07crypto: algboss - remove redundant setting of len to zeroColin Ian King1-1/+0
The variable len is set to zero, never read and then later updated to p - name, so clearly the zero'ing of len is redundant and can be removed. Detected by clang scan-build: " warning: Value stored to 'len' is never read" Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-10-07crypto: omap - return -ENOMEM on allocation failure.Allen1-1/+1
Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-10-07padata: ensure padata_do_serial() runs on the correct CPUMathias Krause2-1/+21
If the algorithm we're parallelizing is asynchronous we might change CPUs between padata_do_parallel() and padata_do_serial(). However, we don't expect this to happen as we need to enqueue the padata object into the per-cpu reorder queue we took it from, i.e. the same-cpu's parallel queue. Ensure we're not switching CPUs for a given padata object by tracking the CPU within the padata object. If the serial callback gets called on the wrong CPU, defer invoking padata_reorder() via a kernel worker on the CPU we're expected to run on. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-10-07padata: ensure the reorder timer callback runs on the correct CPUMathias Krause2-1/+44
The reorder timer function runs on the CPU where the timer interrupt was handled which is not necessarily one of the CPUs of the 'pcpu' CPU mask set. Ensure the padata_reorder() callback runs on the correct CPU, which is one in the 'pcpu' CPU mask set and, preferrably, the next expected one. Do so by comparing the current CPU with the expected target CPU. If they match, call padata_reorder() right away. If they differ, schedule a work item on the target CPU that does the padata_reorder() call for us. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-10-07padata: set cpu_index of unused CPUs to -1Mathias Krause1-1/+7
The parallel queue per-cpu data structure gets initialized only for CPUs in the 'pcpu' CPU mask set. This is not sufficient as the reorder timer may run on a different CPU and might wrongly decide it's the target CPU for the next reorder item as per-cpu memory gets memset(0) and we might be waiting for the first CPU in cpumask.pcpu, i.e. cpu_index 0. Make the '__this_cpu_read(pd->pqueue->cpu_index) == next_queue->cpu_index' compare in padata_get_next() fail in this case by initializing the cpu_index member of all per-cpu parallel queues. Use -1 for unused ones. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-10-07crypto: crc32-pclmul - remove useless relative addressingMikulas Patocka1-11/+6
In 32-bit mode, the x86 architecture can hold full 32-bit pointers. Therefore, the code that copies the current address to the %ecx register and uses %ecx-relative addressing is useless, we could just use absolute addressing. The processors have a stack of return addresses for branch prediction. If we use a call instruction and pop the return address, it desynchronizes the return stack and causes branch prediction misses. This patch also moves the data to the .rodata section. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-10-07crypto:ccp - invoke the DMA callback in a standard wayamd1-3/+1
Use the provided mechanism in dmaengine.h to invoke the completion callback. Signed-off-by: Gary R Hook <gary.hook@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-10-07crypto: ccp - unmap pages and remove unmap objects in callbackamd1-0/+1
Clean up the mapped pages and the unmap object once we are done with it. This enables the final clean-up of the object once the transfer is complete. Signed-off-by: Gary R Hook <gary.hook@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: brcm - Explicity ACK mailbox messageraveendra padasalagi1-55/+46
Add support to explicity ACK mailbox message because after sending message we can know the send status via error attribute of brcm_message. This is needed to support "txdone_ack" supported in mailbox controller driver. Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver") Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com> Reviewed-by: Anup Patel <anup.patel@broadcom.com> Reviewed-by: Scott Branden <scott.branden@broadcom.com> Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: drop unnecessary return statementsGeliang Tang8-13/+0
Fix checkpatch.pl warnings: WARNING: void function return statements are not generally useful FILE: crypto/rmd128.c:218: FILE: crypto/rmd160.c:261: FILE: crypto/rmd256.c:233: FILE: crypto/rmd320.c:280: FILE: crypto/tcrypt.c:385: FILE: drivers/crypto/ixp4xx_crypto.c:538: FILE: drivers/crypto/marvell/cesa.c:81: FILE: drivers/crypto/ux500/cryp/cryp_core.c:1755: Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: Use PTR_ERR_ZEROHimanshu Jha3-12/+3
Use PTR_ERROR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Build successfully. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: inside-secure - remove null check before kfreeHimanshu Jha1-4/+2
Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: n2 - remove null check before kfreeHimanshu Jha1-8/+4
kfree on NULL pointer is a no-op and therefore checking it is redundant. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: padlock-sha - constify x86_cpu_idArvind Yadav1-1/+1
x86_cpu_id are not supposed to change at runtime. MODULE_DEVICE_TABLE and x86_match_cpu are working with const x86_cpu_id. So mark the non-const x86_cpu_id structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: padlock-aes - constify x86_cpu_idArvind Yadav1-1/+1
x86_cpu_id are not supposed to change at runtime. MODULE_DEVICE_TABLE and x86_match_cpu are working with const x86_cpu_id. So mark the non-const x86_cpu_id structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - pointer arithmetic overhaulChristian Lamparter3-68/+59
This patch improves the readability of various functions, by replacing various void* pointers declarations with their respective structs *. This makes it possible to go for the eye-friendly array-indexing methods. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - fix crypto4xx_build_pdr, crypto4xx_build_sdr leakChristian Lamparter1-8/+9
If one of the later memory allocations in rypto4xx_build_pdr() fails: dev->pdr (and/or) dev->pdr_uinfo wouldn't be freed. crypto4xx_build_sdr() has the same issue with dev->sdr. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - replace crypto4xx_dev's scatter_buffer_size with constantChristian Lamparter2-5/+3
scatter_buffer_size is always set to PPC4XX_SD_BUFFER_SIZE. I don't think there's any point in keeping the variable around. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - refactor crypto4xx_copy_pkt_to_dst()Christian Lamparter1-96/+30
This patch refactors the crypto4xx_copy_pkt_to_dst() to use scatterwalk_map_and_copy() to copy the processed data between the crypto engine's scatter ring buffer and the destination specified by the ablkcipher_request. This also makes the crypto4xx_fill_one_page() function redundant. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloadsChristian Lamparter4-0/+177
The crypto engine supports more than just aes-cbc. This patch enables the remaining AES block cipher modes that pass the testmanager's test vectors. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - move and refactor dynamic_contents helpersChristian Lamparter5-99/+39
This patch refactors and moves the dynamic_contents helper functions into the crypto4xx_sa.h header file. * get_dynamic_sa_iv_size is no longer needed, as the cryptoapi provides the required IV size information as well. * refactor the function declarations to use the a pointer to the dynamic_sa_contents union, instead of the crypto4xx_ctx. * rename get_dynamic_sa_offset_key_field to get_dynamic_sa_key_field. It returns the pointer to the key directly. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - fix dynamic_sa_ctl's sa_contents declarationChristian Lamparter3-9/+9
The driver had a union dynamic_sa_contents in place that described the meaning of the bits in the sa_contents variable. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - remove double assignment of pd_uinfo->stateChristian Lamparter1-1/+0
crypto4xx_put_pd_to_pdr() already clears the flag. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - remove extern statement before function declarationChristian Lamparter1-24/+24
All function declarations are "extern" by default, there is no need to specify it explicitly. For C99 states in 6.2.2.5: "If the declaration of an identifier for a function has no storage-class specifier, its linkage is determined exactly as if it were declared with the storage-class specifier extern." Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - set CRYPTO_ALG_KERN_DRIVER_ONLY flagChristian Lamparter1-1/+3
The security offload function is performed by a cryptographic engine core attached to the 128-bit PLB (processor local bus) with builtin DMA and interrupt controllers. This, I think, satisfies the requirement for the CRYPTO_ALG_KERN_DRIVER_ONLY flag. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - remove unused definitions and write-only variablesChristian Lamparter3-23/+1
This patch removes several unused code and definitons (structs, variables, ...). Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: crypto4xx - remove bad list_delChristian Lamparter1-4/+2
alg entries are only added to the list, after the registration was successful. If the registration failed, it was never added to the list in the first place. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22dt/bindings: exynos-rng: Move dt binding documentation to bindings/cryptoPrasannaKumar Muralidharan2-1/+1
Samsung exynos PRNG driver is using crypto framework instead of hw_random framework. So move the devicetree binding to crypto folder. Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22hwrng: timeriomem - Remove 'max < 4' condition checkPrasannaKumar Muralidharan1-7/+0
In read routiene max is always >= 4. The check whether 'max < 4' is not necessary. Remove it. Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> Acked-By: Rick Altherr <raltherr@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: aesni - Use GCM IV size constantCorentin LABBE1-3/+4
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: gcm - Use GCM IV size constantCorentin LABBE1-11/+12
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: omap - Use GCM IV size constantCorentin LABBE2-5/+7
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: chelsio - Use GCM IV size constantCorentin LABBE1-4/+5
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: mediatek - Use GCM IV size constantCorentin LABBE1-1/+2
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: bcm - Use GCM IV size constantCorentin LABBE2-6/+5
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: atmel - Use GCM IV size constantCorentin LABBE1-2/+3
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: nx - Use GCM IV size constantCorentin LABBE1-4/+5
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: ccp - Use GCM IV size constantCorentin LABBE1-5/+4
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-09-22crypto: caam - Use GCM IV size constantCorentin LABBE2-5/+6
This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>