Commit Graph

1461837 Commits

Author SHA1 Message Date
Eric Biggers
185c67edbb crypto: af_alg - Replace 'bool privileged' with flags
It isn't obvious what false/true mean at the definition sites, so let's
replace it with flags instead.  Also flip the polarity to make the
default zero-initialized value be the secure (privileged-only) value.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:34:21 +10:00
Eric Biggers
d9506e82ce crypto: af_alg - Make cbc(paes) privileged-only
So far the only reported use cases for cbc(paes) have involved processes
running as root.  Therefore, make af_alg_restrict=1 allow only
privileged use of this algorithm for now.

Fixes: 947d62c094 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6")
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Reviewed-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:34:21 +10:00
Yuho Choi
188bb9ad86 hwrng: imx-rngc - Disable clock on registration failure
The RNGC clock is enabled manually before runtime PM is configured. If
devm_hwrng_register() fails, probe returns without disabling the clock.
The devm_pm_runtime_enable() cleanup only disables runtime PM and does not
call imx_rngc_suspend().

Disable the clock before returning from this failure path.

Fixes: 7a96a64e86 ("hwrng: imx-rngc - add runtime pm")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
Reviewed-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:34:21 +10:00
Ahsan Atta
61135c1597 crypto: qat - remove dead ADF_HEX code
The ADF_HEX value type is defined in the adf_cfg_val_type enum and
handled in adf_cfg_add_key_value_param(), but no caller in the tree
uses it.

Remove the unused ADF_HEX enum value and its dead handling code.

Fixes: d8cba25d2c ("crypto: qat - Intel(R) QAT driver framework")
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Svyatoslav Pankratov <svyatoslav.pankratov@intel.com>
Signed-off-by: Ahsan Atta <ahsan.atta@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:28:56 +10:00
Thorsten Blum
ebd1071c21 crypto: qce - simplify qce_handle_request
Simplify the for loop's control flow and return the results directly.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:28:56 +10:00
Thorsten Blum
bf3285b7a7 crypto: qce - simplify devm_qce_register_algs
Drop the redundant ret = -ENODEV initialization. Use a while loop and
reuse the local index variable i on the error path.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:28:56 +10:00
Rosen Penev
9a955c0a7d crypto: caam - simplify probe resource and IRQ handling
Convert the interrupt acquisition from irq_of_parse_and_map() to
platform_get_irq(), which resolves the IRQ from the device's interrupts
property via of_irq_get(). Flip the error check from testing for zero to
testing for a negative errno, and drop the now-unused
caam_jr_irq_dispose_mapping() callback and its devm_add_action_or_reset()
cleanup, since platform_get_irq() manages the mapping internally.

Replace the open-coded platform_get_resource() plus devm_ioremap()
sequence with devm_platform_ioremap_resource(), which fetches the
resource, requests the region and maps it in one call.

Each fsl,sec-*-job-ring node has a distinct 0x10000 reg region and
interrupts property, so the region reservation added by
devm_ioremap_resource() is exclusive and does not introduce overlap
failures.

Assisted-by: opencode:hy3-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:28:56 +10:00
Rosen Penev
aacf3a6c47 crypto: amcc - fix racy teardown with devm_request_irq
The driver uses devm_request_irq() for the IRQ, but cleans up the
tasklet and DMA rings inside the remove function.  Since devres frees
the IRQ only after the remove function returns, a window exists where a
pending hardware interrupt can reschedule the tasklet after it has been
killed, leading to use-after-free of the descriptor rings.

Fix by switching to plain request_irq() and adding the corresponding
free_irq() calls in the remove function and the probe error path before
tasklet_kill(), ensuring the IRQ is fully torn down before the tasklet
is killed.

Rename goto error path to err_tasklet as that's more descriptive.

Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:28:56 +10:00
Rosen Penev
e5658c6041 crypto: cesa - clear cesa_dev on _remove
This is already done on probe failure.

