- 22 1月, 2020 14 次提交
-
-
由 Gilad Ben-Yossef 提交于
We were using the irq field of the drvdata struct in an overloaded fahsion - saving the IRQ number during init and then storing the pending itnerrupt sources during interrupt in the same field. This worked because these usage are mutually exclusive but are confusing. So simplify the code and change the init use case to use a simple local variable. Signed-off-by: NGilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Gilad Ben-Yossef 提交于
The PM code was racy, possibly causing the driver to submit requests to a powered down device. Fix the race and while at it simplify the PM code. Signed-off-by: NGilad Ben-Yossef <gilad@benyossef.com> Fixes: 1358c13a ("crypto: ccree - fix resume race condition on init") Cc: stable@kernel.org # v4.20 Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Ofir Drang 提交于
In FDE mode (xts, essiv and bitlocker) the cryptocell hardware requires that the the XEX key will be loaded after Key1. Signed-off-by: NOfir Drang <ofir.drang@arm.com> Cc: stable@vger.kernel.org Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Gilad Ben-Yossef 提交于
cc_do_send_request() cannot fail and always returns -EINPROGRESS. Turn it into a void function and simplify code. Signed-off-by: NGilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Gilad Ben-Yossef 提交于
pm_runtime_get_sync() can return 1 as a valid (none error) return code. Treat it as such. Signed-off-by: NGilad Ben-Yossef <gilad@benyossef.com> Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Gilad Ben-Yossef 提交于
We have several loud error log messages that are already reported via the normal return code mechanism and produce a lot of noise when the new testmgr extra test are enabled. Turn these into debug only messages Signed-off-by: NGilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Gilad Ben-Yossef 提交于
On AEAD decryption authentication failure we are suppose to zero out the output plaintext buffer. However, we've missed skipping the optional associated data that may prefix the ciphertext. This commit fixes this issue. Signed-off-by: NGilad Ben-Yossef <gilad@benyossef.com> Fixes: e88b27c8 ("crypto: ccree - use std api sg_zero_buffer") Cc: stable@vger.kernel.org Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Hadar Gat 提交于
Fixed a typo in a commnet. Signed-off-by: NHadar Gat <hadar.gat@arm.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Hadar Gat 提交于
Fixed typos in ccree error msgs. Signed-off-by: NHadar Gat <hadar.gat@arm.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Tudor Ambarus 提交于
These drivers no longer need it as they are only probed via DT. crypto_platform_data was allocated but unused, so remove it. This is a follow up for: commit 45a536e3 ("crypto: atmel-tdes - Retire dma_request_slave_channel_compat()") commit db28512f ("crypto: atmel-sha - Retire dma_request_slave_channel_compat()") commit 62f72cbd ("crypto: atmel-aes - Retire dma_request_slave_channel_compat()") Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Kees Cook 提交于
In order to avoid CFI function prototype mismatches, this removes the casts on assembly implementations of sha1/256/512 accelerators. The safety checks from BUILD_BUG_ON() remain. Additionally, this renames various arguments for clarity, as suggested by Eric Biggers. Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Vinay Kumar Yadav 提交于
Do not return error when max stid reached, to Fallback to nic mode. Signed-off-by: NVinay Kumar Yadav <vinay.yadav@chelsio.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Vinay Kumar Yadav 提交于
corrected function call context and moved t4_defer_reply to apropriate location. Signed-off-by: NVinay Kumar Yadav <vinay.yadav@chelsio.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Horia Geantă 提交于
Fixes: 8d818c10 ("crypto: caam/qi2 - add DPAA2-CAAM driver") Signed-off-by: NHoria Geantă <horia.geanta@nxp.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 16 1月, 2020 26 次提交
-
-
由 Geert Uytterhoeven 提交于
"AEAD" is capitalized everywhere else. Use "an" when followed by a written or spoken vowel. Fixes: be1eb7f7 ("crypto: essiv - create wrapper template for ESSIV generation") Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
This branch prediction macro on the hot path can improve small performance(about 2%) according to the test. Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
Reorder the input parameters of hpre_crt_para_get to make it cleaner. Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
1.Use memzero_explicit to clear key; 2.Fix some little endian writings; 3.Fix some other bugs and stuff of code style; Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
1.Fixed the bug of software tfm leakage. 2.Update HW error log message. Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
authenc(hmac(sha1),cbc(aes)), authenc(hmac(sha256),cbc(aes)), and authenc(hmac(sha512),cbc(aes)) support are added for SEC v2. Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
1.Define base initiation of QP for context which can be reused. 2.Define cipher initiation for other algorithms. Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
After adding branch prediction for skcipher hot path, a little bit income of performance is gotten. Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
Add error type parameter for call back checking inside. Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
1.Adjust call back function. 2.Adjust parameter checking function. Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
1.Put resource including request and resource list into QP context structure to avoid allocate memory repeatedly. 2.Add max context queue number to void kcalloc large memory for QP context. 3.Remove the resource allocation operation. 4.Redefine resource allocation APIs to be shared by other algorithms. 5.Move resource allocation and free inner functions out of operations 'struct sec_req_op', and they are called directly. Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
1.Adjust dma map function to be reused by AEAD algorithms; 2.Update some names of internal functions and variables to support AEAD algorithms; 3.Rename 'sec_skcipher_exit' as 'sec_skcipher_uninit'; 4.Rename 'sec_get/put_queue_id' as 'sec_alloc/free_queue_id'; Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
Fixed some print, coding style and comments of HiSilicon SEC V2. Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Zaibo Xu 提交于
Applied some advices of Marco Elver on atomic usage of Debugfs, which is carried out by basing on Arnd Bergmann's fixing patch. Reported-by: NArnd Bergmann <arnd@arndb.de> Reported-by: NMarco Elver <elver@google.com> Signed-off-by: NZaibo Xu <xuzaibo@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Rijo Thomas 提交于
Remove NULL check for pool variable, since in the current code path it is guaranteed to be non-NULL. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NRijo Thomas <Rijo-john.Thomas@amd.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Rijo Thomas 提交于
Rename err label to err_device_unregister for better readability. Suggested-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NRijo Thomas <Rijo-john.Thomas@amd.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Rijo Thomas 提交于
Currently, if tee_device_alloc() fails, then tee_device_unregister() is a no-op. Therefore, skip the function call to tee_device_unregister() by introducing a new goto label 'err_free_pool'. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NRijo Thomas <Rijo-john.Thomas@amd.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Rijo Thomas 提交于
If there is no TEE with which the driver can communicate, then print an error message and return. Suggested-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NRijo Thomas <Rijo-john.Thomas@amd.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Rijo Thomas 提交于
Remove unused variable initialization from driver code. If enabled as a compiler option, compiler may throw warning for unused assignments. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Fixes: 757cc3e9 ("tee: add AMD-TEE driver") Signed-off-by: NRijo Thomas <Rijo-john.Thomas@amd.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Daniel Axtens 提交于
When the kernel XTS implementation was extended to deal with ciphertext stealing in commit 8083b1bf ("crypto: xts - add support for ciphertext stealing"), a check was added to reject inputs that were too short. However, in the vmx enablement - commit 23966841 ("crypto: vmx/xts - use fallback for ciphertext stealing"), that check wasn't added to the vmx implementation. This disparity leads to errors like the following: alg: skcipher: p8_aes_xts encryption unexpectedly succeeded on test vector "random: len=0 klen=64"; expected_error=-22, cfg="random: inplace may_sleep use_finup src_divs=[<flush>66.99%@+10, 33.1%@alignmask+1155]" Return -EINVAL if asked to operate with a cryptlen smaller than the AES block size. This brings vmx in line with the generic implementation. Reported-by: NErhard Furtner <erhard_f@mailbox.org> Link: https://bugzilla.kernel.org/show_bug.cgi?id=206049 Fixes: 23966841 ("crypto: vmx/xts - use fallback for ciphertext stealing") Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au> [dja: commit message] Signed-off-by: NDaniel Axtens <dja@axtens.net> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Herbert Xu 提交于
If CRYPTO_CURVE25519 is y, CRYPTO_LIB_CURVE25519_GENERIC will be y, but CRYPTO_LIB_CURVE25519 may be set to m, this causes build errors: lib/crypto/curve25519-selftest.o: In function `curve25519': curve25519-selftest.c:(.text.unlikely+0xc): undefined reference to `curve25519_arch' lib/crypto/curve25519-selftest.o: In function `curve25519_selftest': curve25519-selftest.c:(.init.text+0x17e): undefined reference to `curve25519_base_arch' This is because the curve25519 self-test code is being controlled by the GENERIC option rather than the overall CURVE25519 option, as is the case with blake2s. To recap, the GENERIC and ARCH options for CURVE25519 are internal only and selected by users such as the Crypto API, or the externally visible CURVE25519 option which in turn is selected by wireguard. The self-test is specific to the the external CURVE25519 option and should not be enabled by the Crypto API. This patch fixes this by splitting the GENERIC module from the CURVE25519 module with the latter now containing just the self-test. Reported-by: NHulk Robot <hulkci@huawei.com> Fixes: aa127963 ("crypto: lib/curve25519 - re-add selftests") Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Reviewed-by: NJason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Horia Geantă 提交于
Add support for the crypto engine used in i.mx8mn (i.MX 8M "Nano"), which is very similar to the one used in i.mx8mq, i.mx8mm. Since the clocks are identical for all members of i.MX 8M family, simplify the SoC <--> clock array mapping table. Signed-off-by: NHoria Geantă <horia.geanta@nxp.com> Tested-by: NIuliana Prodan <iuliana.prodan@nxp.com> Reviewed-by: NIuliana Prodan <iuliana.prodan@nxp.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Corentin Labbe 提交于
Some code were left in the final driver but without any use. Signed-off-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Corentin Labbe 提交于
Removing the driver cause an oops due to the fact we clean an extra channel. Let's give the right index to the cleaning function. Fixes: 06f751b6 ("crypto: allwinner - Add sun8i-ce Crypto Engine") Signed-off-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Corentin Labbe 提交于
Removing the driver cause an oops due to the fact we clean an extra channel. Let's give the right index to the cleaning function. Fixes: 48fe583f ("crypto: amlogic - Add crypto accelerator for amlogic GXL") Signed-off-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Corentin Labbe 提交于
Removing the driver cause an oops due to the fact we clean an extra channel. Let's give the right index to the cleaning function. Fixes: f08fcced ("crypto: allwinner - Add sun8i-ss cryptographic offloader") Signed-off-by: NCorentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-