All of lore.kernel.org
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>
Cc: "Trahe, Fiona" <fiona.trahe@intel.com>,
	"Griffin, John" <john.griffin@intel.com>,
	"Jain, Deepak K" <deepak.k.jain@intel.com>,
	"Doherty, Declan" <declan.doherty@intel.com>
Subject: Re: [PATCH v2 1/3] crypto/aesni_gcm: fix J0 padding bytes for GCM
Date: Fri, 6 Jan 2017 10:27:06 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D897476BF3DF@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1482481493-4369-2-git-send-email-arkadiuszx.kusztal@intel.com>

CC'ing stable mailing list.

> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Friday, December 23, 2016 8:25 AM
> To: dev@dpdk.org
> Cc: Trahe, Fiona; De Lara Guarch, Pablo; Griffin, John; Jain, Deepak K;
> Doherty, Declan; Kusztal, ArkadiuszX
> Subject: [PATCH v2 1/3] crypto/aesni_gcm: fix J0 padding bytes for GCM
> 
> This commit fixes pre-counter block (J0) padding by clearing
> four most significant bytes before setting initial counter value.
> 
> Fixes: b2bb3597470c ("crypto/aesni_gcm: move pre-counter block to
> driver")
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> index dba5e15..af3d60f 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> @@ -40,6 +40,7 @@
>  #include <rte_vdev.h>
>  #include <rte_malloc.h>
>  #include <rte_cpuflags.h>
> +#include <rte_byteorder.h>
> 
>  #include "aesni_gcm_pmd_private.h"
> 
> @@ -241,7 +242,8 @@ process_gcm_crypto_op(struct aesni_gcm_qp *qp,
> struct rte_crypto_sym_op *op,
>  	 * to set BE LSB to 1, driver expects that 16B is allocated
>  	 */
>  	if (op->cipher.iv.length == 12) {
> -		op->cipher.iv.data[15] = 1;
> +		uint32_t *iv_padd = (uint32_t *)&op->cipher.iv.data[12];
> +		*iv_padd = rte_bswap32(1);
>  	}
> 
>  	if (op->auth.aad.length != 12 && op->auth.aad.length != 8 &&
> --
> 2.1.0

  parent reply	other threads:[~2017-01-06 10:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23  8:24 [PATCH v2 0/3] Fix iv sizes in crypto drivers capabilities Arek Kusztal
2016-12-23  8:24 ` [PATCH v2 1/3] crypto/aesni_gcm: fix J0 padding bytes for GCM Arek Kusztal
2016-12-29 13:08   ` Azarewicz, PiotrX T
2017-01-02  8:50     ` Azarewicz, PiotrX T
2017-01-06 10:17       ` De Lara Guarch, Pablo
2017-01-06 10:27   ` De Lara Guarch, Pablo [this message]
2016-12-23  8:24 ` [PATCH v2 2/3] crypto/aesni_gcm: fix iv size in PMD capabilities Arek Kusztal
2016-12-29 13:17   ` Azarewicz, PiotrX T
2017-01-02  9:08     ` Azarewicz, PiotrX T
2017-01-06 10:31   ` De Lara Guarch, Pablo
2016-12-23  8:24 ` [PATCH v2 3/3] crypto/qat: " Arek Kusztal
2016-12-23 11:03   ` Trahe, Fiona
2017-01-06 10:31   ` De Lara Guarch, Pablo
2017-01-06 10:35 ` [PATCH v2 0/3] Fix iv sizes in crypto drivers capabilities De Lara Guarch, Pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E115CCD9D858EF4F90C690B0DCB4D897476BF3DF@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=john.griffin@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.