From: sashiko-bot@kernel.org
To: "Pavitrakumar Managutte" <pavitrakumarm@vayavyalabs.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v16 4/4] crypto: spacc - Add SPAcc Kconfig and Makefile
Date: Tue, 07 Jul 2026 13:06:48 +0000 [thread overview]
Message-ID: <20260707130648.C16921F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260707125311.2398031-5-pavitrakumarm@vayavyalabs.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] Hardware tuning and instance configuration parameters are hardcoded as compile-time Kconfig options.
- [Medium] Boolean Kconfig option `CRYPTO_DEV_SPACC_HASH` unconditionally selects tristate algorithms, causing kernel bloat.
- [Low] Unused dependency on `CRYPTO_SM3` selected by `CRYPTO_DEV_SPACC_HASH`.
--
--- Patch [4]: [PATCH v16 4/4] crypto: spacc - Add SPAcc Kconfig and Makefile ---
commit cd06e4262110289b96679278cd22ee6ebd1683fa
Author: Pavitrakumar Managutte <pavitrakumarm@vayavyalabs.com>
crypto: spacc - Add SPAcc Kconfig and Makefile
Add Makefile and Kconfig for SPAcc driver.
> diff --git a/drivers/crypto/dwc-spacc/Kconfig b/drivers/crypto/dwc-spacc/Kconfig
> new file mode 100644
> index 0000000000000..a9172606d77aa
> --- /dev/null
> +++ b/drivers/crypto/dwc-spacc/Kconfig
[ ... ]
> +if CRYPTO_DEV_SPACC
> +
> +config CRYPTO_DEV_SPACC_HASH
> + bool "Enable HASH functionality"
> + default y
> + select CRYPTO_HASH
> + select CRYPTO_SHA1
> + select CRYPTO_MD5
> + select CRYPTO_SHA256
> + select CRYPTO_SHA512
> + select CRYPTO_HMAC
> + select CRYPTO_SM3
[Severity: Low]
Does this driver actually require CRYPTO_SM3? The spacc_ahash.c frontend does
not appear to include sm3 or hmac(sm3) in its supported hashes, nor does it
seem to use the algorithm for software fallbacks during key preparation.
> + select CRYPTO_CMAC
> + select CRYPTO_XCBC
> + select CRYPTO_AES
> + select CRYPTO_SM4_GENERIC
[Severity: Medium]
Since CRYPTO_DEV_SPACC_HASH is a bool, if CRYPTO_DEV_SPACC is built as a
module (=m), won't these selects evaluate to =y? This would force all these
core crypto algorithms to be statically compiled into the vmlinux image,
which might unnecessarily bloat the kernel size for users expecting them
to remain as modules.
[ ... ]
> +config CRYPTO_DEV_SPACC_PRIORITY
> + int "VSPACC priority value"
> + range 0 15
> + default 1
> + help
> + Default arbitration priority weight for this Virtual SPAcc instance.
> + Hardware resets this to 1. Higher values means higher priority.
> +
> +config CRYPTO_DEV_SPACC_INTERNAL_COUNTER
> + int "SPAcc internal counter value"
> + range 100000 1048575
> + default 100000
> + help
> + This value configures a hardware watchdog counter in the SPAcc engine.
> + The counter starts ticking when a completed cryptographic job is
> + sitting in the STATUS FIFO. If the job remains unprocessed for the
> + configured duration, an interrupt is triggered to ensure it is serviced.
[Severity: Medium]
Are these hardware tuning parameters appropriate for compile-time Kconfig
options?
In a multiplatform kernel, statically defining the virtual instance arbitration
priority and watchdog timeout forces all devices using this kernel binary to
share the exact same configuration.
Could these parameters be passed dynamically at runtime via Device Tree,
ACPI, or module parameters to support per-board flexibility?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260707125311.2398031-1-pavitrakumarm@vayavyalabs.com?part=4
next prev parent reply other threads:[~2026-07-07 13:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 12:53 [PATCH v16 0/4] crypto: spacc - Add SPAcc Crypto Driver Pavitrakumar Managutte
2026-07-07 12:53 ` [PATCH v16 1/4] dt-bindings: crypto: Document support for SPAcc Pavitrakumar Managutte
2026-07-07 12:53 ` [PATCH v16 2/4] crypto: spacc - Add SPAcc ahash support Pavitrakumar Managutte
2026-07-07 13:13 ` sashiko-bot
2026-07-07 12:53 ` [PATCH v16 3/4] crypto: spacc - Add SPAcc AUTODETECT Support Pavitrakumar Managutte
2026-07-07 13:09 ` sashiko-bot
2026-07-07 12:53 ` [PATCH v16 4/4] crypto: spacc - Add SPAcc Kconfig and Makefile Pavitrakumar Managutte
2026-07-07 13:06 ` sashiko-bot [this message]
2026-07-10 12:27 ` Julian Braha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260707130648.C16921F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=pavitrakumarm@vayavyalabs.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox