DPDK patches and discussions
 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>
Subject: Re: [dpdk-dev] [PATCH] crypto/dpaa_sec: add check for segmented buffer
Date: Fri, 13 Oct 2017 20:13:36 +0530	[thread overview]
Message-ID: <f57bd7f8-f875-f2a6-9022-7acac6ec95eb@nxp.com> (raw)
In-Reply-To: <20171012130726.4332-1-alok.makhariya@nxp.com>

On 10/12/2017 6:37 PM, alok.makhariya@nxp.com wrote:
> From: Alok Makhariya <alok.makhariya@nxp.com>
> 
> The code would crash in case of segmented buffer if no check
> 
> Fixes: 89aaf708d44b ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
> 
> Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
> ---
>   drivers/crypto/dpaa_sec/dpaa_sec.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
> index 7b9a683..8a57b96 100644
> --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
> +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
> @@ -893,6 +893,13 @@ dpaa_sec_enqueue_op(struct rte_crypto_op *op,  struct dpaa_sec_qp *qp)
>   			return ret;
>   	}
>   
> +	/*
> +	 * Segmented buffer is not supported.
> +	 */
> +        if (!rte_pktmbuf_is_contiguous(op->sym->m_src)) {
> +                op->status = RTE_CRYPTO_OP_STATUS_ERROR;
> +                return -ENOTSUP;
> +        }
>   	if (is_auth_only(ses)) {
>   		cf = build_auth_only(op, ses);
>   	} else if (is_cipher_only(ses)) {
> 
It looks there are some checkpatch errors.

  parent reply	other threads:[~2017-10-13 14:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 13:07 alok.makhariya
2017-10-12 13:07 ` [dpdk-dev] [PATCH] crypto/dpaa2_sec: " alok.makhariya
2017-10-13 15:38   ` [dpdk-dev] [PATCH v2] " alok.makhariya
2017-10-13 15:44     ` Akhil Goyal
2017-10-16 14:06       ` De Lara Guarch, Pablo
2017-10-12 13:07 ` [dpdk-dev] [PATCH] crypto/dpaa_sec: remove memset of icv on decryption side alok.makhariya
2017-10-13 14:22   ` Akhil Goyal
2017-10-16 11:21     ` De Lara Guarch, Pablo
2017-10-12 13:07 ` [dpdk-dev] [PATCH] crypto/dpaa2_sec: " alok.makhariya
2017-10-13 14:24   ` Akhil Goyal
2017-10-16 11:21     ` De Lara Guarch, Pablo
2017-10-12 13:07 ` [dpdk-dev] [PATCH] crypto/dpaa2_sec: add support for out of place buffers alok.makhariya
2017-10-13 14:25   ` Akhil Goyal
2017-10-16 11:32     ` De Lara Guarch, Pablo
2017-10-16 14:29       ` De Lara Guarch, Pablo
2017-10-22 19:35   ` [dpdk-dev] [PATCH v2 1/2] " alok.makhariya
2017-10-22 19:35     ` [dpdk-dev] [PATCH v2 2/2] crypto/dpaa_sec: " alok.makhariya
2017-10-23  8:36     ` [dpdk-dev] [PATCH v2 1/2] crypto/dpaa2_sec: " De Lara Guarch, Pablo
2017-10-12 13:07 ` [dpdk-dev] [PATCH] crypto/dpaa_sec: " alok.makhariya
2017-10-13 14:25   ` Akhil Goyal
2017-10-16 11:33     ` De Lara Guarch, Pablo
2017-10-13 14:43 ` Akhil Goyal [this message]
2017-10-13 15:37 ` [dpdk-dev] [PATCH v2] crypto/dpaa_sec: add check for segmented buffer alok.makhariya
2017-10-13 15:45   ` Akhil Goyal
2017-10-16 14:07     ` 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=f57bd7f8-f875-f2a6-9022-7acac6ec95eb@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 \
    /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).