From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 92BE8A00C5; Tue, 15 Feb 2022 13:51:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5AC724113F; Tue, 15 Feb 2022 13:51:51 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id B41CF410F7 for ; Tue, 15 Feb 2022 13:51:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644929509; x=1676465509; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=xoaAz2ua9IpbCXd6KOhbjzGj6XUNOPlpcBt2xL96y5o=; b=fV5eKWU8Ee5uVBaT1lMjXITyhPtKq6UDFitJcft9So0acxmx3Vj+ri5X ZbbOoG5BYS555xEOd7RS8HUygScpxOeqp7cYK+807g+ppVcyZj8v2Jfv8 r0GUST8sIPh/lsyJEaqdm0rCGE2SYpz3AL9dIXgystOUr9H8EmmR8q3At t22h+5BpbnZugztaaUBC8GP6IEzuwYYJqiyWlVbHTechLBwQCkoTk/wJG iTuFlwPOu5I2SLsLvsWQoM6lJY3+x48ScXHH3mLxr40a3+HNlDUr7HRX1 GJYRY7bAPnhCej18Dju21pFWA6yPSX3hRE4ZIDXsapmDxQBaRl+b/r/2l w==; X-IronPort-AV: E=McAfee;i="6200,9189,10258"; a="250547149" X-IronPort-AV: E=Sophos;i="5.88,370,1635231600"; d="scan'208";a="250547149" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 04:51:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,370,1635231600"; d="scan'208";a="775822850" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga005.fm.intel.com with ESMTP; 15 Feb 2022 04:51:48 -0800 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 15 Feb 2022 04:51:48 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 15 Feb 2022 04:51:48 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 15 Feb 2022 04:51:48 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 15 Feb 2022 04:51:47 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oc+xOziW1uUsOEkMgdKYp5GtBF/K0KVhtc4aBP9F5tNA5oaJ0xndB+beUU3HpyT5JmUYR0XAYrUKjZGbjvlBIbfpF0SekpflyU6FC3H4o5IhJF9Sf0lTvbBq7NZ+pgWZTlQn4qcZKBmv7Opm6R+tF/XZNt0o6cN02PiQ3A5Rx/8z369pkYrM91xxJY7rLrk0bgnQhWftWOwnh3QI9OASrz+jrM1x5K5h1W8BH1iuYwJJki31q/3v0z1EtKnNILpQZipPm4e0ehOK+LhTYKopd16EPHoyWsUbCrIdFSwFgMiiFfVGmWIN6EQatvfGZkaQZeQrIcPsqsByNOjvMyDqnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ULmbXDleBD+C4FESc7dSApy7KL6ZivuyhfB47ZaoY30=; b=BKmSC73CsUU6rlqGhspYsg78KpYA7Y8COvGqZx//enFiT1QMZkB/BT1Vkb+7veRhp+r39m0kkgFI2zuxQLeCxuHpANrNux/7clBqH2vT7/dbgwOATOYTWo+PA/QLkHysWG38lq8Mqrtzm5eXjjZJK1p6GapY97rvMtiVcJJ3Yiti5pQ2dC7vCUH8R4qBDX7vckMBZxDrv5D5RIX8NIVI5K6QiwpAG3O1f/zkrhNfNYT/osjIhXP9uWtP6oWnM9oCna10Ym9tvH4rXTGUlDVU/BOwc4jtultcmKhxCZDyn6sZCrQ52Cr+rTEhtEu5GukF204uBKHNRWeuY86SfWkrEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by MW5PR11MB5929.namprd11.prod.outlook.com (2603:10b6:303:194::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.17; Tue, 15 Feb 2022 12:51:46 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2%4]) with mapi id 15.20.4975.019; Tue, 15 Feb 2022 12:51:46 +0000 Message-ID: Date: Tue, 15 Feb 2022 12:51:40 +0000 Content-Language: en-US To: Gaetan Rivet , CC: References: <20220210071052.527-1-madhuker.mythri@oracle.com> <20220210170131.2199922-1-grive@u256.net> From: Ferruh Yigit Subject: Re: [PATCH] devargs: Fix rte_devargs_parse uninitialized calls X-User: ferruhy In-Reply-To: <20220210170131.2199922-1-grive@u256.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P123CA0006.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::18) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a931c3af-8f89-4a0b-c35d-08d9f081eca5 X-MS-TrafficTypeDiagnostic: MW5PR11MB5929:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oIwYuUR69D7atRi6V+pRnaYqBm1ImiWIyjeX7Nx+aKukem5wVUe5aCyCoce83dXHhWxfkGuTzSX0lao82Fkr9xoSWudUVuPeXiRNbVEvix7IQYMhx6HA7KVQBDYRtEBGVp/q8g2Mmnsg2II/289ckiO4W2iCYDnz8gzdzSwUivi2p3PGcWTbxmW2jY5CfZI4pbHXdXtGyRFry8cUHfcTw3IHyCLmGUQefUTIr05kKpFJin3eL8nmjd18mYHVzn/37aYpQEm8Ej4fm6yaNXClRg6uXkmegFpqGumMlCjYGgEL6S1oa91mICyt65T7w1IGO8yPZ/BcxhbzFTm63M50F70Ser/lgBoEnUjMHWO/Fn6CTf8O5wUErsQkWO5KP4JrqNJ9I1DvqIdPYvidXLhlnwusfAmFkg0GQDVyrfPgDWUJyaNVIxXnJAODnX3sPn7HW4k8h9fuZ57pP7ZQapb+KlYF5MberQvrcTCRLUVQolu/8l2qwXu5nQQ/X8kBe6l6qwRFyou4gbwoCQ7DXXFAsytzqgSHtjweEsrobQe0vhDv/SSSBtP87xZTnq5X9mH6Cr3cyLp4oApOr2jjfIkCp2GSf84RQjGqV4GemmOVzJ1odmBrl3kzaJx8PcHNYE9yv9dfAs4TUcc8H2h96qz0TkchBludgBgwkRIcpgwS/18qFrl1NawBcNePBa9DOTYhjqe+AN3R1QcbXOacjQcFfw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(83380400001)(508600001)(31696002)(6486002)(31686004)(86362001)(186003)(26005)(6512007)(2616005)(53546011)(36756003)(6666004)(6506007)(66476007)(4326008)(316002)(38100700002)(2906002)(66556008)(5660300002)(44832011)(8676002)(8936002)(66946007)(82960400001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?blNFQjZCYWU0aitEYkRTemhxdElkZXQ0bU45Z0J3RnJiVVZFODBWVmsyeEd2?= =?utf-8?B?STdPc002dG5rWHVrb3hOQ1ZQZFM0Z2FwSFk3T1Q3Ri9TaUVLSnNvSWx6MW1m?= =?utf-8?B?MTk0MlJOcng5ZWdiUTVqM1VtY2xVeXhZMXYyYWkzWEhjTHYxcThRanJkOVVB?= =?utf-8?B?YTVyMURjdWtMM08yb3FHbHhNSWRmd3ZDdDZMbVVaL3dRVmJ1NEgrTWRhVkRY?= =?utf-8?B?bXYyZS8rbXZBb3NJZFI1ZU8zQWxUNndvdkY2cUxBVWpLUnEwREI4Z29pK0dh?= =?utf-8?B?azcySlpUVVA0dTl2WnYzdVJETmpNcWtZY3hVTXZuVTFHalh6REh1Y0szRnFG?= =?utf-8?B?RDh0UWZVZ1ZQM1YySm1aWUwxSjROQ1VvcEZBelJjOEFBTWJWTlhrRnAweFYz?= =?utf-8?B?SGRDWHBTYW0xd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ange-CrossTenant-Network-Message-Id: a931c3af-8f89-4a0b-c35d-08d9f081eca5 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2022 12:51:46.3556 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: heLi65tmuSWTljA98zoiq2vd8Br0T1nwykEDWByGM89/5VhSdjAbgxvlpU4ocHBiPDNC9KiShMf/cx5MY89MBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR11MB5929 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2/10/2022 5:01 PM, Gaetan Rivet wrote: > The function rte_devargs_parse() previously was safe to call with > non-initialized devargs structure as parameter. > > When adding the support for the global device syntax, > this assumption was broken. Restore it by forcing memset as part of > the call itself. > > Bugzilla Id: 933 > Fixes: b344eb5d941a ("devargs: parse global device syntax") > Signed-off-by: Gaetan Rivet Reported-by: Madhuker Mythri Since Madhuker did the initial analysis and the patch I think fair to give credit for the work. Thanks, ferruh > --- > lib/eal/common/eal_common_devargs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_common_devargs.c > index 8c7650cf6c..184fe676aa 100644 > --- a/lib/eal/common/eal_common_devargs.c > +++ b/lib/eal/common/eal_common_devargs.c > @@ -191,6 +191,7 @@ rte_devargs_parse(struct rte_devargs *da, const char *dev) > > if (da == NULL) > return -EINVAL; > + memset(da, 0, sizeof(*da)); > > /* First parse according global device syntax. */ > if (rte_devargs_layers_parse(da, dev) == 0) {