From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id D8E24378B for ; Mon, 11 Mar 2019 11:41:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Mar 2019 03:41:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,467,1544515200"; d="scan'208";a="139749386" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by FMSMGA003.fm.intel.com with ESMTP; 11 Mar 2019 03:41:31 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.230]) by IRSMSX106.ger.corp.intel.com ([169.254.8.205]) with mapi id 14.03.0415.000; Mon, 11 Mar 2019 10:41:30 +0000 From: "Trahe, Fiona" To: Anoob Joseph , Akhil Goyal , "Doherty, Declan" , "De Lara Guarch, Pablo" CC: Ankur Dwivedi , Jerin Jacob Kollanukkaran , Narayana Prasad Raju Athreya , Suheil Chandran , "dev@dpdk.org" Thread-Topic: [PATCH v2] lib/cryptodev: fix driver name comparison Thread-Index: AQHU188i0prqmUSr0E+X1mPWznt3t6YGPhEw Date: Mon, 11 Mar 2019 10:41:29 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B43589711D42@IRSMSX101.ger.corp.intel.com> References: <1549279528-10397-1-git-send-email-anoobj@marvell.com> <1552283715-18723-1-git-send-email-anoobj@marvell.com> In-Reply-To: <1552283715-18723-1-git-send-email-anoobj@marvell.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmJjYzkzY2QtMDRlZC00NGMzLWJkNWYtNDI1NmM3M2IxM2FlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoid2xrdU1XXC9kOTZ6bHFCSlwvanZqN2dDOUY5aTFWTURnTkFic1ZFOUdlejBQZjBTbFpKdXA0VFRDMFpcL2l3RVhpeCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] lib/cryptodev: fix driver name comparison 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: , X-List-Received-Date: Mon, 11 Mar 2019 10:41:34 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anoob Joseph > Sent: Monday, March 11, 2019 5:56 AM > To: Akhil Goyal ; Doherty, Declan ; De Lara Guarch, > Pablo > Cc: Anoob Joseph ; Ankur Dwivedi ; Jerin Jacob > Kollanukkaran ; Narayana Prasad Raju Athreya ; Suheil > Chandran ; dev@dpdk.org > Subject: [dpdk-dev] [PATCH v2] lib/cryptodev: fix driver name comparison >=20 > The string compare to the length of driver name might give false > positives when there are drivers with similar names (one being the > subset of another). >=20 > Following is such a naming which could result in false positive. > 1. crypto_driver > 2. crypto_driver1 >=20 > When strncmp with len =3D strlen("crypto_driver") is done, it could give > a false positive when compared against "crypto_driver1". For such cases, > 'strlen + 1' is done, so that the NULL termination also would be > considered for the comparison. >=20 > Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto d= evices") >=20 > Signed-off-by: Ankur Dwivedi > Signed-off-by: Anoob Joseph Acked-by: Fiona Trahe