History log of /linux-6.15/drivers/crypto/sa2ul.c (Results 1 – 25 of 34)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
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
# f51c527f 07-Oct-2024 Uwe Kleine-König <[email protected]>

crypto: drivers - Switch back to struct platform_driver::remove()

After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implem

crypto: drivers - Switch back to struct platform_driver::remove()

After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/crypto to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: v6.12-rc2, v6.12-rc1
# 98091a82 20-Sep-2024 Shen Lichuan <[email protected]>

crypto: drivers - Correct multiple typos in comments

Fixed some confusing spelling errors, the details are as follows:

-in the code comments:
fininishing -> finishing
commad -> command
intrepre

crypto: drivers - Correct multiple typos in comments

Fixed some confusing spelling errors, the details are as follows:

-in the code comments:
fininishing -> finishing
commad -> command
intrepretation -> interpretation
inuput -> input
overfloa -> overflow
Iniialize -> Initialize

Signed-off-by: Shen Lichuan <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: 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
# c8edb3cc 02-Jun-2024 Jeff Johnson <[email protected]>

crypto: sa2ul - add missing MODULE_DESCRIPTION() macro

make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/crypto/sa2ul.o

Add the missing invocation

crypto: sa2ul - add missing MODULE_DESCRIPTION() macro

make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/crypto/sa2ul.o

Add the missing invocation of the MODULE_DESCRIPTION() macro.

Signed-off-by: Jeff Johnson <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: 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
# ce852f13 27-Nov-2023 Chen Ni <[email protected]>

crypto: sa2ul - Return crypto_aead_setkey to transfer the error

Return crypto_aead_setkey() in order to transfer the error if
it fails.

