Re: [PATCH v20 4/4] crypto: spacc - Add SPAcc Kconfig and Makefile

[email protected]
Newsgroups org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing `select CRYPTO_SHA3` dependency for SPAcc ahash support.
--

--- Patch [4]: [PATCH v20 4/4] crypto: spacc - Add SPAcc Kconfig and Makefile ---
commit 4e5d1fffdbede78b50849c59ea51d64c31455d5c
Author: Pavitrakumar Managutte <[email protected]>

crypto: spacc - Add SPAcc Kconfig and Makefile

This commit introduces the Kconfig and Makefile for the new dwc_spacc
Security Protocol Accelerator driver. It wires up the build system entries
and configuration options for various SPAcc features.

> diff --git a/drivers/crypto/dwc-spacc/Kconfig b/drivers/crypto/dwc-spacc/Kconfig
> new file mode 100644
> --- /dev/null
> +++ b/drivers/crypto/dwc-spacc/Kconfig
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +
> +config CRYPTO_DEV_SPACC
> +	tristate "Support for dwc_spacc Security Protocol Accelerator"
> +	depends on HAS_DMA
> +	depends on HAS_IOMEM
> +	select CRYPTO_ENGINE
> +	select CRYPTO_HASH if CRYPTO_DEV_SPACC_HASH
> +	select CRYPTO_SHA1 if CRYPTO_DEV_SPACC_HASH
> +	select CRYPTO_MD5 if CRYPTO_DEV_SPACC_HASH
> +	select CRYPTO_SHA256 if CRYPTO_DEV_SPACC_HASH
> +	select CRYPTO_SHA512 if CRYPTO_DEV_SPACC_HASH
> +	select CRYPTO_HMAC if CRYPTO_DEV_SPACC_HASH

[Severity: Medium]
Is a select for CRYPTO_SHA3 missing here?

The SPAcc driver implements hardware acceleration for SHA-3 algorithms and
requires the software SHA-3 algorithms as fallbacks. If CONFIG_CRYPTO_SHA3
is not enabled, the driver's probe sequence will fail to find the fallback
and silently skip registering the SHA-3 hardware acceleration algorithms.

> +	select CRYPTO_CMAC if CRYPTO_DEV_SPACC_HASH
> +	select CRYPTO_XCBC if CRYPTO_DEV_SPACC_HASH
> +	select CRYPTO_AES if CRYPTO_DEV_SPACC_HASH
> +	select CRYPTO_SM4_GENERIC if CRYPTO_DEV_SPACC_HASH
> +	default n

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.