On 02/22/2018 06:50 AM, Herbert Xu wrote:
>
> I think this conflicts with Dave Watson's work. Could you rebase
> this on top of his patches?
>
> Thanks,
>
Hi Herbert,
I'll try to send a new version rebased on top of Dave's patches, but it might
be some time before I can get to it. I guess it
[Resending after delivery failure]
Hi Dave,
On 02/13/2018 10:22 AM, Dave Watson wrote:
>
> Yes, these both sound reasonable. I will send a V2.
>
> Thanks!
Another minor suggestion for v2:
It might be a good idea to check if the first assoclen bytes are already
contiguous and only do the kmall
Hi Dave,
On 02/12/2018 11:51 AM, Dave Watson wrote:
> +static int gcmaes_encrypt_sg(struct aead_request *req, unsigned int assoclen,
> + u8 *hash_subkey, u8 *iv, void *aes_ctx)
>
> +static int gcmaes_decrypt_sg(struct aead_request *req, unsigned int assoclen,
> +
object for simplicity.
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_glue.c | 36 +++-
1 file changed, 15 insertions(+), 21 deletions(-)
diff --git a/arch/x86/crypto/aesni-intel_glue.c
b/arch/x86/crypto/aesni-intel_glue.c
index c11e531d21dd
Enable the use of zero-copy even if the AAD and/or Auth Tag are in different
buffers than the actual data, as long as each of them individually satisfies
the zero-copy conditions (i.e. the entire buffer is either in low-mem or
within a single high-mem page).
Signed-off-by: Junaid Shahid
enables the use of zero-copy even if only one of src and dest satisfies
these conditions rather than only when both of them do.
Junaid Shahid (4):
crypto: aesni - Fix out-of-bounds access of the AAD buffer in AVX
gcm-aesni
crypto: aesni - Enable one-sided zero copy for gcm(aes) request
that by reading the last <16 byte
block of the AAD byte-by-byte and optionally via an 8-byte load if the
block was at least 8 bytes.
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_avx-x86_64.S | 154 +--
1 file changed, 42 insertions(+), 112 deletions(
. This optimization is now extended to avoid the
copy on the side that does satisfy the zero-copy conditions.
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_glue.c | 256 +++--
1 file changed, 134 insertions(+), 122 deletions(-)
diff --git a/arch/x86
Hi Steffen,
On Wed, Jan 31, 2018 at 12:13 AM, Steffen Klassert
wrote:
>
> I wonder which special usecase you have in mind that will be improved
> by your patches.
>
This is not related to IPsec. We have an internal use case where the
data buffer itself is a single memory page but the authenticat
Hi Stephan,
Sure, I'll rebase and send another revision.
Thanks,
Junaid
object for simplicity.
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_glue.c | 36 +++-
1 file changed, 15 insertions(+), 21 deletions(-)
diff --git a/arch/x86/crypto/aesni-intel_glue.c
b/arch/x86/crypto/aesni-intel_glue.c
index aef6c82b9ca7
Enable the use of zero-copy even if the AAD and/or Auth Tag are in different
buffers than the actual data, as long as each of them individually satisfies
the zero-copy conditions (i.e. the entire buffer is either in low-mem or
within a single high-mem page).
Signed-off-by: Junaid Shahid
. This optimization is now extended to avoid the
copy on the side that does satisfy the zero-copy conditions.
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_glue.c | 256 +++--
1 file changed, 134 insertions(+), 122 deletions(-)
diff --git a/arch/x86
that by reading the last <16 byte
block of the AAD byte-by-byte and optionally via an 8-byte load if the
block was at least 8 bytes.
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_avx-x86_64.S | 154 +--
1 file changed, 42 insertions(+), 112 deletions(
dest satisfies
these conditions rather than only when both of them do.
Junaid Shahid (4):
crypto: aesni - Fix out-of-bounds access of the AAD buffer in AVX
gcm-aesni
crypto: aesni - Enable one-sided zero copy for gcm(aes) request
buffers
crypto: aesni - Directly use kmap_atomic instead
.
Junaid Shahid (4):
crypto: aesni - Fix out-of-bounds access of the AAD buffer in AVX
gcm-aesni
crypto: aesni - Enable one-sided zero copy for gcm(aes) request
buffers
crypto: aesni - Directly use kmap_atomic instead of scatter_walk
object in gcm(aes)
crypto: aesni - Use zero-copy for
. This optimization is now extended to avoid the
copy on the side that does satisfy the zero-copy conditions.
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_glue.c | 256 +++--
1 file changed, 134 insertions(+), 122 deletions(-)
diff --git a/arch/x86
that by reading the last <16 byte
block of the AAD byte-by-byte and optionally via an 8-byte load if the
block was at least 8 bytes.
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_avx-x86_64.S | 154 +--
1 file changed, 42 insertions(+), 112 deletions(
object for simplicity.
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_glue.c | 36 +++-
1 file changed, 15 insertions(+), 21 deletions(-)
diff --git a/arch/x86/crypto/aesni-intel_glue.c
b/arch/x86/crypto/aesni-intel_glue.c
index a46eb2d25f71
Enable the use of zero-copy even if the AAD and/or Auth Tag are in different
buffers than the actual data, as long as each of them individually satisfies
the zero-copy conditions (i.e. the entire buffer is either in low-mem or
within a single high-mem page).
Signed-off-by: Junaid Shahid
On Wednesday, December 20, 2017 5:08:37 PM PST Junaid Shahid wrote:
> +.macro READ_PARTIAL_BLOCK DPTR DLEN XMM1 XMMDst
> +cmp $8, \DLEN
> +jl _read_lt8_\@
> +mov (\DPTR), %rax
> +MOVQ_R64_XMM %rax, \XMMDst
Just noticed that these two can b
n-AVX AES-GCM work with any aadlen")
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_asm.S | 112 --
1 file changed, 12 insertions(+), 100 deletions(-)
diff --git a/arch/x86/crypto/aesni-intel_asm.S
b/arch/x86/crypto/aesni-intel_asm.S
machine to crash. This patch fixes that by reading the
partial block byte-by-byte and optionally an via 8-byte load if the block
was at least 8 bytes.
Fixes: 0487ccac ("crypto: aesni - make non-AVX AES-GCM work with any aadlen")
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_
, that is no longer the case with
the generic-gcm-aesni mode. This could potentially result in accessing pages
that are not mapped, thus causing a crash.
Junaid Shahid (2):
crypto: Fix out-of-bounds access of the data buffer in
generic-gcm-aesni
crypto: Fix out-of-bounds access of the AAD
On Wednesday, December 20, 2017 1:12:54 PM PST Eric Biggers wrote:
> >
> > We do need both registers, though we could certainly swap their usage to
> > make
> > r12 the temp register. The reason we need the second register is because we
> > need to keep the original length to perform the pshufb a
On Wednesday, December 20, 2017 12:42:10 AM PST Eric Biggers wrote:
> > -_get_AAD_rest0\num_initial_blocks\operation:
> > - /* finalize: shift out the extra bytes we read, and align
> > - left. since pslldq can only shift by an immediate, we use
> > - vpshufb and an array of shuffle masks */
On Wednesday, December 20, 2017 12:36:16 AM PST Eric Biggers wrote:
>
> Did you run the self-tests (boot with CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
> unset)? The second patch causes them to start failing:
>
> [1.169640] alg: aead: Test 7 failed on encryption for rfc4106-gcm-aesni
> [1.1783
machine to crash. This patch fixes that by reading the
partial block byte-by-byte and optionally an via 8-byte load if the block
was at least 8 bytes.
Fixes: 0487ccac ("crypto: aesni - make non-AVX AES-GCM work with any aadlen")
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_
n-AVX AES-GCM work with any aadlen")
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_asm.S | 80 +--
1 file changed, 10 insertions(+), 70 deletions(-)
diff --git a/arch/x86/crypto/aesni-intel_asm.S
b/arch/x86/crypto/aesni-intel_asm.S
pages
that are not mapped, thus causing a crash.
Junaid Shahid (2):
crypto: Fix out-of-bounds access of the data buffer in
generic-gcm-aesni
crypto: Fix out-of-bounds access of the AAD buffer in
generic-gcm-aesni
arch/x86/crypto/aesni-intel_asm.S | 166
an 8-byte load if the block was at least 8 bytes.
Fixes: 0487ccac ("crypto: aesni - make non-AVX AES-GCM work with any aadlen")
Signed-off-by: Junaid Shahid
---
arch/x86/crypto/aesni-intel_asm.S | 85 ---
1 file changed, 43 insertions(+), 42 deletions(-
31 matches
Mail list logo