|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8 |
|
| #
07547fa7 |
| 02-Dec-2022 |
Herbert Xu <[email protected]> |
crypto: ccree - Set DMA alignment explicitly
This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes.
This
crypto: ccree - Set DMA alignment explicitly
This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes.
This patch changes it to explicitly request DMA alignment from the Crypto API.
Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
|
Revision tags: v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2 |
|
| #
9b32fed8 |
| 19-Aug-2022 |
Jack Wang <[email protected]> |
crypto: ccree - Fix dma_map_sg error check
dma_map_sg return 0 on error, and dma_map_error is not supposed to use here.
Cc: Gilad Ben-Yossef <[email protected]> Cc: Herbert Xu <[email protected]
crypto: ccree - Fix dma_map_sg error check
dma_map_sg return 0 on error, and dma_map_error is not supposed to use here.
Cc: Gilad Ben-Yossef <[email protected]> Cc: Herbert Xu <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: [email protected] Cc: [email protected]
Signed-off-by: Jack Wang <[email protected]> Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
|
Revision tags: v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6, v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1, v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2 |
|
| #
a260436c |
| 06-Apr-2022 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - use fine grained DMA mapping dir
Use a fine grained specification of DMA mapping directions in certain cases, allowing both a more optimized operation as well as shushing out a harml
crypto: ccree - use fine grained DMA mapping dir
Use a fine grained specification of DMA mapping directions in certain cases, allowing both a more optimized operation as well as shushing out a harmless, though persky dma-debug warning.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Reported-by: Corentin Labbe <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
|
Revision tags: v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5 |
|
| #
1fb37b56 |
| 17-Feb-2022 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - don't attempt 0 len DMA mappings
Refuse to try mapping zero bytes as this may cause a fault on some configurations / platforms and it seems the prev. attempt is not enough and we nee
crypto: ccree - don't attempt 0 len DMA mappings
Refuse to try mapping zero bytes as this may cause a fault on some configurations / platforms and it seems the prev. attempt is not enough and we need to be more explicit.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Reported-by: Corentin Labbe <[email protected]> Fixes: ce0fc6db38de ("crypto: ccree - protect against empty or NULL scatterlists") Tested-by: Corentin Labbe <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
|
Revision tags: v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7, v5.15-rc6, v5.15-rc5, v5.15-rc4, v5.15-rc3, v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7, v5.14-rc6, v5.14-rc5, v5.14-rc4, v5.14-rc3, v5.14-rc2, v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1, v5.12, v5.12-rc8, v5.12-rc7, v5.12-rc6, v5.12-rc5, v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1, v5.12-rc1-dontuse, v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4, v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10, v5.10-rc7, v5.10-rc6, v5.10-rc5, v5.10-rc4, v5.10-rc3, v5.10-rc2, v5.10-rc1, v5.9, v5.9-rc8, v5.9-rc7, v5.9-rc6, v5.9-rc5, v5.9-rc4, v5.9-rc3, v5.9-rc2, v5.9-rc1 |
|
| #
453431a5 |
| 07-Aug-2020 |
Waiman Long <[email protected]> |
mm, treewide: rename kzfree() to kfree_sensitive()
As said by Linus:
A symmetric naming is only helpful if it implies symmetries in use. Otherwise it's actively misleading.
In "kzalloc()", t
mm, treewide: rename kzfree() to kfree_sensitive()
As said by Linus:
A symmetric naming is only helpful if it implies symmetries in use. Otherwise it's actively misleading.
In "kzalloc()", the z is meaningful and an important part of what the caller wants.
In "kzfree()", the z is actively detrimental, because maybe in the future we really _might_ want to use that "memfill(0xdeadbeef)" or something. The "zero" part of the interface isn't even _relevant_.
The main reason that kzfree() exists is to clear sensitive information that should not be leaked to other future users of the same memory objects.
Rename kzfree() to kfree_sensitive() to follow the example of the recently added kvfree_sensitive() and make the intention of the API more explicit. In addition, memzero_explicit() is used to clear the memory to make sure that it won't get optimized away by the compiler.
The renaming is done by using the command sequence:
git grep -w --name-only kzfree |\ xargs sed -i 's/kzfree/kfree_sensitive/'
followed by some editing of the kfree_sensitive() kerneldoc and adding a kzfree backward compatibility macro in slab.h.
[[email protected]: fs/crypto/inline_crypt.c needs linux/slab.h] [[email protected]: fix fs/crypto/inline_crypt.c some more]
Suggested-by: Joe Perches <[email protected]> Signed-off-by: Waiman Long <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: David Howells <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Johannes Weiner <[email protected]> Cc: Jarkko Sakkinen <[email protected]> Cc: James Morris <[email protected]> Cc: "Serge E. Hallyn" <[email protected]> Cc: Joe Perches <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: David Rientjes <[email protected]> Cc: Dan Carpenter <[email protected]> Cc: "Jason A . Donenfeld" <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
show more ...
|
|
Revision tags: v5.8, v5.8-rc7, v5.8-rc6, v5.8-rc5, v5.8-rc4, v5.8-rc3, v5.8-rc2, v5.8-rc1, v5.7, v5.7-rc7, v5.7-rc6, v5.7-rc5, v5.7-rc4, v5.7-rc3, v5.7-rc2, v5.7-rc1, v5.6, v5.6-rc7, v5.6-rc6, v5.6-rc5 |
|
| #
0eae14a0 |
| 08-Mar-2020 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - refactor AEAD IV in AAD handling
Our handling of ciphers with IV trailing the AAD was correct but overly complicated. Refactor to simplify and possibly save one DMA burst.
This has
crypto: ccree - refactor AEAD IV in AAD handling
Our handling of ciphers with IV trailing the AAD was correct but overly complicated. Refactor to simplify and possibly save one DMA burst.
This has the added bonus of behaving the same as the generic rfc4543 implementation for none compliants inputs where the IV in the iv field was not the same as the IV in the AAD.
There should be no change in behaviour with correct inputs.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
6429ccdd |
| 08-Mar-2020 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - remove ancient TODO remarks
Remove left over ancient and now misleading TODO remarks.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <herbert@gondor
crypto: ccree - remove ancient TODO remarks
Remove left over ancient and now misleading TODO remarks.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
|
Revision tags: v5.6-rc4, v5.6-rc3, v5.6-rc2 |
|
| #
ae02fcfe |
| 11-Feb-2020 |
Geert Uytterhoeven <[email protected]> |
crypto: ccree - improve kerneldoc in cc_buffer_mgr.c
Miscellaneous improvements: - Add missing parameter and return value descriptions.
Signed-off-by: Geert Uytterhoeven <[email protected]>
crypto: ccree - improve kerneldoc in cc_buffer_mgr.c
Miscellaneous improvements: - Add missing parameter and return value descriptions.
Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
040187a0 |
| 11-Feb-2020 |
Geert Uytterhoeven <[email protected]> |
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 th
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
ba99b6f9 |
| 11-Feb-2020 |
Geert Uytterhoeven <[email protected]> |
crypto: ccree - make mlli_params.mlli_virt_addr void *
mlli_params.mlli_virt_addr is just a buffer of memory. This allows to drop a cast.
No change in generated code.
Signed-off-by: Geert Uytterho
crypto: ccree - make mlli_params.mlli_virt_addr void *
mlli_params.mlli_virt_addr is just a buffer of memory. This allows to drop a cast.
No change in generated code.
Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
f4274eec |
| 11-Feb-2020 |
Geert Uytterhoeven <[email protected]> |
crypto: ccree - remove unneeded casts
Unneeded casts prevent the compiler from performing valuable checks. This is especially true for function pointers.
Remove these casts, to prevent silently int
crypto: ccree - remove unneeded casts
Unneeded casts prevent the compiler from performing valuable checks. This is especially true for function pointers.
Remove these casts, to prevent silently introducing bugs when a variable's type might be changed in the future.
No change in generated code.
Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
|
Revision tags: v5.6-rc1 |
|
| #
8962c6d2 |
| 02-Feb-2020 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - dec auth tag size from cryptlen map
Remove the auth tag size from cryptlen before mapping the destination in out-of-place AEAD decryption thus resolving a crash with extended testmgr
crypto: ccree - dec auth tag size from cryptlen map
Remove the auth tag size from cryptlen before mapping the destination in out-of-place AEAD decryption thus resolving a crash with extended testmgr tests.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Reported-by: Geert Uytterhoeven <[email protected]> Cc: [email protected] # v4.19+ Tested-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
504e84ab |
| 29-Jan-2020 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - only try to map auth tag if needed
Make sure to only add the size of the auth tag to the source mapping for encryption if it is an in-place operation. Failing to do this previously c
crypto: ccree - only try to map auth tag if needed
Make sure to only add the size of the auth tag to the source mapping for encryption if it is an in-place operation. Failing to do this previously caused us to try and map auth size len bytes from a NULL mapping and crashing if both the cryptlen and assoclen are zero.
Reported-by: Geert Uytterhoeven <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
ce0fc6db |
| 29-Jan-2020 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - protect against empty or NULL scatterlists
Deal gracefully with a NULL or empty scatterlist which can happen if both cryptlen and assoclen are zero and we're doing in-place AEAD encr
crypto: ccree - protect against empty or NULL scatterlists
Deal gracefully with a NULL or empty scatterlist which can happen if both cryptlen and assoclen are zero and we're doing in-place AEAD encryption.
This fixes a crash when this causes us to try and map a NULL page, at least with some platforms / DMA mapping configs.
Cc: [email protected] # v4.19+ Reported-by: Geert Uytterhoeven <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
|
Revision tags: v5.5, v5.5-rc7, v5.5-rc6, v5.5-rc5, v5.5-rc4, v5.5-rc3, v5.5-rc2, v5.5-rc1, v5.4, v5.4-rc8, v5.4-rc7, v5.4-rc6, v5.4-rc5, v5.4-rc4, v5.4-rc3, v5.4-rc2, v5.4-rc1, v5.3, v5.3-rc8, v5.3-rc7, v5.3-rc6, v5.3-rc5, v5.3-rc4, v5.3-rc3 |
|
| #
e88b27c8 |
| 29-Jul-2019 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - use std api sg_zero_buffer
Replace internal cc_zero_sgl() with kernel API of the same function sg_zero_buffer().
Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by:
crypto: ccree - use std api sg_zero_buffer
Replace internal cc_zero_sgl() with kernel API of the same function sg_zero_buffer().
Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
|
Revision tags: v5.3-rc2, v5.3-rc1, v5.2, v5.2-rc7, v5.2-rc6, v5.2-rc5, v5.2-rc4, v5.2-rc3, v5.2-rc2, v5.2-rc1, v5.1, v5.1-rc7, v5.1-rc6 |
|
| #
e8662a6a |
| 18-Apr-2019 |
Gilad Ben-Yossef <[email protected]> |
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
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 <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
05c292af |
| 18-Apr-2019 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - zap entire sg on aead request unmap
We were trying to be clever zapping out of the cache only the required length out of scatter list on AEAD request completion and getting it wrong.
crypto: ccree - zap entire sg on aead request unmap
We were trying to be clever zapping out of the cache only the required length out of scatter list on AEAD request completion and getting it wrong.
As Knuth said: "when in douby, use brute force". Zap the whole length of the scatter list.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
c776f7d3 |
| 18-Apr-2019 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - make AEAD sgl iterator well behaved
Fix some scatter list interation code was not handling scatter lists being shorter than expected in a graceful manner.
Signed-off-by: Gilad Ben-Y
crypto: ccree - make AEAD sgl iterator well behaved
Fix some scatter list interation code was not handling scatter lists being shorter than expected in a graceful manner.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
da3cf67f |
| 18-Apr-2019 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - don't mangle the request assoclen
We were mangling the request struct assoclen field. Fix it by keeping an internal version and working on it.
Signed-off-by: Gilad Ben-Yossef <gilad
crypto: ccree - don't mangle the request assoclen
We were mangling the request struct assoclen field. Fix it by keeping an internal version and working on it.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
c9877cbc |
| 18-Apr-2019 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - simplify AEAD ICV addr calculation
The function cc_prepare_aead_data_dlli() which calculates ICV addresses was needlessly complicate it. This patch simplifies it without altering its
crypto: ccree - simplify AEAD ICV addr calculation
The function cc_prepare_aead_data_dlli() which calculates ICV addresses was needlessly complicate it. This patch simplifies it without altering its functionality.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
6825cfd6 |
| 18-Apr-2019 |
Gilad Ben-Yossef <[email protected]> |
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 t
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
03963cae |
| 18-Apr-2019 |
Gilad Ben-Yossef <[email protected]> |
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 curren
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
b7ec8530 |
| 18-Apr-2019 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - use std api when possible
Move to use the std api sg_nents_for_len() when we do not in fact require the extra information about the number of bytes in the last entry provided by the
crypto: ccree - use std api when possible
Move to use the std api sg_nents_for_len() when we do not in fact require the extra information about the number of bytes in the last entry provided by the in-driver variant cc_get_sgl_nents().
This also resolves a Coverity warning cause by us not using the output value.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
c4b22bf5 |
| 18-Apr-2019 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - remove special handling of chained sg
We were handling chained scattergather lists with specialized code needlessly as the regular sg APIs handle them just fine. The code handling th
crypto: ccree - remove special handling of chained sg
We were handling chained scattergather lists with specialized code needlessly as the regular sg APIs handle them just fine. The code handling this also had an (unused) code path with a use-before-init error, flagged by Coverity.
Remove all special handling of chained sg and leave their handling to the regular sg APIs.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Cc: [email protected] # v4.19+ Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| #
6f17e00f |
| 18-Apr-2019 |
Gilad Ben-Yossef <[email protected]> |
crypto: ccree - read next IV from HW
We were computing the next IV in software instead of reading it from HW on the premise that this can be quicker due to the small size of IVs but this proved to b
crypto: ccree - read next IV from HW
We were computing the next IV in software instead of reading it from HW on the premise that this can be quicker due to the small size of IVs but this proved to be much more hassle and bug ridden than expected.
Move to reading the next IV as computed by the HW.
This fixes a number of issue with next IV being wrong for OFB, CTS-CBC and probably most of the other ciphers as well.
Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|