DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Iremonger, Bernard" <bernard.iremonger@intel.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Trahe, Fiona" <fiona.trahe@intel.com>,
	"akhil.goyal@nxp.com" <akhil.goyal@nxp.com>
Subject: Re: [dpdk-dev] [PATCH] crypto/qat: fix segmentation fault in QAT PMD
Date: Mon, 8 Apr 2019 12:31:01 +0000	[thread overview]
Message-ID: <8CEF83825BEC744B83065625E567D7C260D854FB@IRSMSX108.ger.corp.intel.com> (raw)
Message-ID: <20190408123101.6oATxpX5tWm15WxmNW51A_OGCrOKJ9vakwPFsrHN0xM@z> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB9772580148A9449B@irsmsx105.ger.corp.intel.com>

Hi Konstantin,

<snip>
> Subject: RE: [PATCH] crypto/qat: fix segmentation fault in QAT PMD
> 
> Hi Bernard,
> 
> >
> > While running the IPsec unit test program the following segmentation
> > fault is occurring:
> >
> > Thread 1 "test" received signal SIGSEGV, Segmentation fault.
> > 0x0000000000beaece in qat_sym_build_request(in_op=0x0,
> > out_msg=0x100450580 "", op_cookie=0x101c6fd80,
> qat_dev_gen=QAT_GEN1)
> > at /root/dpdk_ipsec_master-1/drivers/crypto/qat/qat_sym.c:165
> > 165  if (unlikely(op->type != RTE_CRYPTO_OP_TYPE_SYMMETRIC)) {
> >
> > Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
> > oriented")
> > Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> > ---
> >  drivers/crypto/qat/qat_sym.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/crypto/qat/qat_sym.c
> > b/drivers/crypto/qat/qat_sym.c index 8801ca5..4a7d11e 100644
> > --- a/drivers/crypto/qat/qat_sym.c
> > +++ b/drivers/crypto/qat/qat_sym.c
> > @@ -162,6 +162,12 @@ qat_sym_build_request(void *in_op, uint8_t
> *out_msg,
> >  	struct qat_sym_op_cookie *cookie =
> >  				(struct qat_sym_op_cookie *)op_cookie;
> >
> > +	if (op == NULL) {
> > +		QAT_DP_LOG(ERR, "QAT PMD only supports symmetric crypto "
> > +				"operation requests, op (%p) is NULL", op);
> > +		return -EINVAL;
> > +	}
> > +
> >  	if (unlikely(op->type != RTE_CRYPTO_OP_TYPE_SYMMETRIC)) {
> >  		QAT_DP_LOG(ERR, "QAT PMD only supports symmetric crypto "
> >  				"operation requests, op (%p) is not a "
> 
> This is crypto-dev enqueue data-path, if I am not mistaken.
> I think in that case it is caller responsibility to make sure that ops[] contain valid
> crypto-ops (as in majority of other data-path functions).
> Suppose the main question here - why ipsec UT passes NULL as crypto-op here?
> Konstantin

I will investigate further.

Regards,

Bernard.



  parent reply	other threads:[~2019-04-08 12:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 10:48 Bernard Iremonger
2019-04-08 10:48 ` Bernard Iremonger
2019-04-08 12:09 ` Ananyev, Konstantin
2019-04-08 12:09   ` Ananyev, Konstantin
2019-04-08 12:31   ` Iremonger, Bernard [this message]
2019-04-08 12:31     ` Iremonger, Bernard
2019-04-08 16:29   ` Trahe, Fiona
2019-04-08 16:29     ` Trahe, Fiona
2019-04-10 16:21     ` Iremonger, Bernard
2019-04-10 16:21       ` Iremonger, Bernard

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=8CEF83825BEC744B83065625E567D7C260D854FB@IRSMSX108.ger.corp.intel.com \
    --to=bernard.iremonger@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=konstantin.ananyev@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).