Skip to contentSkip to conversation

FAILED: patch "[PATCH] crypto: caam/qi2 - add fallback for XTS with more than 8B IV" failed to apply to 5.4-stable tree

PATCH [email protected] 1 participant 1 message Oct 24, 2020

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 36e2d7cfdcf17b6126863d884d4200191e922524 Mon Sep 17 00:00:00 2001
From: Andrei Botila <[email protected]>
Date: Tue, 22 Sep 2020 19:03:21 +0300
Subject: [PATCH] crypto: caam/qi2 - add fallback for XTS with more than 8B IV
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV.

Fixes 226853ac3ebe ("crypto: caam/qi2 - add skcipher algorithms")
Cc <[email protected]> # v4.20+
drivers/crypto/caam/Kconfig +1 -0
index 8169e6cd04e6..84ea7cba5ee5 100644
@@ -167,6 +167,7 @@ config CRYPTO_DEV_FSL_DPAA2_CAAM
 	select CRYPTO_AEAD
 	select CRYPTO_HASH
 	select CRYPTO_DES
+	select CRYPTO_XTS
 	help
 	  CAAM driver for QorIQ Data Path Acceleration Architecture 2.
 	  It handles DPSECI DPAA2 objects that sit on the Management Complex
drivers/crypto/caam/caamalg_qi2.c +75 -5

147 lines not on this page · raw message

drivers/crypto/caam/caamalg_qi2.h +2 -0
index f29cb7bd7dd3..d35253407ade 100644
@@ -13,6 +13,7 @@
 #include <linux/netdevice.h>
 #include "dpseci.h"
 #include "desc_constr.h"
+#include <crypto/skcipher.h>
 
 #define DPAA2_CAAM_STORE_SIZE	16
 /* NAPI weight *must* be a multiple of the store size. */
@@ -186,6 +187,7 @@ struct caam_request {
 	void (*cbk)(void *ctx, u32 err);
 	void *ctx;
 	void *edesc;
+	struct skcipher_request fallback_req;
 };
 
 /**