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 DDE7FA05FE for ; Tue, 19 Mar 2019 05:38:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2A1C21DBD; Tue, 19 Mar 2019 05:38:19 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 0A3821B19 for ; Tue, 19 Mar 2019 05:38:16 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2J4a3A2016603; Mon, 18 Mar 2019 21:38:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=9u3yfMA5+L+sNPsIaksMnE8E/AS02VhFGBNHgIsBUZg=; b=w4Yujh6aT4lbfIvA0/ps9eM3UfIfTVSECN9oXyhQINC2EhFTi1+8a4HuW9+uypjaBokm S+MqW31FXFWiqWNv7sJ/GxsvMyCBIR3vzlZw6OiTucRrw+MSmgwDlsSid0deuw9VFtz1 DSNodlQXUW/qoDvfxKXhYRs3u2a5I9ckl0NSguRtG/AUmBqUlnzvJTqRI6ZX07XqUwoi 3oeOuIQFdbTRdA9GR9smEGmewTgexvkBo9b5x22Dr0MzmFBXi6EN9k6UoDiKzxbyD4tE HuHSfu4IthwLZ4VlsGIfsRsMElb7830u2kap8jjVVzbV/6Odq78DaPpZVRV+pACT+2u/ gQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2rana2s1p2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 18 Mar 2019 21:38:16 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 18 Mar 2019 21:38:05 -0700 Received: from NAM05-BY2-obe.outbound.protection.outlook.com (104.47.50.51) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 18 Mar 2019 21:38:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9u3yfMA5+L+sNPsIaksMnE8E/AS02VhFGBNHgIsBUZg=; b=F+QT3RzrTcKAIpMHKqwy0qvwf1EyL0flW4qN0CYTrivqlq9PkrXmHz6/2Hs5/H0J6cKUUjDjWcTLeb2qdvs12EkL9fs3ejcsXgxHyAnaTJyV6DZFWflpivrEt1FGDEjJwnPVG+zZsh8fySkkUbTWKQDtz0lnO+5HoM9inQBSCvA= Received: from MN2PR18MB2877.namprd18.prod.outlook.com (20.179.20.218) by MN2PR18MB2560.namprd18.prod.outlook.com (20.179.83.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.15; Tue, 19 Mar 2019 04:38:03 +0000 Received: from MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::1905:8cf6:f4a1:5d9a]) by MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::1905:8cf6:f4a1:5d9a%4]) with mapi id 15.20.1709.015; Tue, 19 Mar 2019 04:38:03 +0000 From: Anoob Joseph To: Akhil Goyal , "Doherty, Declan" , "De Lara Guarch, Pablo" CC: Ankur Dwivedi , "Trahe, Fiona" , Jerin Jacob Kollanukkaran , Narayana Prasad Raju Athreya , Suheil Chandran , "dev@dpdk.org" Thread-Topic: [PATCH v2] lib/cryptodev: fix driver name comparison Thread-Index: AQHU188QzNfa5uFkwUeHDLSJ/oWkIqYGPlmAgAwszBA= Date: Tue, 19 Mar 2019 04:38:03 +0000 Message-ID: References: <1549279528-10397-1-git-send-email-anoobj@marvell.com> <1552283715-18723-1-git-send-email-anoobj@marvell.com> <348A99DA5F5B7549AA880327E580B43589711D42@IRSMSX101.ger.corp.intel.com> In-Reply-To: <348A99DA5F5B7549AA880327E580B43589711D42@IRSMSX101.ger.corp.intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 09002338-a30a-4b73-bcc9-08d6ac24acc9 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:MN2PR18MB2560; x-ms-traffictypediagnostic: MN2PR18MB2560: x-microsoft-antispam-prvs: x-forefront-prvs: 0981815F2F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(396003)(366004)(346002)(39860400002)(13464003)(189003)(199004)(186003)(55236004)(106356001)(71190400001)(6506007)(316002)(71200400001)(66066001)(110136005)(102836004)(52536014)(76176011)(26005)(6246003)(53546011)(54906003)(99286004)(25786009)(53936002)(7736002)(105586002)(55016002)(9686003)(6436002)(486006)(68736007)(86362001)(81156014)(8676002)(81166006)(2906002)(256004)(97736004)(14444005)(3846002)(74316002)(305945005)(7696005)(11346002)(478600001)(8936002)(476003)(14454004)(6116002)(4326008)(5660300002)(229853002)(446003)(33656002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2560; H:MN2PR18MB2877.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: M4ku6u5v+3+MBRpuZhlVYXZWyUlKwPAPcgtH+VZkceAJlRdrQVEtpkKbT4VKz57qqjuMmizK/NXiGwaACVIpXOR+jkR26ZA7vwF6uRoD9U++SHhojFJzozG3Ic69ALcZK2UxqSAHeZhaVMafJQ2RFRcHEQ2eiqUDKFDrwm5tZBy6EMiLRW7QO/+/+2jRWWduqAba3Hbjp805um8ujexzfpvOOZz7X0yGv2q8R302j4uADROjXJTD5/3bEdLcsEu37vyumd2auTfvMamrJ4WXDa0DltgBhrfaCFtee5tnEFl27jBAVsbwn9MQwlwr3++asnAzt2zOr+i+zcUX8LCLmbkKjc/NG01hFnPI61Rpt6iSbaDsf6cYuI6qIA2Ycd35LuWc8MBTy8tAPGpnNP2Qi8VaNkabrvx2U1qUAFNR4U4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 09002338-a30a-4b73-bcc9-08d6ac24acc9 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2019 04:38:03.5094 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2560 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-19_02:, , signatures=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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190319043803.cbCLP8Xlpz20bjhx7r2pmUS_vNLt93rw_uZF-tPk8zo@z> Hi Akhil, Declan, Pablo, Can you review this patch and share your thoughts? Thanks, Anoob > -----Original Message----- > From: Trahe, Fiona > Sent: Monday, March 11, 2019 4:11 PM > 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 > Subject: RE: [PATCH v2] lib/cryptodev: fix driver name comparison >=20 >=20 >=20 > > -----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 > > > > 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). > > > > Following is such a naming which could result in false positive. > > 1. crypto_driver > > 2. crypto_driver1 > > > > When strncmp with len =3D strlen("crypto_driver") is done, it could giv= e > > 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. > > > > Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for > > crypto devices") > > > > Signed-off-by: Ankur Dwivedi > > Signed-off-by: Anoob Joseph > Acked-by: Fiona Trahe