patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: <alok.makhariya@nxp.com>, <dev@dpdk.org>
Cc: <pablo.de.lara.guarch@intel.com>, <hemant.agrawal@nxp.com>,
	<stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH v2] crypto/dpaa2_sec: add check for segmented buffer
Date: Fri, 13 Oct 2017 21:14:58 +0530	[thread overview]
Message-ID: <e07a8838-d440-ac41-58e7-bb0e69178a1c@nxp.com> (raw)
In-Reply-To: <20171013153854.8444-1-alok.makhariya@nxp.com>

On 10/13/2017 9:08 PM, alok.makhariya@nxp.com wrote:
> From: Alok Makhariya <alok.makhariya@nxp.com>
> 
> The code would crash for segmented buffer if no check.
> 
> Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
> ---
>   drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> index 672cacf..b33081c 100644
> --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> @@ -551,7 +551,13 @@ build_sec_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
>   	int ret = -1;
>   
>   	PMD_INIT_FUNC_TRACE();
> -
> +	/*
> +	 * Segmented buffer is not supported.
> +	 */
> +	if (!rte_pktmbuf_is_contiguous(op->sym->m_src)) {
> +		op->status = RTE_CRYPTO_OP_STATUS_ERROR;
> +		return -ENOTSUP;
> +	}
>   	switch (sess->ctxt_type) {
>   	case DPAA2_SEC_CIPHER:
>   		ret = build_cipher_fd(sess, op, fd, bpid);
> 
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

  reply	other threads:[~2017-10-13 15:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171012130726.4332-1-alok.makhariya@nxp.com>
2017-10-12 13:07 ` [dpdk-stable] [PATCH] " alok.makhariya
2017-10-13 15:38   ` [dpdk-stable] [PATCH v2] " alok.makhariya
2017-10-13 15:44     ` Akhil Goyal [this message]
2017-10-16 14:06       ` De Lara Guarch, Pablo
2017-10-12 13:07 ` [dpdk-stable] [PATCH] crypto/dpaa2_sec: remove memset of icv on decryption side alok.makhariya
2017-10-13 14:24   ` Akhil Goyal
2017-10-16 11:21     ` 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=e07a8838-d440-ac41-58e7-bb0e69178a1c@nxp.com \
    --to=akhil.goyal@nxp.com \
    --cc=alok.makhariya@nxp.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=pablo.de.lara.guarch@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).