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 374E2A00C4; Sun, 27 Feb 2022 19:32:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C56F74068A; Sun, 27 Feb 2022 19:32:04 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id E2B4840683 for ; Sun, 27 Feb 2022 19:32:02 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 8FE0F5C0161; Sun, 27 Feb 2022 13:32:01 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 27 Feb 2022 13:32:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=qFEfUjyR4vVk6Z 0g+1ujUwegoXMfil2F8BFOadSZHH8=; b=j5cXkQzIUoXsJSE39NbJl/VrFRXjSw mEh7CForYj9q+2BJNLWWBSBmuGD/J8c5h04G9kd+wqgxjxYBYULWf4Z/fv6vLPfx ChK6jieqTSJi8UIXZpTf07siqJhBx1tdWzWh0qiBolbNQR+VXf7CkGdv7Wh10y8C Jxvr6jmt5KKmEe4z1wM0i//MSdoasU1smR02pR3lsDfdH7Sp6ZFUI4iVhoN+7rFw d0C0pqqQ58/ur5wmX+YgFKVPuNq3MYtQoWWLNSmN0JKSg8ZSkYhs1I8wVtzkSHWl 75Irr0NPJEYDj8Sv2uyPZyyBGrZF/EjKa+9KA5hFnVTrfQ2Y9q05oyqA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=qFEfUjyR4vVk6Z0g+1ujUwegoXMfil2F8BFOadSZH H8=; b=bUKUcgrnCPRocrs8Kd8DupH4XkQgCn4nW/d1gNvXzy6014j6WNYcvlALC 4cyPpfGwLLcCfXFyp+UprIoGXYXRO6FF1suSEnq4QIz+dXJuJgUbQv0F31BZdciX Uk3dF/IMrfZjLe1ee0J2cU5S4qN/RbHKqAYCPWke+C2h+5NGj9MaMp0V9KakR5qR 7aMu8GVojuwbNl7o8LF/qYVWo/U6GJm/ICFQJyBgemJzM4dFZa2f+zropwMPwQcX sJCCTz/ohc8V/MEfsx/SdJZZRjW8vzoScRVBMAo8P1e8IbVOv/DDRz02Te9hny+i 7BF1yjo18lx7r6+3Nxjf3LPg/689A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrleekgdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudejudethfehleevteelvdevjedtfeffvddujeelveetjedtleeu feetgfektefgnecuffhomhgrihhnpehurhhluggvfhgvnhhsvgdrtghomhdpughpughkrd horhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep thhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 27 Feb 2022 13:32:00 -0500 (EST) From: Thomas Monjalon To: Gaetan Rivet , Madhuker Mythri Cc: Ferruh Yigit , dev@dpdk.org, David Marchand Subject: Re: [External] : Re: [PATCH] devargs: Fix crash due to global devargs uninitailization from secondary process Date: Sun, 27 Feb 2022 19:31:58 +0100 Message-ID: <5256603.5fSG56mABF@thomas> In-Reply-To: References: <20220214170811.1192-1-madhuker.mythri@oracle.com> <9eb28ee2-5d76-c93f-2844-f754db4747a5@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 15/02/2022 12:20, Madhuker Mythri: > From: Ferruh Yigit > >On 2/14/2022 5:08 PM, madhuker.mythri@oracle.com wrote: > >> From: Madhuker Mythri > >> > >> Failsafe pmd started crashing with global devargs syntax as devargs is > >> not memset to zero. Access it to in rte_devargs_parse() resulted in a > >> crash when called from secondary process. > >> > >> Bugzilla Id: 933 > >> > >> Signed-off-by: Madhuker Mythri > > > >This is duplication of Gaetan's patch: > >https://urldefense.com/v3/__https://patches.dpdk.org/project/dpdk/patch/20220210170131.2199922-1->grive@u256.net/__;!!ACWV5N9M2RV99hQ!aE5DMiBds1eptcxnoYR6KWszXGgqYHaQduFAfUDwH4ps-h0eJIQ5Wk2JBZGMFh5DBZSZ$ > > Hi Ferruh, > > Initially, I had filed this bug: https://bugs.dpdk.org/show_bug.cgi?id=933 , as part of the testing on Azure/Hyper-V platforms. > After analysis, found the root-cause of this crash is due to global devargs un-initialization in failsafe-pmd probe() and published the patch as follows: > https://patchwork.dpdk.org/project/dpdk/patch/20220210071052.527-1-madhuker.mythri@oracle.com/ > > From your review comments got to know, that we can memset inside the rte_devargs_parse(), instead of setting outside before this API call. > Got delayed in testing the same code changes on Azure/Hyper-V platforms and publishing this patch. > So, please consider this patch, as I had found the root-cause of this issue and tested on affected platforms. > > Thanks, > Madhuker. Applied with these explanations from Gaetan: devargs: fix crash with uninitialized parsing 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") Cc: stable@dpdk.org Signed-off-by: Madhuker Mythri Signed-off-by: Gaetan Rivet Thanks all