cesa_dev should be set to NULL as the driver checks that it is not and
errors saying that only one device is authorized.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:28:56 +10:00
Paul Louvel
967cfc046d crypto: ecdsa - Fix typo in function documentation
Fix the misspelling of 'validate' in crypto_ecdh_shared_secret() and
ecc_is_pubkey_valid_partial() documentation.

Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:28:56 +10:00
Randy Dunlap
389a3c294a crypto: ccp - don't abuse kernel-doc comment format
Use plain C "/*" notation for comments that are not in kernel-doc format
to avoid kernel-doc warnings:

Warning: include/uapi/linux/psp-sfs.h:18 expecting prototype for SFS().
 Prototype was for PAYLOAD_NAME_SIZE() instead
Warning: include/uapi/linux/psp-sfs.h:46 This comment starts with '/**',
 but isn't a kernel-doc comment.
 * Seamless Firmware Support (SFS) IOC

Fixes: 648dbccc03 ("crypto: ccp - Add AMD Seamless Firmware Servicing (SFS) driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:28:55 +10:00
Udit Tiwari
6f5569203b crypto: qce - Add runtime PM and interconnect bandwidth scaling support
The Qualcomm Crypto Engine (QCE) driver currently lacks support for
runtime power management (PM) and interconnect bandwidth control.
As a result, the hardware remains fully powered and clocks stay
enabled even when the device is idle. Additionally, static
interconnect bandwidth votes are held indefinitely, preventing the
system from reclaiming unused bandwidth.

Address this by enabling runtime PM and dynamic interconnect
bandwidth scaling to allow the system to suspend the device when idle
and scale interconnect usage based on actual demand. Improve overall
system efficiency by reducing power usage and optimizing interconnect
resource allocation.

Signed-off-by: Udit Tiwari <udit.tiwari@oss.qualcomm.com>
Tested-by: Pankaj Patil <pankaj.patil@oss.qualcomm.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@oss.qualcomm.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Tested-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:20:31 +10:00
Rosen Penev
4a1c7518cc crypto: talitos - Use platform_get_irq() to retrieve interrupt
Remove the need to call irq_dispose_mapping as needed by
irq_of_parse_and_map().

Simplify the function as a result. No need for gotos anymore.

Add a missing free_irq.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:20:20 +10:00
Thorsten Blum
dc9e9023ad crypto: atmel-ecc - drop redundant return variable
In atmel_ecdh_generate_public_key(), drop the redundant return variable
and return -EINVAL and 0 directly.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:20:20 +10:00
Thorsten Blum
bda65642eb crypto: atmel-ecc - simplify control flow in atmel_ecdh_set_secret
Free the public key directly on I2C transaction failure and remove the
free_public_key label to simplify the code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:20:20 +10:00
Wenjia Zhang
006fb75aa3 dt-bindings: crypto: qcom,inline-crypto-engine: Add x1e80100 support
Document the compatible string for inline crypto engine found
on the Qualcomm X1E80100 SoC, used by the Hamoa IoT EVK board.

Signed-off-by: Wenjia Zhang <wenjia.zhang@oss.qualcomm.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-10 18:20:20 +10:00
Herbert Xu
947d62c094 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Merge crypto tree to pick up the af_alg cbc(paes) patch.  In the
merge commit add cbc(paes) to the algorithm white-list.
2026-07-31 17:28:24 +10:00
Richard Weinberger
285d820463 crypto: af_alg - Allow cbc(paes)
Commit 7524070f26 ("crypto: af_alg - Drop support for off-CPU cryptography")
breaks a special use case.  The cbc-paes-caam driver implements the
algorithm cbc(paes), it offers a way to use AES in CBC mode with key
material unknown to userspace.  Instead of an AES key a CAAM BLOB is
passed to the kernel.  So, this crypto operation cannot be
implemented in a userspace library and needs always help from the
kernel.

Explicitly allow this use case.

Cc: Demi Marie Obenour <demiobenour@gmail.com>
Suggested-by: Eric Biggers <ebiggers@kernel.org>
Fixes: 7524070f26 ("crypto: af_alg - Drop support for off-CPU cryptography")
Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:44:21 +10:00
Randy Dunlap
a264cb967d crypto: af_alg - clean up kernel-doc warnings
- add missing struct member @wait, drop @completion
- convert function comments to kernel-doc format
- for af_alg_readable(), change comments from "writable" to "readable"

Warning: include/crypto/if_alg.h:161 struct member 'wait' not described
 in 'af_alg_ctx'
Warning: include/crypto/if_alg.h:161 Excess struct member 'completion'
 description in 'af_alg_ctx'
Warning: include/crypto/if_alg.h:187 This comment starts with '/**', but
 isn't a kernel-doc comment.
 * Size of available buffer for sending data from user space to kernel.
Warning: include/crypto/if_alg.h:202 This comment starts with '/**', but
 isn't a kernel-doc comment.
 * Can the send buffer still be written to?
Warning: include/crypto/if_alg.h:213 This comment starts with '/**', but
 isn't a kernel-doc comment.
 * Size of available buffer used by kernel for the RX user space operation.
Warning: include/crypto/if_alg.h:228 This comment starts with '/**', but
 isn't a kernel-doc comment.
 * Can the RX buffer still be written to?

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:36:41 +10:00
Sang-Heon Jeon
57e599da2d crypto: drivers - remove conditional return with no effect
Both branches of the check return the same value, so the check has
no effect. Remove it and return the value directly.

This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:36:41 +10:00
Thorsten Blum
83f11e1152 crypto: octeontx - simplify get_{eng,ucode}_type_str helpers
Remove the local variables, add default cases, and return the strings
directly.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:36:41 +10:00
Thorsten Blum
567fa6076c crypto: qce - drop redundant variable in qce_skcipher_done
Remove the local ret variable and return the result directly.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:36:41 +10:00
Thorsten Blum
37b70fa01b crypto: bcm - use memcpy_and_pad in ahash_hmac_setkey
Use memcpy_and_pad() instead of memcpy() followed by memset() to
simplify ahash_hmac_setkey().

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:36:41 +10:00
Rosen Penev
8b1fea9dda crypto: cesa - manage SRAM teardown with devm
mv_cesa_put_sram() is called explicitly from both the probe error path
and mv_cesa_remove(). The non-pool ioremap is already devm-managed, but
dma_map_resource() and gen_pool_dma_alloc() have no devm helpers, so the
mapping is released by hand. This is error-prone: the error path iterates
over every engine and can dma_unmap_resource() an uninitialized/zero
address for engines that were never set up.

Convert the teardown into a devm_add_action_or_reset() callback registered
only after a mapping is successfully established. The callback fires
automatically on probe failure (devres rollback) and on device detach,
after mv_cesa_remove() has already stopped the engine and freed the IRQ,
so the unmap still happens in a safe order. This deletes the explicit
mv_cesa_put_sram() calls and the uninitialized-engine bug at once.

Add a struct mv_cesa_dev back-pointer to struct mv_cesa_engine so the
callback can reach cesa->dev and cesa->sram_size from the engine alone.

Assisted-by: opencode:hy3-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:36:41 +10:00
Thorsten Blum
6b36f13891 crypto: starfive - use scatterlist length before DMA mapping
Using sg_dma_len() is only valid after mapping a scatterlist with
dma_map_sg(). However, starfive_aes_aead_do_one_req() uses it before
mapping the scatterlist.

Use the original scatterlist length because the DMA length has not been
populated yet when CONFIG_NEED_SG_DMA_LENGTH=y.

Fixes: 7467147ef9 ("crypto: starfive - Use dma for aes requests")
Cc: stable@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:30:50 +10:00
Thorsten Blum
9c75402286 crypto: qce - fix error path in devm_qce_register_algs
If ops->register_algs() fails, the error path repeatedly calls the same
ops->unregister_algs() from the failed registration. Use the loop index
to unregister the previously registered algorithms instead.

Fixes: e80cf84b60 ("crypto: qce - unregister previously registered algos in error path")
Cc: stable@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:30:50 +10:00
Florian Westphal
1132c38927 rhashtable: fix false-positive lockdep splat on rhltable destruction
Blamed commit removed ht->mutex usage during destruction but forgot to
switch rhashtable_free_one() to rcu_dereference_raw(), this triggers a
lockdep splat when an rhltable gets zapped.

Fixes: 09ae540e1d ("rhashtable: drop ht->mutex in rhashtable_free_and_destroy()")
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:30:50 +10:00
Vladislav Dronov
360f2974fc crypto: tegra - fix rctx->cryptlen calculation in tegra_gcm_do_one_req()
Perform rctx->cryptlen calculation in tegra_gcm_do_one_req() the same way
it is done in tegra_ccm_crypt_init(). The current formulae may lead to a
crash if a caller does not call tegra_gcm_setauthsize() and so ctx->authsize
remains zero. Then a decrypt operation with incorrect rctx->cryptlen will
lead to a write beyound rctx->dst_sg buffer.

As a follow-up cleanup delete struct tegra_aead_ctx->authsize field since
it appears to be completely unused. Also simplify tegra_ccm_setauthsize()
and tegra_gcm_setauthsize() functions respectively.

Fixes: 0880bb3b00 ("crypto: tegra - Add Tegra Security Engine driver")
Signed-off-by: Vladislav Dronov <vdronov@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:30:50 +10:00
Herbert Xu
438f4896f7 crypto: ccm - Set rfc4309 maxauthsize from child
Set the maxauthsize of rfc4309 using that of the child algorithm.

Fixes: 4a49b499df ("[CRYPTO] ccm: Added CCM mode")
Reported-by: Seohyeon Maeng <bioloidgp@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-30 17:30:50 +10:00
Can Peng
1163a476a5 hwrng: stm32 - Fix runtime PM cleanup on registration failure
stm32_rng_probe() enables autosuspend and runtime PM before registering the
hwrng. If devm_hwrng_register() fails, probe returns with runtime PM left
enabled and autosuspend still selected.

The remove callback also only disables runtime PM and does not undo
pm_runtime_use_autosuspend().

Use devm_pm_runtime_enable() so runtime PM is unwound automatically on
probe failure and driver detach. Since the managed cleanup also disables
runtime PM,drop the remove callback.

Fixes: c6a97c42e3 ("hwrng: stm32 - add support for STM32 HW RNG")
Cc: stable@vger.kernel.org
Signed-off-by: Can Peng <pengcan@kylinos.cn>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Chenghai Huang
a7e2dfb7da crypto: hisilicon/sec2 - remove unused sec_ctx.hlf_q_num
hlf_q_num is set but never read; drop the field and its assignment.

Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Chenghai Huang
67ca4ac78f crypto: hisilicon/sec2 - fix uninitialized type_supported in sec_create_qp_ctx
sec_create_qp_ctx() reads ctx->type_supported to pick its callback, but
sec_skcipher_init() and sec_aead_init() set it after sec_ctx_base_init()
has already walked the qp_ctx loop, so the value is uninitialized when
first consumed.  Set type_supported in sec_ctx_base_init() before the
loop; the alg init paths now just select req_op from it.

Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Pan Chuang
b0b8583719 crypto: stm32 - Remove redundant dev_err()
Since commit 55b48e23f5 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_threaded_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Acked-by: Maxime Méré <maxime.mere@foss.st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Pan Chuang
01138b8195 crypto: rockchip - Remove redundant dev_err()
Since commit 55b48e23f5 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Pan Chuang
1222a24f79 crypto: octeontx2 - Remove redundant dev_err()
Since commit 55b48e23f5 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Pan Chuang
ac2ad1af8a crypto: keembay - Remove redundant dev_err()
Since commit 55b48e23f5 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_threaded_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Pan Chuang
80283c1e1b crypto: safexcel - Remove redundant dev_err()
Since commit 55b48e23f5 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_threaded_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Pan Chuang
a63a547e26 crypto: sl3516 - Remove redundant dev_err()
Since commit 55b48e23f5 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Pan Chuang
f9a1dd7a57 crypto: ccree - Remove redundant dev_err()
Since commit 55b48e23f5 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Pan Chuang
53fa9d8d97 crypto: drivers - Remove redundant dev_err()/dev_err_probe()
Since commit 55b48e23f5 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() and dev_err_probe() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Pan Chuang
9d3c82be49 crypto: aspeed - Remove redundant dev_err()
Since commit 55b48e23f5 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Pan Chuang
c32dd3367b crypto: amlogic - Remove redundant dev_err()
Since commit 55b48e23f5 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Pan Chuang
1d39231ee9 crypto: allwinner - Remove redundant dev_err()
Since commit 55b48e23f5 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

Signed-off-by: Pan Chuang <panchuang@vivo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:27 +10:00
Rosen Penev
f13b83d881 crypto: omap-sham - use devm_platform_get_and_ioremap_resource
Replace the open-coded omap_sham_get_res_of()/omap_sham_get_res_pdev()
helpers and the #ifdef CONFIG_OF machinery with the managed
devm_platform_get_and_ioremap_resource(), platform_get_irq() and
device_get_match_data() helpers. The omap_sham_pdata_omap2 fallback is
kept for the non-DT (legacy platform_device) case. This removes the
manual resource copy and ioremap, simplifying probe.

Assisted-by: opencode:hy3-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:26 +10:00
Rosen Penev
6e6a89b930 crypto: omap-aes - use devm_platform_get_and_ioremap_resource
Replace the open-coded omap_aes_get_res_of()/omap_aes_get_res_pdev()
helpers and the #ifdef CONFIG_OF machinery with the managed
devm_platform_get_and_ioremap_resource(), platform_get_irq() and
device_get_match_data() helpers. The omap_aes_pdata_omap2 fallback is
kept for the non-DT (legacy platform_device) case, and the now-unused
err_res label is removed.

Assisted-by: opencode:hy3-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:26 +10:00
Rosen Penev
83418a2c5b crypto: hisilicon/sec - use devm_platform_ioremap_resource in sec_map_io
Replace the open-coded platform_get_resource() plus devm_ioremap()
sequence in the SEC_NUM_ADDR_REGIONS loop with
devm_platform_ioremap_resource(), which fetches the resource, requests
the region and maps it in one call. Switch the error check to
IS_ERR()/PTR_ERR() and drop the now-unused struct resource pointer.

The driver only maps indices 0 and 1 (SEC_COMMON, SEC_SAA). On hip07 the
corresponding reg regions (0xd0000000, 0xd2000000) are 0x10000 each and
disjoint, so the region reservation added by devm_ioremap_resource() is
exclusive and does not introduce overlap failures.

Built for arm64 (drivers/crypto/hisilicon/sec/sec_drv.o) with LLVM=1.

Assisted-by: opencode:hy3-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:26 +10:00
Can Peng
0a94091e29 crypto: keembay - publish OF module alias for OCS AES/SM4
The Keem Bay OCS AES/SM4 driver has an OF match table wired to
.of_match_table, but does not export the table with MODULE_DEVICE_TABLE().

Although the match table lives in keembay-ocs-aes-core.o, that object is
part of the composite keembay-ocs-aes module.  Add the missing
MODULE_DEVICE_TABLE(of, ...) entry so modpost can generate OF module alias
information for OF based module autoloading.

This is a source-level fix.  It does not claim dynamic hardware
reproduction; the evidence is the driver-owned match table, its use by the
platform driver, and the missing module alias publication.

Fixes: 8857433245 ("crypto: keembay - Add support for Keem Bay OCS AES/SM4")
Signed-off-by: Can Peng <pengcan@kylinos.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:26 +10:00
Kuldeep Singh
45834ff95a dt-bindings: crypto: qcom-qce: Document the Shikra crypto engine
Document the crypto engine on the Qualcomm Shikra platform.

Signed-off-by: Kuldeep Singh <kuldeep.singh@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:26 +10:00
Kuldeep Singh
3c4ba9d03b dt-bindings: crypto: qcom,prng: Document Shikra TRNG
Document shikra compatible for the True Random Number Generator.

Signed-off-by: Kuldeep Singh <kuldeep.singh@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:26 +10:00
Kuldeep Singh
bcfea926aa dt-bindings: crypto: qcom,inline-crypto-engine: Document Shikra ICE
Document the Inline Crypto Engine (ICE) on the Qualcomm Shikra platform.

Signed-off-by: Kuldeep Singh <kuldeep.singh@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-07-27 10:29:26 +10:00