Fixes: d2c8ac187fc9 ("crypto: sa2ul - Add AEAD algorithm supp

crypto: sa2ul - Return crypto_aead_setkey to transfer the error

Return crypto_aead_setkey() in order to transfer the error if
it fails.

Fixes: d2c8ac187fc9 ("crypto: sa2ul - Add AEAD algorithm support")
Signed-off-by: Chen Ni <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7
# b1010711 20-Oct-2023 Uwe Kleine-König <[email protected]>

crypto: sa2ul - Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do erro

crypto: sa2ul - Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: 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
# b0cc7491 14-Jul-2023 Rob Herring <[email protected]>

crypto: drivers - Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As par

crypto: drivers - Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: 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
# aedf818b 17-Mar-2023 Yu Zhe <[email protected]>

crypto: drivers - remove unnecessary (void*) conversions

Pointer variables of void * type do not require type cast.

Signed-off-by: Yu Zhe <[email protected]>
Signed-off-by: Herbert Xu <herbert@gon

crypto: drivers - remove unnecessary (void*) conversions

Pointer variables of void * type do not require type cast.

Signed-off-by: Yu Zhe <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: 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, 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, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6
# b77e34f5 06-Jul-2022 Andrew Davis <[email protected]>

crypto: sa2ul - Check engine status before enabling

There is a engine status register that can be used to check if the
different HW crypto engines are enabled. Check that first and then only
try to

crypto: sa2ul - Check engine status before enabling

There is a engine status register that can be used to check if the
different HW crypto engines are enabled. Check that first and then only
try to enable the engines if they are not already on.

This has a couple benefits. First we don't need to use match_data for
this. Second, this driver can now work on HS devices where the engine
control registers are read-only and writing causes a firewall exception.

Signed-off-by: Andrew Davis <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


# a65c9a2a 06-Jul-2022 Andrew Davis <[email protected]>

crypto: sa2ul - Set the supported_algos bits individually

Setting these individually gives a better picture of supported
functions at a glance. Plus if the list changes an unwanted
one will not acci

crypto: sa2ul - Set the supported_algos bits individually

Setting these individually gives a better picture of supported
functions at a glance. Plus if the list changes an unwanted
one will not accidentally get set with GENMASK.

Signed-off-by: Andrew Davis <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: 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
# 5a6477ea 12-Apr-2022 Jayesh Choudhary <[email protected]>

crypto: sa2ul - Add the new compatible for AM62

Add the new compatible for am62x in of_match_table.

Signed-off-by: Jayesh Choudhary <[email protected]>
Signed-off-by: Herbert Xu <[email protected]

crypto: sa2ul - Add the new compatible for AM62

Add the new compatible for am62x in of_match_table.

Signed-off-by: Jayesh Choudhary <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5, 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
# 5876b0cb 22-Nov-2021 Geert Uytterhoeven <[email protected]>

crypto: sa2ul - Use bitfield helpers

Use the FIELD_PREP() helper, instead of open-coding the same operation.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Herbert Xu <h

crypto: sa2ul - Use bitfield helpers

Use the FIELD_PREP() helper, instead of open-coding the same operation.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7
# 284340a3 21-Oct-2021 Tang Bin <[email protected]>

crypto: sa2ul - Use the defined variable to clean code

Use the defined variable "dev" to make the code cleaner.

Signed-off-by: Tang Bin <[email protected]>
Signed-off-by: Herbert Xu <her

crypto: sa2ul - Use the defined variable to clean code

Use the defined variable "dev" to make the code cleaner.

Signed-off-by: Tang Bin <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: 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
# d886d55f 15-Jun-2021 Herbert Xu <[email protected]>

crypto: sa2ul - Remove unused auth_len variable

This patch removes the unused auth_len variable from
sa_aead_dma_in_callback.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Herbert X

crypto: sa2ul - Remove unused auth_len variable

This patch removes the unused auth_len variable from
sa_aead_dma_in_callback.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2
# c858401c 14-May-2021 Suman Anna <[email protected]>

crypto: sa2ul - Remove child devices in remove

The sa_ul_probe creates child devices using of_platform_populate(),
but these are not cleaned up in driver remove. Clean these up
by removing the child

crypto: sa2ul - Remove child devices in remove

The sa_ul_probe creates child devices using of_platform_populate(),
but these are not cleaned up in driver remove. Clean these up
by removing the child devices using of_platform_depopulate().

Signed-off-by: Suman Anna <[email protected]>
Reviewed-by: Tero Kristo <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


# daeec738 14-May-2021 Suman Anna <[email protected]>

crypto: sa2ul - Use devm_platform_ioremap_resource()

Simplify the platform_get_resource() and devm_ioremap_resource()
calls with devm_platform_ioremap_resource(). Also add error checking
and move up

crypto: sa2ul - Use devm_platform_ioremap_resource()

Simplify the platform_get_resource() and devm_ioremap_resource()
calls with devm_platform_ioremap_resource(). Also add error checking
and move up this block to simplify the cleanup in sa_ul_probe().

Signed-off-by: Suman Anna <[email protected]>
Reviewed-by: Tero Kristo <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


# d699c5d0 14-May-2021 Suman Anna <[email protected]>

crypto: sa2ul - Use of_device_get_match_data() helper

Simplify the probe function by using the of_device_get_match_data()
helper instead of open coding. The logic is also moved up to fix the
missing

crypto: sa2ul - Use of_device_get_match_data() helper

Simplify the probe function by using the of_device_get_match_data()
helper instead of open coding. The logic is also moved up to fix the
missing pm_runtime cleanup in case of a match failure.

Fixes: 0bc42311cdff ("crypto: sa2ul - Add support for AM64")
Signed-off-by: Suman Anna <[email protected]>
Reviewed-by: Tero Kristo <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


# 5c855232 14-May-2021 Suman Anna <[email protected]>

crypto: sa2ul - Fix pm_runtime enable in sa_ul_probe()

The pm_runtime APIs added first in commit 7694b6ca649f ("crypto: sa2ul -
Add crypto driver") are not unwound properly and was fixed up partiall

crypto: sa2ul - Fix pm_runtime enable in sa_ul_probe()

The pm_runtime APIs added first in commit 7694b6ca649f ("crypto: sa2ul -
Add crypto driver") are not unwound properly and was fixed up partially
in commit 13343badae09 ("crypto: sa2ul - Fix PM reference leak in
sa_ul_probe()"). This fixed up the pm_runtime usage count but not the
state. Fix this properly.

Fixes: 13343badae09 ("crypto: sa2ul - Fix PM reference leak in sa_ul_probe()")
Signed-off-by: Suman Anna <[email protected]>
Reviewed-by: Tero Kristo <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


# 4c0716ee 14-May-2021 Suman Anna <[email protected]>

crypto: sa2ul - Fix leaks on failure paths with sa_dma_init()

The sa_dma_init() function doesn't release the requested dma channels
on all failure paths. Any failure in this function also ends up
le

crypto: sa2ul - Fix leaks on failure paths with sa_dma_init()

The sa_dma_init() function doesn't release the requested dma channels
on all failure paths. Any failure in this function also ends up
leaking the dma pool created in sa_init_mem() in the sa_ul_probe()
function. Fix all of these issues.

Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver")
Signed-off-by: Suman Anna <[email protected]>
Reviewed-by: Tero Kristo <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: v5.13-rc1, v5.12, v5.12-rc8
# 0bc42311 13-Apr-2021 Peter Ujfalusi <[email protected]>

crypto: sa2ul - Add support for AM64

The sa2ul module in am64 have limited support for algorithms, and the
priv and priv_id used on the platform is different compared to AM654 or
j721e.

Use match d

crypto: sa2ul - Add support for AM64

The sa2ul module in am64 have limited support for algorithms, and the
priv and priv_id used on the platform is different compared to AM654 or
j721e.

Use match data to get the SoC specific information and use it throughout
the driver.

Signed-off-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Vaibhav Gupta <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


# e8a4529d 13-Apr-2021 Peter Ujfalusi <[email protected]>

crypto: sa2ul - Support for per channel coherency

On AM64 the DMA channel for sa2ul can be configured to be coherent or
non coherent via DT binding.

Use the dmaengine_get_device_for_dma_api() to ge

crypto: sa2ul - Support for per channel coherency

On AM64 the DMA channel for sa2ul can be configured to be coherent or
non coherent via DT binding.

Use the dmaengine_get_device_for_dma_api() to get the device pointer which
should be used for with the dma_api to use matching dma_ops for the
channel coherency/non coherency.

Signed-off-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Vaibhav Gupta <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: v5.12-rc7
# 13343bad 08-Apr-2021 Shixin Liu <[email protected]>

crypto: sa2ul - Fix PM reference leak in sa_ul_probe()

pm_runtime_get_sync will increment pm usage counter even it failed.
Forgetting to putting operation will result in reference leak here.
Fix it

crypto: sa2ul - Fix PM reference leak in sa_ul_probe()

pm_runtime_get_sync will increment pm usage counter even it failed.
Forgetting to putting operation will result in reference leak here.
Fix it by replacing it with pm_runtime_resume_and_get to keep usage
counter balanced.

Signed-off-by: Shixin Liu <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: v5.12-rc6
# 854b7737 01-Apr-2021 Colin Ian King <[email protected]>

crypto: sa2ul - Fix memory leak of rxd

There are two error return paths that are not freeing rxd and causing
memory leaks. Fix these.

Addresses-Coverity: ("Resource leak")
Fixes: 00c9211f60db ("cr

crypto: sa2ul - Fix memory leak of rxd

There are two error return paths that are not freeing rxd and causing
memory leaks. Fix these.

Addresses-Coverity: ("Resource leak")
Fixes: 00c9211f60db ("crypto: sa2ul - Fix DMA mapping API usage")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: 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
# a24d22b2 13-Nov-2020 Eric Biggers <[email protected]>

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 i

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 <[email protected]>
Acked-by: Ard Biesheuvel <[email protected]>
Acked-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: v5.10-rc3, v5.10-rc2, v5.10-rc1
# ad0bb4e4 15-Oct-2020 Herbert Xu <[email protected]>

crypto: sa2ul - Reduce stack usage

This patch reduces the stack usage in sa2ul:

1. Move the exported sha state into sa_prepare_iopads so that it
can occupy the same space as the k_pad buffer.

2. U

crypto: sa2ul - Reduce stack usage

This patch reduces the stack usage in sa2ul:

1. Move the exported sha state into sa_prepare_iopads so that it
can occupy the same space as the k_pad buffer.

2. Use one buffer for ipad/opad in sa_prepare_iopads.

3. Remove ipad/opad buffer from sa_set_sc_auth.

4. Use async skcipher fallback and remove on-stack request from
sa_cipher_run.

Reported-by: kernel test robot <[email protected]>
Fixes: d2c8ac187fc9 ("crypto: sa2ul - Add AEAD algorithm support")
Signed-off-by: Herbert Xu <[email protected]>

show more ...


Revision tags: v5.9, v5.9-rc8, v5.9-rc7
# 00c9211f 23-Sep-2020 Peter Ujfalusi <[email protected]>

crypto: sa2ul - Fix DMA mapping API usage

Make sure that we call the dma_unmap_sg on the correct scatterlist on
completion with the correct sg_nents.

Use sg_table to managed the DMA mapping and at

crypto: sa2ul - Fix DMA mapping API usage

Make sure that we call the dma_unmap_sg on the correct scatterlist on
completion with the correct sg_nents.

Use sg_table to managed the DMA mapping and at the same time add the needed
dma_sync calls for the sg_table.

Signed-off-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

show more ...


12