From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0052.outbound.protection.outlook.com [104.47.37.52]) by dpdk.org (Postfix) with ESMTP id 02AFF1B8AF for ; Tue, 15 May 2018 12:04:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=iITqPKrKRoCR7VpkGLOPsvsk0Nfo84Bai1c5CvPIT6A=; b=VENCpiYvR+1TTN2/QpEAonlo0GSCmakyW+Y/6QnzHdOXxwuibno0z7gCCTJgXMGrq//fXl8vCODoFoc1lqkqDkU232DpWJBVSU44/NaYuZ/XLiAwNLWatZ+qPbMZp7BNKwlJza3O2VURQy0TUA9QbdBB7B40B3Gvm9ui9mW2jLA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin.caveonetworks.com (111.93.218.67) by SN2PR07MB2528.namprd07.prod.outlook.com (2603:10b6:804:7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Tue, 15 May 2018 10:04:00 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com, Jerin Jacob , Andy Green , Pablo de Lara Date: Tue, 15 May 2018 15:33:35 +0530 Message-Id: <20180515100335.13051-1-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR0101CA0002.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::12) To SN2PR07MB2528.namprd07.prod.outlook.com (2603:10b6:804:7::6) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:SN2PR07MB2528; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 3:5EcluwmWTKNULjFPbIgcQS/ZqvqilxNEd418TIIxv4QWoaF7HdeWTufmTpT8O5UMeJJczbR1ar0UY/r13I/iK/UTCZhXsgHYp56IFYlu7hhQ1MC0s4WDisf7I1hY9pt2gLPvMcNhJ+AFa7UakcKaFs4Ux9wi1i7nbzq1LRz4ijW10c0Vhe85SGqt3srbm8nQwGaKEzJSSj/ThTaSDYp4T1cdhts/ckHgzsH6NB4tOq6PD/o8X3WxMOrlkuBxMFGM; 25:PYWFI1E94k4nejeGZa5lDgEJAM4BwR6K7X/Q/uSHOp1KT5OD9cATQwFg36lnG+egur2QeJxNpABpbR/SXMLFCcqWVdV9oKub7fEqjbba6qEbO2aF6IKSM/3kiiyVDu3J0i4FrGITlMLDvXWju/LGoC62G+AtJND5uO6lGwBKArMy9RWsb7+8z3njULLe1/8btJQNz3WlYUuMsXmkexnI1+NBDFQJC8w2sBTfKhSPBs2ENgW5hYDKK0MCLYVDxHf4GXrUKlF+49X7PE3S8w9G0GXQOgbh8JcbYZeI1ftyGBBgq5aL1TVL9XiVP0uOBeJyXelPqnFKjtj94socGefwSA==; 31:e7urwy0QZT+XitGvbfiZOYOFoKxzP/bE7It1c5BR0NZ34wdYoC5Wm7RaD8Lh7LgUNAdT14lDJnvgjJUfipb0rS984gt66bsc8dav+/4llWwqdSqNUWM95k2F9jSVYuL0p7jAciBpJclMSKHh4Vfywlmuo3zMTQm8YeNmF7Upgui1NQ0tfpOUv/vTEWNQTFs6umQkcMtScz25/E2RDkwm634H9NHbtjsrMtlsiHppPYA= X-MS-TrafficTypeDiagnostic: SN2PR07MB2528: X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 20:yBKlEm0txeHzxPVozF5Rul0N5WRsEpVKeVeSLwc4SPT3Ri6bl/VfhIcoN7LgZcRf8Izk2rgnvW8WPU6V4Ulqo7BgXDbm+Fh8f0LgP6oysCLvJSKsy1OTsbKcTks69NaHxy71oAagbIyu1mFiu4IwaKThKmUamKX/7+kH2I3bDcR0aBZ4K6dMvaE+dlUhGtcAm9tK16/tDUNcx6X5Nwyr6SWzXiTygappe0H59OIJv60C6661GxBD3oI6sunGwcA2Y554d0jFaRXKX5SvyjEKLmn8iVtnl6POHBJ4Qvh1D1r1s/e8h7JrIlA/Lg8C0buk7K7w055gOlxby6QarUtd+g+frp84ZylxuwLMcZsRi/grBx3pDDiOvliP7xRfJO8IEkpI91vEc3lX/ThfkEp4osIplomE/qrLGqtX5zEVEEfhdmgxDdZ2niFE7BuSwENrJsYpREnJ1Uqq5r0AX8TztUzGavUnz0cLQ6rTo3L8nTOBU0RtumZ/Gyh7VewTiCOkEFP6mGdneOTVjpaDp/Ys3NbfIRVIOVr/Ks3vDTnbaP97jcNXBHY9+BJ36FPYxDWT1RN6tYZb68uDQkrla4754MqkJCysghsfh6PirhUbINQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:SN2PR07MB2528; BCL:0; PCL:0; RULEID:; SRVR:SN2PR07MB2528; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 4:OJIbj/89Ax0pcc7YmbNXNTgVX0dJXrBMJChV2h7UR1HWnTI9HbCh+sFHWcveDs4hGbKaoDiNMoyvUfRlU8l9kkAViJZDlDvgOCawvRiBUi6grWIuSLbYsYyeXjQF/UQOC7FzdOgWFgWLVEqkHmeVj24Xxr/YZtCs0qLQvhroTCS/n5rDCnI9bKJqIEP7HoHXy5PNSyWg11/Zb1u5u0g+tiCEZF4kO96No0tKZZP4zlEtRdji4aGU7/ICPTrzG+g8SMQQJnwyqJEe3X86AkGLhMeYFoYMAjrLmTND3wNC4+bNLPGVZBJmFZncb9PyTUJd0+Opep9nfZQvQUvEzDosFu7j1hd0QRrABzNsmp3/gK0= X-Forefront-PRVS: 0673F5BE31 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(396003)(376002)(39860400002)(39380400002)(346002)(199004)(189003)(68736007)(6916009)(8936002)(6666003)(6116002)(3846002)(1857600001)(2361001)(44832011)(106356001)(6486002)(105586002)(42882007)(50226002)(486006)(72206003)(7736002)(305945005)(36756003)(66066001)(478600001)(2616005)(316002)(956004)(1076002)(16586007)(25786009)(5660300001)(2906002)(54906003)(81156014)(476003)(81166006)(8676002)(69596002)(16526019)(59450400001)(53416004)(4326008)(5009440100003)(6512007)(50466002)(26005)(48376002)(53936002)(97736004)(186003)(386003)(6506007)(47776003)(2351001)(51416003)(52116002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2528; H:jerin.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2528; 23:JmcS4yuxVwO9Kxavd3kpeHGIkw0Cv4craBcPlU9JI?= =?us-ascii?Q?0vA5BflKULpiME4lpTHQXRpq73RpIFb1BZ4QgmRyQ711Fp7i/4a6J12qVlHf?= =?us-ascii?Q?y322ZdpxuXGJOkKXkNRKupRRRTFYmJXAgxaF7wJwrCllZ9MnVTHv1ZZwbNG1?= =?us-ascii?Q?A/PvBpHjiE6pcVtZvtkC2nR6tdAEv3oIObeQ43r7Pu56MkALDdadZJooqOf5?= =?us-ascii?Q?hkmndpAeDuf2Z2o/itZZet96kETSTcFYBJc18K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borxy3AwwA17ZDD8QspEIKrImZQW8ozJN9e2dO3gbuFaxG9tF3gEA76ct3jGY3eMlgGY5T7YM4NhwJxOGuc/3YLR5nRsL5vt2YZdjOJI/NmlZhGAVQywWe+sC4a1H9zvYuQTyfo6AS+AQ=; 24:qLus4dlC5ZdaKaDXgekvargn+gRCFtTupWb0xRuRGlAWflKpphhySiiD2YEww5jtXS3dW3Ik5xpRMrmOboiG1E5Idfg2WTxPNN+qUyVEN1k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 7:lKQDkpwtI3Xr8EKrhx0zWblpbsfj+/JGgYvQyqp6jBtikAKFAB8OyeIqhcxQJVrQulcx+rDIHYCs1atVxcvSaoWxQsoLbipRjFRPSVWXJrRZ6yNYk/jJDsxuE3VUK3Ozqtl+klt8jTsQtPhVoZ91UiEBZ5JTtT1jd991bS67e2/MUtCfFdqpm7fhjWLQ32wEJgTuc/RwEomFZPX9nfRJ01iL64YarfSLx73CXwvcVZ9QR0Hkoh9+DOmO79aDGuP3 X-MS-Office365-Filtering-Correlation-Id: befde2cd-a9bc-400c-a19e-08d5ba4b2f8f X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2018 10:04:00.2142 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: befde2cd-a9bc-400c-a19e-08d5ba4b2f8f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2528 Subject: [dpdk-dev] [PATCH] bus/pci: fix driver name string manipulation 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: Tue, 15 May 2018 10:04:05 -0000 sizeof(dri_name) is 8B on 64Bit systems.The intended operation is coping the string after '/' from the string `name`. This bug is not letting to probe any device string >8B hence results in the testpmd error("No ethernet devices found) on some PMDs. Cc: Andy Green Cc: Pablo de Lara Fixes: fe5f777b538 ("bus/pci: replace strncpy by strlcpy") Signed-off-by: Jerin Jacob --- drivers/bus/pci/linux/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c index a73ee49c2..cd45875b1 100644 --- a/drivers/bus/pci/linux/pci.c +++ b/drivers/bus/pci/linux/pci.c @@ -54,7 +54,7 @@ pci_get_kernel_driver_by_path(const char *filename, char *dri_name) name = strrchr(path, '/'); if (name) { - strlcpy(dri_name, name + 1, sizeof(dri_name)); + strlcpy(dri_name, name + 1, strlen(name)); return 0; } -- 2.17.0