RE: [EXT] [PATCH v2] crypto: caam/qi2 - lower the algorithm priority

From: Sahil Malhotra (OSS)

Date: Wed Sep 30 2026 - 03:29:46 EST


Hi Vincent,

I'm not sure I understand the need for this change.
Is it now expected that hardware accelerators should have a lower default priority than ARM CE?
Users who want to use ARM CE can already choose it at runtime, so changing the default priority does not seem necessary from my perspective.

Regards,
Sahil Malhotra


NXP Confidential
> -----Original Message-----
> From: Vincent Jardin via B4 Relay <devnull+vjardin.free.fr@xxxxxxxxxx>
> Sent: 30 September 2026 01:59
> To: Horia Geanta <horia.geanta@xxxxxxx>; Pankaj Gupta
> <pankaj.gupta@xxxxxxx>; Sahil Malhotra <sahil.malhotra@xxxxxxx>; Herbert
> Xu <herbert@xxxxxxxxxxxxxxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>;
> Gaurav Jain <gaurav.jain@xxxxxxx>
> Cc: Eric Biggers <ebiggers@xxxxxxxxxx>; linux-crypto@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; Vincent Jardin <vjardin@xxxxxxx>
> Subject: [EXT] [PATCH v2] crypto: caam/qi2 - lower the algorithm priority
>
> Caution: This is an external email. Please take care when clicking links or opening
> attachments. When in doubt, report the message using the 'Report this email'
> button
>
>
> From: Vincent Jardin <vjardin@xxxxxxx>
>
> Lower the priority to 100, as done for QAT in commit
> 8024774190a5 ("crypto: qat - lower priority for skcipher and aead algorithms").
>
> The SEC stays reachable by driver name, and user space can raise its priority
> through the crypto_user interface.
>
> Suggested-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Link:
> https://lore.kernel/
> .org%2Fr%2FaruvJECCDNdguMdw%40gondor.apana.org.au&data=05%7C02%7Cs
> ahil.malhotra%40nxp.com%7C10c43f21b2134717d1f108df1e6852ed%7C686ea1
> d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C639263105554431204%7CUnkno
> wn%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAi
> OiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=3
> wozUHYpxdImjIBVE%2FwfWRA0St1JtJlSYfx3hgZAhOw%3D&reserved=0
> Signed-off-by: Vincent Jardin <vjardin@xxxxxxx>
> ---
> v2 lowers the priority to 100, as was done for QAT, and leaves the choice to user
> space through crypto_user.
> ---
> Changes in v2:
> - Drop both the dpaa2_caam.priority module parameter and the
> fsl,qi2-crypto-priority DT property
> - Lower the default priority to 100, user space adjust it with
> crypto_user (Herbert).
> - No policy in the device tree (Krzysztof, Eric).
> - Link to v1:
> https://lore.kernel/
> .org%2Fr%2F20260928-for-upstream-caam-qi2-priority-v1-0-
> e4a8e5f01dbc%40free.fr&data=05%7C02%7Csahil.malhotra%40nxp.com%7C10c
> 43f21b2134717d1f108df1e6852ed%7C686ea1d3bc2b4c6fa92cd99c5c301635%7
> C0%7C0%7C639263105554463258%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0e
> U1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIld
> UIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=XNOC7W92lH0NlKVcUyK69O5VrYCl4
> 9F4wwr3dU1Q6Mo%3D&reserved=0
> ---
> drivers/crypto/caam/caamalg_qi2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/caam/caamalg_qi2.c
> b/drivers/crypto/caam/caamalg_qi2.c
> index 6b47bcc16a50..d3cb2bd5c41d 100644
> --- a/drivers/crypto/caam/caamalg_qi2.c
> +++ b/drivers/crypto/caam/caamalg_qi2.c
> @@ -26,7 +26,7 @@
> #include <crypto/xts.h>
> #include <linux/unaligned.h>
>
> -#define CAAM_CRA_PRIORITY 2000
> +#define CAAM_CRA_PRIORITY 100
>
> /* max key is sum of AES_MAX_KEY_SIZE, max split key size */
> #define CAAM_MAX_KEY_SIZE (AES_MAX_KEY_SIZE +
> CTR_RFC3686_NONCE_SIZE + \
>
> ---
> base-commit: 67aefeccc4101a93627f36abbd049f191b54f903
> change-id: 20260928-for-upstream-caam-qi2-priority-76301b8eb3a6
>
> Best regards,
> --
> Vincent Jardin <vjardin@xxxxxxx>
>
>