summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/cryptodev/sdk_patches/0002-refactoring-relocate-code-to-simplify-later-patches.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0002-refactoring-relocate-code-to-simplify-later-patches.patch')
-rw-r--r--recipes-kernel/cryptodev/sdk_patches/0002-refactoring-relocate-code-to-simplify-later-patches.patch58
1 files changed, 0 insertions, 58 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0002-refactoring-relocate-code-to-simplify-later-patches.patch b/recipes-kernel/cryptodev/sdk_patches/0002-refactoring-relocate-code-to-simplify-later-patches.patch
deleted file mode 100644
index b948c914..00000000
--- a/recipes-kernel/cryptodev/sdk_patches/0002-refactoring-relocate-code-to-simplify-later-patches.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1From c2bf0e42b1d9fda60cde4a3a682784d349ef1c0b Mon Sep 17 00:00:00 2001
2From: Cristian Stoica <cristian.stoica@nxp.com>
3Date: Thu, 4 May 2017 15:06:21 +0300
4Subject: [PATCH 2/9] refactoring: relocate code to simplify later patches
5
6This code move will simplify the conversion to new AEAD interface in
7next patches
8
9Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
10---
11 authenc.c | 17 +++++++++--------
12 1 file changed, 9 insertions(+), 8 deletions(-)
13
14diff --git a/authenc.c b/authenc.c
15index 28eb0f9..95727b4 100644
16--- a/authenc.c
17+++ b/authenc.c
18@@ -711,11 +711,18 @@ static int crypto_auth_zc_aead(struct csession *ses_ptr, struct kernel_crypt_aut
19 return -ENOMEM;
20 }
21
22+ ret = get_userbuf(ses_ptr, caop->src, caop->len, caop->dst, kcaop->dst_len,
23+ kcaop->task, kcaop->mm, &src_sg, &dst_sg);
24+ if (unlikely(ret)) {
25+ derr(1, "get_userbuf(): Error getting user pages.");
26+ goto free_auth_buf;
27+ }
28+
29 if (caop->auth_src && caop->auth_len > 0) {
30 if (unlikely(copy_from_user(auth_buf, caop->auth_src, caop->auth_len))) {
31 derr(1, "unable to copy auth data from userspace.");
32 ret = -EFAULT;
33- goto free_auth_buf;
34+ goto free_pages;
35 }
36
37 sg_init_one(&tmp, auth_buf, caop->auth_len);
38@@ -724,16 +731,10 @@ static int crypto_auth_zc_aead(struct csession *ses_ptr, struct kernel_crypt_aut
39 auth_sg = NULL;
40 }
41
42- ret = get_userbuf(ses_ptr, caop->src, caop->len, caop->dst, kcaop->dst_len,
43- kcaop->task, kcaop->mm, &src_sg, &dst_sg);
44- if (unlikely(ret)) {
45- derr(1, "get_userbuf(): Error getting user pages.");
46- goto free_auth_buf;
47- }
48-
49 ret = auth_n_crypt(ses_ptr, kcaop, auth_sg, caop->auth_len,
50 src_sg, dst_sg, caop->len);
51
52+free_pages:
53 release_user_pages(ses_ptr);
54
55 free_auth_buf:
56--
572.7.4
58