summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/cryptodev/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/cryptodev/files')
-rw-r--r--meta/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.8-rc1.patch49
-rw-r--r--meta/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.9-rc1.patch42
-rw-r--r--meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch32
3 files changed, 123 insertions, 0 deletions
diff --git a/meta/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.8-rc1.patch b/meta/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.8-rc1.patch
new file mode 100644
index 0000000000..02c721a4f3
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.8-rc1.patch
@@ -0,0 +1,49 @@
1From 9e765068582aae3696520346a7500322ca6cc2de Mon Sep 17 00:00:00 2001
2From: Joan Bruguera <joanbrugueram@gmail.com>
3Date: Sat, 13 Jun 2020 19:46:44 +0200
4Subject: [PATCH] Fix build for Linux 5.8-rc1
5
6See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9740ca4e95b43b91a4a848694a20d01ba6818f7b
7 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=da1c55f1b272f4bd54671d459b39ea7b54944ef9
8 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d8ed45c5dcd455fc5848d47f86883a1b872ac0d0
9
10Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
11
12Upstream-Status: Backport [9e765068582aae3696520346a7500322ca6cc2de]
13
14Signed-off-by: He Zhe <zhe.he@windriver.com>
15---
16 zc.c | 8 ++++++++
17 1 file changed, 8 insertions(+)
18
19diff --git a/zc.c b/zc.c
20index ae464ff..2c286bb 100644
21--- a/zc.c
22+++ b/zc.c
23@@ -58,7 +58,11 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
24 return 0;
25 }
26
27+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
28 down_read(&mm->mmap_sem);
29+#else
30+ mmap_read_lock(mm);
31+#endif
32 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0))
33 ret = get_user_pages(task, mm,
34 (unsigned long)addr, pgcount, write, 0, pg, NULL);
35@@ -74,7 +78,11 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
36 (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
37 pg, NULL, NULL);
38 #endif
39+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
40 up_read(&mm->mmap_sem);
41+#else
42+ mmap_read_unlock(mm);
43+#endif
44 if (ret != pgcount)
45 return -EINVAL;
46
47--
482.17.1
49
diff --git a/meta/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.9-rc1.patch b/meta/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.9-rc1.patch
new file mode 100644
index 0000000000..cf1c04df9e
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/0001-Fix-build-for-Linux-5.9-rc1.patch
@@ -0,0 +1,42 @@
1From 2f5e08aebf9229599aae7f25db752f74221cd71d Mon Sep 17 00:00:00 2001
2From: Joan Bruguera <joanbrugueram@gmail.com>
3Date: Fri, 14 Aug 2020 00:13:38 +0200
4Subject: [PATCH] Fix build for Linux 5.9-rc1
5
6See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64019a2e467a288a16b65ab55ddcbf58c1b00187
7 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bce617edecada007aee8610fbe2c14d10b8de2f6
8 https://lore.kernel.org/lkml/CAHk-=wj_V2Tps2QrMn20_W0OJF9xqNh52XSGA42s-ZJ8Y+GyKw@mail.gmail.com/
9
10Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
11
12Upstream-Status: Backport [https://github.com/cryptodev-linux/cryptodev-linux/commit/2f5e08aebf9229599aae7f25db752f74221cd71d]
13
14Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
15
16---
17 zc.c | 6 +++++-
18 1 file changed, 5 insertions(+), 1 deletion(-)
19
20diff --git a/zc.c b/zc.c
21index a560db5..fdf7da1 100644
22--- a/zc.c
23+++ b/zc.c
24@@ -76,10 +76,14 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
25 ret = get_user_pages_remote(task, mm,
26 (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
27 pg, NULL);
28-#else
29+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0))
30 ret = get_user_pages_remote(task, mm,
31 (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
32 pg, NULL, NULL);
33+#else
34+ ret = get_user_pages_remote(mm,
35+ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
36+ pg, NULL, NULL);
37 #endif
38 #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
39 up_read(&mm->mmap_sem);
40--
412.17.1
42
diff --git a/meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch b/meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch
new file mode 100644
index 0000000000..3ae77cb9d6
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/fix-build-for-Linux-5.11-rc1.patch
@@ -0,0 +1,32 @@
1From 55c6315058fc0dd189ffd116f2cc27ba4fa84cb6 Mon Sep 17 00:00:00 2001
2From: Joan Bruguera <joanbrugueram@gmail.com>
3Date: Mon, 28 Dec 2020 01:41:31 +0100
4Subject: [PATCH] Fix build for Linux 5.11-rc1
5
6ksys_close was removed, as far as I can tell, close_fd replaces it.
7
8See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8760c909f54a82aaa6e76da19afe798a0c77c3c3
9 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1572bfdf21d4d50e51941498ffe0b56c2289f783
10
11Upstream-Status: Backport [https://github.com/cryptodev-linux/cryptodev-linux/commit/55c6315058fc0dd189ffd116f2cc27ba4fa84cb6]
12Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
13---
14 ioctl.c | 4 +++-
15 1 file changed, 3 insertions(+), 1 deletion(-)
16
17diff --git a/ioctl.c b/ioctl.c
18index 3d332380..95481d4f 100644
19--- a/ioctl.c
20+++ b/ioctl.c
21@@ -871,8 +871,10 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_)
22 if (unlikely(ret)) {
23 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0))
24 sys_close(fd);
25-#else
26+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
27 ksys_close(fd);
28+#else
29+ close_fd(fd);
30 #endif
31 return ret;
32 }