* Re: [PATCH] crypto: qce - Replace with stub driver
[not found] <20260731050838.158825-1-ebiggers@kernel.org>
@ 2026-07-31 5:32 ` Demi Marie Obenour
2026-07-31 7:42 ` Bartosz Golaszewski
2026-07-31 9:06 ` Krzysztof Kozlowski
2 siblings, 0 replies; 4+ messages in thread
From: Demi Marie Obenour @ 2026-07-31 5:32 UTC (permalink / raw)
To: Eric Biggers, linux-crypto, Herbert Xu
Cc: linux-arm-msm, linux-arm-kernel, linux-kernel,
Bartosz Golaszewski, Kuldeep Singh, Dmitry Baryshkov,
Konrad Dybcio, Greg Kroah-Hartman
[-- Attachment #1.1: Type: text/plain, Size: 4853 bytes --]
On 7/31/26 01:08, Eric Biggers wrote:
> None of the algorithms the QCE driver registers with the crypto API are
> even close to being useful. They're massively outperformed by the
> CPU-based crypto (even actually using far more CPU cycles than the
> CPU-based crypto, due to the massive driver overhead), don't provide any
> security benefits over the CPU-based crypto, and have various other
> issues. They're also unrelated to the Inline Crypto Engine which works
> far better and is what is actually being used these days.
>
> Due to the major performance problems people experienced when
> accidentally using this driver, the algorithms were already demoted to
> below the priority of ARMv8 CE in the crypto API several years ago.
> Regardless of priority, these algorithms also aren't compatible with the
> most common uses of in-kernel crypto; for example, they don't support
> dm-crypt because they allocate memory, and they don't support IPsec
> since they take a mutex which isn't compatible with softirq context.
>
> It's time to move on and just drop this obsolete functionality entirely.
>
> However, the driver does serve one purpose which is to bind to the
> devicetree node and allow the interconnects to scale down (though even
> that part is broken, as it holds static interconnect bandwidth votes).
>
> Thus, clear out the crypto functionality, leaving just a stub driver
> that drops the interconnection bandwidth votes to zero.
>
> Tested on the SM8650 HDK.
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Some thoughts:
1. Should this be put under a different subdirectory? This
is now a power management driver, not a crypto driver.
IMO it should just fall under ARCH_QCOM, without a separate
Kconfig entry (or at least a "default y" one).
2. Should it be re-added to the defconfigs? Most distros
will want to turn it on, as it saves power and is minuscule.
3. Will this the smallest driver in the whole kernel?
> ---
> drivers/crypto/Kconfig | 117 +----
> drivers/crypto/qce/Makefile | 7 -
> drivers/crypto/qce/aead.c | 787 ----------------------------------
> drivers/crypto/qce/aead.h | 56 ---
> drivers/crypto/qce/cipher.h | 56 ---
> drivers/crypto/qce/common.c | 564 ------------------------
> drivers/crypto/qce/common.h | 94 ----
> drivers/crypto/qce/core.c | 271 ------------
> drivers/crypto/qce/core.h | 64 ---
> drivers/crypto/qce/dma.c | 135 ------
> drivers/crypto/qce/dma.h | 47 --
> drivers/crypto/qce/qcrypto.c | 43 ++
> drivers/crypto/qce/regs-v5.h | 322 --------------
> drivers/crypto/qce/sha.c | 498 ---------------------
> drivers/crypto/qce/sha.h | 71 ---
> drivers/crypto/qce/skcipher.c | 434 -------------------
> 16 files changed, 50 insertions(+), 3516 deletions(-)
> delete mode 100644 drivers/crypto/qce/aead.c
> delete mode 100644 drivers/crypto/qce/aead.h
> delete mode 100644 drivers/crypto/qce/cipher.h
> delete mode 100644 drivers/crypto/qce/common.c
> delete mode 100644 drivers/crypto/qce/common.h
> delete mode 100644 drivers/crypto/qce/core.c
> delete mode 100644 drivers/crypto/qce/core.h
> delete mode 100644 drivers/crypto/qce/dma.c
> delete mode 100644 drivers/crypto/qce/dma.h
> create mode 100644 drivers/crypto/qce/qcrypto.c
> delete mode 100644 drivers/crypto/qce/regs-v5.h
> delete mode 100644 drivers/crypto/qce/sha.c
> delete mode 100644 drivers/crypto/qce/sha.h
> delete mode 100644 drivers/crypto/qce/skcipher.c
>
> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> index 0189dfdcbbe1..03113ad3467c 100644
> --- a/drivers/crypto/Kconfig
> +++ b/drivers/crypto/Kconfig
> @@ -527,119 +527,16 @@ source "drivers/crypto/marvell/Kconfig"
> source "drivers/crypto/intel/Kconfig"
>
> config CRYPTO_DEV_QCE
> - tristate "Qualcomm crypto engine accelerator"
> - depends on (BROKEN && ARCH_QCOM) || COMPILE_TEST
> + tristate "Qualcomm crypto engine"
> + depends on ARCH_QCOM || COMPILE_TEST
> depends on HAS_IOMEM
> help
> - This driver supports Qualcomm crypto engine accelerator
> - hardware. To compile this driver as a module, choose M here. The
> - module will be called qcrypto.
> -
> - This driver does not have exclusive access to the
> - hardware, causing races with the secure world. It
> - is also slower than the CPU.
> + This driver provides a stub for the Qualcomm crypto engine. It exists
> + only to bind to the devicetree node and allow interconnects to scale
> + down, saving power. It doesn't expose any cryptographic functionality.
Should this mention why the cryptographic functionality
available in the hardware has been proven unsuitable for use?
--
Sincerely,
Demi Marie Obenour (she/her/hers)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] crypto: qce - Replace with stub driver
[not found] <20260731050838.158825-1-ebiggers@kernel.org>
2026-07-31 5:32 ` [PATCH] crypto: qce - Replace with stub driver Demi Marie Obenour
@ 2026-07-31 7:42 ` Bartosz Golaszewski
2026-07-31 9:06 ` Krzysztof Kozlowski
2 siblings, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2026-07-31 7:42 UTC (permalink / raw)
To: Eric Biggers
Cc: linux-arm-msm, linux-arm-kernel, linux-kernel, Demi Marie Obenour,
Bartosz Golaszewski, Kuldeep Singh, Dmitry Baryshkov,
Konrad Dybcio, Greg Kroah-Hartman, linux-crypto, Herbert Xu
On Fri, 31 Jul 2026 07:08:38 +0200, Eric Biggers <ebiggers@kernel.org> said:
> None of the algorithms the QCE driver registers with the crypto API are
> even close to being useful. They're massively outperformed by the
> CPU-based crypto (even actually using far more CPU cycles than the
> CPU-based crypto, due to the massive driver overhead), don't provide any
> security benefits over the CPU-based crypto, and have various other
> issues. They're also unrelated to the Inline Crypto Engine which works
> far better and is what is actually being used these days.
>
> Due to the major performance problems people experienced when
> accidentally using this driver, the algorithms were already demoted to
> below the priority of ARMv8 CE in the crypto API several years ago.
> Regardless of priority, these algorithms also aren't compatible with the
> most common uses of in-kernel crypto; for example, they don't support
> dm-crypt because they allocate memory, and they don't support IPsec
> since they take a mutex which isn't compatible with softirq context.
>
> It's time to move on and just drop this obsolete functionality entirely.
>
> However, the driver does serve one purpose which is to bind to the
> devicetree node and allow the interconnects to scale down (though even
> that part is broken, as it holds static interconnect bandwidth votes).
>
> Thus, clear out the crypto functionality, leaving just a stub driver
> that drops the interconnection bandwidth votes to zero.
>
> Tested on the SM8650 HDK.
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
I'll be on vacation for most of August so my lack of responses won't mean I
no longer care, only that I'm disconnected. Let me just leave this here for
completness:
Nacked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
I don't understand why the push to fast track the removal of this driver now,
when there's clearly an effort to get it fixed from the vendor itself. I've
also never seen a driver for an IP on a supported platform being removed from
mainline linux.
Thanks,
Bartosz
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] crypto: qce - Replace with stub driver
[not found] <20260731050838.158825-1-ebiggers@kernel.org>
2026-07-31 5:32 ` [PATCH] crypto: qce - Replace with stub driver Demi Marie Obenour
2026-07-31 7:42 ` Bartosz Golaszewski
@ 2026-07-31 9:06 ` Krzysztof Kozlowski
2026-07-31 10:02 ` Eric Biggers
2 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-31 9:06 UTC (permalink / raw)
To: Eric Biggers, linux-crypto, Herbert Xu
Cc: linux-arm-msm, linux-arm-kernel, linux-kernel, Demi Marie Obenour,
Bartosz Golaszewski, Kuldeep Singh, Dmitry Baryshkov,
Konrad Dybcio, Greg Kroah-Hartman
On 31/07/2026 07:08, Eric Biggers wrote:
> None of the algorithms the QCE driver registers with the crypto API are
> even close to being useful. They're massively outperformed by the
The amount of patches you send towards removal of QCE is really
stunning. Or rather worrying. This is like third approach or so.
Your previous approaches received valid feedback, including even fixes
and committment of new maintainer.
But you even complained that it does receive fixes! [1]
We removed the driver temporarily from typical configurations, so no one
will be affected, by whatever is found now and not yet fixed. Still not
enough! For you this was reason to remove the driver (AGAIN!) [2]
This is beyond comprehension and very unpleasant, because you actively
work against the community with this approach.
NAK
Nacked-by: Krzysztof Kozlowski <krzk@kernel.org>
[1] https://lore.kernel.org/all/20260728152241.GA4281@quark/
[2] https://lore.kernel.org/all/20260724050645.223799-1-ebiggers@kernel.org/
> CPU-based crypto (even actually using far more CPU cycles than the
> CPU-based crypto, due to the massive driver overhead), don't provide any
> security benefits over the CPU-based crypto, and have various other
> issues. They're also unrelated to the Inline Crypto Engine which works
> far better and is what is actually being used these days.
>
> Due to the major performance problems people experienced when
> accidentally using this driver, the algorithms were already demoted to
> below the priority of ARMv8 CE in the crypto API several years ago.
> Regardless of priority, these algorithms also aren't compatible with the
> most common uses of in-kernel crypto; for example, they don't support
> dm-crypt because they allocate memory, and they don't support IPsec
> since they take a mutex which isn't compatible with softirq context.
>
> It's time to move on and just drop this obsolete functionality entirely.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] crypto: qce - Replace with stub driver
2026-07-31 9:06 ` Krzysztof Kozlowski
@ 2026-07-31 10:02 ` Eric Biggers
0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2026-07-31 10:02 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: linux-crypto, Herbert Xu, linux-arm-msm, linux-arm-kernel,
linux-kernel, Demi Marie Obenour, Bartosz Golaszewski,
Kuldeep Singh, Dmitry Baryshkov, Konrad Dybcio,
Greg Kroah-Hartman
On Fri, Jul 31, 2026 at 11:06:28AM +0200, Krzysztof Kozlowski wrote:
> On 31/07/2026 07:08, Eric Biggers wrote:
> > None of the algorithms the QCE driver registers with the crypto API are
> > even close to being useful. They're massively outperformed by the
>
> The amount of patches you send towards removal of QCE is really
> stunning. Or rather worrying. This is like third approach or so.
Note that the crypto maintainer has already accepted a patch from
another developer to mark this driver as BROKEN.
> This is beyond comprehension and very unpleasant, because you actively
> work against the community with this approach.
"The community" is more than the hardware vendor.
I think the results of independent testing of this driver are incredibly
clear. The pending fixes do not fix the performance either, but
actually make it worse.
I have been asking for the inclusion of this driver to be justified for
many years. As far as I've ever been able to tell it's just a "checkbox
feature", which isn't something that really belongs upstream.
I care about the technical merit of the kernel's cryptographic algorithm
implementations.
- Eric
^ permalink raw reply [flat|nested] 4+ messages in thread