From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id DF249A0096 for ; Mon, 8 Apr 2019 14:31:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA8214F9C; Mon, 8 Apr 2019 14:31:05 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 390404F9B for ; Mon, 8 Apr 2019 14:31:04 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2019 05:31:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,325,1549958400"; d="scan'208";a="147471256" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by FMSMGA003.fm.intel.com with ESMTP; 08 Apr 2019 05:31:02 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.82]) by irsmsx110.ger.corp.intel.com ([169.254.15.173]) with mapi id 14.03.0415.000; Mon, 8 Apr 2019 13:31:01 +0100 From: "Iremonger, Bernard" To: "Ananyev, Konstantin" , "dev@dpdk.org" , "Trahe, Fiona" , "akhil.goyal@nxp.com" Thread-Topic: [PATCH] crypto/qat: fix segmentation fault in QAT PMD Thread-Index: AQHU7fi6dhdBMB+dvU20WYYq7PRToqYyGyWAgAAWSzA= Date: Mon, 8 Apr 2019 12:31:01 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C260D854FB@IRSMSX108.ger.corp.intel.com> References: <1554720537-14959-1-git-send-email-bernard.iremonger@intel.com> <2601191342CEEE43887BDE71AB9772580148A9449B@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772580148A9449B@irsmsx105.ger.corp.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWVjMGU5ZjEtN2RlYy00MmJhLWE0ZWQtOTg2YzRjMDEyNDg5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZjZTY2FzSXFPM2dFQXZlY2pHT1wvZldWOHFnVzJmNzV5VmxYXC8wdDgxXC9zZFVqTEFrQ0dQXC85ZjVqOTFoMVJuTHMifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] crypto/qat: fix segmentation fault in QAT PMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190408123101.6oATxpX5tWm15WxmNW51A_OGCrOKJ9vakwPFsrHN0xM@z> Hi Konstantin, > Subject: RE: [PATCH] crypto/qat: fix segmentation fault in QAT PMD >=20 > Hi Bernard, >=20 > > > > 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=3D0x0, > > out_msg=3D0x100450580 "", op_cookie=3D0x101c6fd80, > qat_dev_gen=3DQAT_GEN1) > > at /root/dpdk_ipsec_master-1/drivers/crypto/qat/qat_sym.c:165 > > 165 if (unlikely(op->type !=3D RTE_CRYPTO_OP_TYPE_SYMMETRIC)) { > > > > Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op > > oriented") > > Signed-off-by: Bernard Iremonger > > --- > > 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 =3D > > (struct qat_sym_op_cookie *)op_cookie; > > > > + if (op =3D=3D NULL) { > > + QAT_DP_LOG(ERR, "QAT PMD only supports symmetric crypto " > > + "operation requests, op (%p) is NULL", op); > > + return -EINVAL; > > + } > > + > > if (unlikely(op->type !=3D RTE_CRYPTO_OP_TYPE_SYMMETRIC)) { > > QAT_DP_LOG(ERR, "QAT PMD only supports symmetric crypto " > > "operation requests, op (%p) is not a " >=20 > 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 he= re? > Konstantin I will investigate further. Regards, Bernard.