#
bbfd06c7 |
|
10-Dec-2020 |
Tian Tao <tiantao6@hisilicon.com> |
crypto: ccree - remove unused including <linux/version.h> Remove including <linux/version.h> that don't need it. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
05c2a705 |
|
22-Nov-2020 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - rework cache parameters handling Rework the setting of DMA cache parameters, program more appropriate values and explicitly set sharability domain. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
a24d22b2 |
|
12-Nov-2020 |
Eric Biggers <ebiggers@google.com> |
crypto: sha - split sha.h into sha1.h and sha2.h Currently <crypto/sha.h> contains declarations for both SHA-1 and SHA-2, and <crypto/sha3.h> contains declarations for SHA-3. This organization is inconsistent, but more importantly SHA-1 is no longer considered to be cryptographically secure. So to the extent possible, SHA-1 shouldn't be grouped together with any of the other SHA versions, and usage of it should be phased out. Therefore, split <crypto/sha.h> into two headers <crypto/sha1.h> and <crypto/sha2.h>, and make everyone explicitly specify whether they want the declarations for SHA-1, SHA-2, or both. This avoids making the SHA-1 declarations visible to files that don't want anything to do with SHA-1. It also prepares for potentially moving sha1.h into a new insecure/ or dangerous/ directory. Signed-off-by: Eric Biggers <ebiggers@google.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
a93492ca |
|
05-Aug-2020 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - remove data unit size support Remove the implementaion of automatic advancement of sector size in IV for storage ciphers as its use is not supproted by the kernel. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
8b9d6e98 |
|
08-Mar-2020 |
Hadar Gat <hadar.gat@arm.com> |
crypto: ccree - remove pointless comment removed pointless comment Signed-off-by: Hadar Gat <hadar.gat@arm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
d8215ff1 |
|
08-Mar-2020 |
Hadar Gat <hadar.gat@arm.com> |
crypto: ccree - update register handling macros Changed CC_GENMASK macro so it can be used for all HW registers. Signed-off-by: Hadar Gat <hadar.gat@arm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
c23d7997 |
|
11-Feb-2020 |
Geert Uytterhoeven <geert+renesas@glider.be> |
crypto: ccree - remove struct cc_cipher_handle The cc_cipher_handle structure contains only a single member, and only one instance exists. Simplify the code and reduce memory consumption by moving this member to struct cc_drvdata. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
040187a0 |
|
11-Feb-2020 |
Geert Uytterhoeven <geert+renesas@glider.be> |
crypto: ccree - remove struct buff_mgr_handle The buff_mgr_handle structure contains only a single member, and only one instance exists. Simplify the code and reduce memory consumption by moving this member to struct cc_drvdata. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
ec8f3a55 |
|
11-Feb-2020 |
Geert Uytterhoeven <geert+renesas@glider.be> |
crypto: ccree - remove struct cc_debugfs_ctx The cc_debugfs_ctx structure contains only a single member, and only one instance exists. Simplify the code and reduce memory consumption by moving this member to struct cc_drvdata. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
f1b19dff |
|
11-Feb-2020 |
Geert Uytterhoeven <geert+renesas@glider.be> |
crypto: ccree - remove struct cc_sram_ctx The cc_sram_ctx structure contains only a single member, and only one instance exists. Simplify the code and reduce memory consumption by moving this member to struct cc_drvdata. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
8c7849a3 |
|
11-Feb-2020 |
Geert Uytterhoeven <geert+renesas@glider.be> |
crypto: ccree - simplify Runtime PM handling Currently, a large part of the probe function runs before Runtime PM is enabled. As the driver manages the device's clock manually, this may work fine on some systems, but may break on platforms with a more complex power hierarchy. Fix this by moving the initialization of Runtime PM before the first register access (in cc_wait_for_reset_completion()), and putting the device to sleep only after the last access (in cc_set_ree_fips_status()). This allows to remove the pm_on flag, which was used to track manually if Runtime PM had been enabled or not. Remove the cc_pm_{init,go,fini}() wrappers, as they are called only once, and obscure operation. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
1a895f1d |
|
11-Feb-2020 |
Geert Uytterhoeven <geert+renesas@glider.be> |
crypto: ccree - use u32 for SRAM addresses SRAM addresses are small integer offsets into local SRAM. Currently they are stored using a mixture of cc_sram_addr_t (u64), u32, and dma_addr_t types. Settle on u32, and remove the cc_sram_addr_t typedefs. This allows to drop several casts. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
2f272ef3 |
|
11-Feb-2020 |
Geert Uytterhoeven <geert+renesas@glider.be> |
crypto: ccree - clean up clock handling Use devm_clk_get_optional() instead of devm_clk_get() and explicit optional clock handling. As clk_prepare_enable() and clk_disable_unprepare() handle optional clocks fine, the cc_clk_on() and cc_clk_off() wrappers can be removed. While at it, use the new "%pe" format specifier to print error codes. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
33c4b310 |
|
15-Jan-2020 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - split overloaded usage of irq field 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: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
15fd2566 |
|
15-Jan-2020 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - fix PM race condition 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: Gilad Ben-Yossef <gilad@benyossef.com> Fixes: 1358c13a48c4 ("crypto: ccree - fix resume race condition on init") Cc: stable@kernel.org # v4.20 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
060f1113 |
|
27-Nov-2019 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - remove useless define The define of CC_DEV_SHA_MAX is not needed since we moved to runtime detection of capabilities. Remove it. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
e6e6600c |
|
02-Jul-2019 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - drop legacy ivgen support ccree had a mechanism for IV generation which was not compatible with the Linux seqiv or echainiv iv generator and was never used in any of the upstream versions so drop all the code implementing it. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
303f99ac |
|
17-Jun-2019 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - add HW engine config check Add check to verify the stated device tree HW configuration matches the HW. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
d84f6269 |
|
17-Jun-2019 |
Ofir Drang <ofir.drang@arm.com> |
crypto: ccree - check that cryptocell reset completed In case of driver probe and pm resume we need to check that the cryptocell hardware reset cycle is completed. during the reset cycle that Cryptocell provide read only access to the APB interface which allows to verify through the CC registers that the reset is completed. Until reset completion we assume that any write/crypto operation is blocked. Signed-off-by: Ofir Drang <ofir.drang@arm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
e8662a6a |
|
18-Apr-2019 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - don't map AEAD key and IV on stack The AEAD authenc key and IVs might be passed to us on stack. Copy it to a slab buffer before mapping to gurantee proper DMA mapping. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
6825cfd6 |
|
18-Apr-2019 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - simplify fragment ICV detection The code detecting whether the ICV is fragmented was overly complex and limited the number of fragments an ICV may be comprised of with no reason in the current code, casuing the new testmgr tests to fail. This patch removes this legacy limitation and greatly simplifies the code. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
03963cae |
|
18-Apr-2019 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - copyright header update This sacrificial copyright header update is offered to the legal department as atonement for any changes made in this driver files in the course of the current year which have not been duly recorded as such. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
cadfd898 |
|
18-Apr-2019 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - add CPP completion handling Add the logic needed to track and report CPP operation rejection. The new logic will be used by the CPP feature introduced later. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
f98f6e21 |
|
18-Apr-2019 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - add support for sec disabled mode Add support for the Security Disabled mode under which only pure cryptographic functionality is enabled and protected keys services are unavailable. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
1ffbe134 |
|
15-Jan-2019 |
Hadar Gat <hadar.gat@arm.com> |
crypto: ccree - remove legacy leftover Remove legacy code no longer in use. Signed-off-by: Hadar Gat <hadar.gat@arm.com> Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
1c876a90 |
|
13-Nov-2018 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - add support for CryptoCell 703 Add support for Arm TrustZone CryptoCell 703. The 703 is a variant of the CryptoCell 713 that supports only algorithms certified by the Chinesse Office of the State Commercial Cryptography Administration (OSCCA). Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
f1e52fd0 |
|
18-Oct-2018 |
Yael Chemla <yael.chemla@foss.arm.com> |
crypto: ccree - adjust hash length to suit certain context specifics Adjust hash length such that it will not be fixed and general for all algs. Instead make it suitable for certain context information. This is preparation for SM3 support. Signed-off-by: Yael Chemla <yael.chemla@foss.arm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
e40fdb50 |
|
29-Oct-2018 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - add support for CryptoCell 713 Add support for Arm TrustZone CryptoCell 713. Note that this patch just enables using a 713 in backwards compatible mode to 712. Newer 713 specific features will follow. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
76c9e53e |
|
24-Jul-2018 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - drop useless type flag during reg Drop the explicit setting of CRYPTO_ALG_TYPE_AEAD or CRYPTO_ALG_TYPE_SKCIPHER flags during alg registration as they are set anyway by the framework. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
281a58c8 |
|
24-May-2018 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - correct host regs offset The product signature and HW revision register have different offset on the older HW revisions. This fixes the problem of the driver failing sanity check on silicon despite working on the FPGA emulation systems. Fixes: 27b3b22dd98c ("crypto: ccree - add support for older HW revs") Cc: stable@vger.kernel.org Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
27b3b22d |
|
19-Feb-2018 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - add support for older HW revs Add support for the legacy CryptoCell 630 and 710 revs. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
ab8ec965 |
|
22-Jan-2018 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - add FIPS support Add FIPS mode support to CryptoCell driver Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
ff27e85a |
|
22-Jan-2018 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - add AEAD support Add CryptoCell AEAD support Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
63893811 |
|
22-Jan-2018 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - add ahash support Add CryptoCell async. hash and HMAC support. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
63ee04c8 |
|
22-Jan-2018 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - add skcipher support Add CryptoCell skcipher support Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
#
4c3f9727 |
|
22-Jan-2018 |
Gilad Ben-Yossef <gilad@benyossef.com> |
crypto: ccree - introduce CryptoCell driver Introduce basic low level Arm TrustZone CryptoCell HW support. This first patch doesn't actually register any Crypto API transformations, these will follow up in the next patch. This first revision supports the CC 712 REE component. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|