summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2024-09-27 18:52:22 -0300
committerGitHub <noreply@github.com>2024-09-27 18:52:22 -0300
commit932073eb00735266e21bfbd8e2c2d4d3301afd8e (patch)
treed92d2fdc0bb68323fddf95fa13f73765a1e86622
parentf21ec21e0b3516ef3b4678dc9d977c5362b7b1ff (diff)
parentc87e4d92587c0266d930467641b4003eb87409e8 (diff)
downloadmeta-freescale-932073eb00735266e21bfbd8e2c2d4d3301afd8e.tar.gz
Merge pull request #1955 from Livius90/scarthgap
cryptodev-module: Add patch fix for prepare kernel v6.11.0 in scarthgap
-rw-r--r--recipes-kernel/cryptodev/cryptodev-module_%.bbappend12
-rw-r--r--recipes-kernel/cryptodev/files/fix-build-for-Linux-6.7-rc1.patch37
2 files changed, 49 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/cryptodev-module_%.bbappend b/recipes-kernel/cryptodev/cryptodev-module_%.bbappend
new file mode 100644
index 00000000..ad18b09e
--- /dev/null
+++ b/recipes-kernel/cryptodev/cryptodev-module_%.bbappend
@@ -0,0 +1,12 @@
1FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
2
3# Fix build for Linux 6.7-rc1: https://github.com/cryptodev-linux/cryptodev-linux/commit/5e7121e45ff283d30097da381fd7e97c4bb61364
4# Since Linux 6.7-rc1, no ahash algorithms set a nonzero alignmask,
5# and therefore `crypto_ahash_alignmask` has been removed.
6#
7# See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f8660c82b79af595b056f6b9f4f227edeb88574
8# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c626910f3f1bbce6ad18bc613d895d2a089ed95e
9
10SRC_URI:append:imx-generic-bsp = " \
11 file://fix-build-for-Linux-6.7-rc1.patch \
12"
diff --git a/recipes-kernel/cryptodev/files/fix-build-for-Linux-6.7-rc1.patch b/recipes-kernel/cryptodev/files/fix-build-for-Linux-6.7-rc1.patch
new file mode 100644
index 00000000..6cdf45b5
--- /dev/null
+++ b/recipes-kernel/cryptodev/files/fix-build-for-Linux-6.7-rc1.patch
@@ -0,0 +1,37 @@
1From 5e7121e45ff283d30097da381fd7e97c4bb61364 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
3Date: Sun, 10 Dec 2023 13:57:55 +0000
4Subject: [PATCH] Fix build for Linux 6.7-rc1
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Since Linux 6.7-rc1, no ahash algorithms set a nonzero alignmask,
10and therefore `crypto_ahash_alignmask` has been removed.
11
12See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f8660c82b79af595b056f6b9f4f227edeb88574
13 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c626910f3f1bbce6ad18bc613d895d2a089ed95e
14
15Upstream-Status: Backport [https://github.com/cryptodev-linux/cryptodev-linux/commit/5e7121e45ff283d30097da381fd7e97c4bb61364]
16
17Signed-off-by: Joan Bruguera Micó <joanbrugueram@gmail.com>
18---
19 cryptlib.c | 4 ++++
20 1 file changed, 4 insertions(+)
21
22diff --git a/cryptlib.c b/cryptlib.c
23index 4d739e5..0e59d4c 100644
24--- a/cryptlib.c
25+++ b/cryptlib.c
26@@ -381,7 +381,11 @@ int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name,
27 }
28
29 hdata->digestsize = crypto_ahash_digestsize(hdata->async.s);
30+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0))
31 hdata->alignmask = crypto_ahash_alignmask(hdata->async.s);
32+#else
33+ hdata->alignmask = 0;
34+#endif
35
36 init_completion(&hdata->async.result.completion);
37 \ No newline at end of file