From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0079.outbound.protection.outlook.com [104.47.38.79]) by dpdk.org (Postfix) with ESMTP id C6E7D2C6D; Mon, 7 May 2018 07:42:58 +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=T8+CYfG3H+2VjDXNYj4d9TIzy5M83H0QoMFRKBUtHP4=; b=RPJKYI+y27mxXTx7iAXqvVTxCwmrjbj8+qPEtngbGh4yxSiJVh9AjYoGVx4/Oeo9arzecd9lO5zfhOWT/8Gu/hhRbQKBSgc7A85B9A8Gp+e0V/jopV0h8LW9jm58nJ4YP6pb0J8iqW/+r6iH+rNjBRPrmmbBJokLK7emcqMTfpw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [10.89.1.23] (115.113.156.3) by BLUPR0701MB1891.namprd07.prod.outlook.com (2a01:111:e400:5165::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.735.18; Mon, 7 May 2018 05:42:54 +0000 To: Andrew Rybchenko , dev@dpdk.org Cc: Ivan Malov , stable@dpdk.org References: <1525429914-18409-1-git-send-email-arybchenko@solarflare.com> From: santosh Message-ID: <146d5ea9-793b-9bbc-0d20-9375cf2d3907@caviumnetworks.com> Date: Mon, 7 May 2018 11:12:29 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1525429914-18409-1-git-send-email-arybchenko@solarflare.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BM1PR01CA0083.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::23) To BLUPR0701MB1891.namprd07.prod.outlook.com (2a01:111:e400:5165::24) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BLUPR0701MB1891; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1891; 3:+tm2R2zndhmGPrb8wCFlN+goa9Jvja6RFrikqef5YcWhmtogEqWr3vqHcxIrLc5bZRcTPvJOmY9WJLCn0sC+6S2cUVY8Vlji5V4SeT97Dp2TBdx90bq3eC1O6XDUGDduPG4+2sANYl5JEzrQ2h3qxdbwIxMuAT+OHZqFBCnnoIhgQDR4i7q9QDKw65Bh3LRYiKVczwhJeBmjxi7zjfkI0L/pNDZz/4hd85/aVkJkwWfUBGZc/nD8VsXap7BEfC+B; 25:n49y27sRwgXJKeBjx2NQhey5Xo9syIXstyQZfdqV6lMZF+K89l4rdyZ01R4NNaVDeJaS+l1tHS0SJELuyAcm0byLRG+u4OfEjfjlHfO9etUB5QIdlEmpOFOtsXOLHqOf6S77+S910onRHEpbdWcb0UNyulQyzohbdjdweH4qF8OYX29W82ufiWh9qA7i7Qve8022iEylBmU+oTYGoZK580NFEJqnMV9ULKyAn3OmqeOSA38FYvyKkL+WcCC+nvZBNPn/yoRSl9sVX8k2MtIUeVyxdo0tASCqIT/2yNiCZcNctnbSxsFsvmVHyIPfUw88nfg/of4MECmb1Y1cTnVUgg==; 31:YSc9NpSqw2TQB3v6xxdZ7qpoEBlQKOq04HLTnKrwaE07aAJ1jmxe+XnOr6dCrBlJy3Og2R6VfazX8xuWMXMhpH5YYM8ixvh7OWCxp9a09ehEgrtoh/4RscyEiJxxXWS8L2Vt0VKOdpAuERct0WiUqCXUhTYOtq0edCB/rdSqf2Zn6X2cgDXiIuRbsi3ESYCChH5CSA++C60yiSg72qsd6QFN2W2JnVWIvrKQnNUPcO8= X-MS-TrafficTypeDiagnostic: BLUPR0701MB1891: X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1891; 20:+MsRMPS772iZuORjAYwq08SLmcdzW+niGdxtwMfdjsesGy+voZ3u+mcKxe0bV2kK9c/Sk3TMvmfjUx/8TNmi330X80yFZ8uxIxCnphU0xXVV9lpyveCcMmK3zZAdFpc3wEH9ypct9qrkfgwIhmuGR1dRjEuFoFJc/hdgIOAWyU4MLNSXiBSQSGcNJThYoqlJaOROYq0EdCwGHnzFyMxDqcr+D0eaC1U4KcZiWh+SfOeYtUoXELTFgAA4eRIlD1w1DaLnmsQyy0DHGZTpwNZjV6EqF1yihaxS2EQw9YxaS8wggu4llLJj5F33HG8kDQCGiCNFRMv2pw8y3hS6brUIWyqdTmxqE99KaHD4v70RoEoPqeOYxlfS3PoOCeR84kLRPQTaoISxqZamiYKwiDyZGA8OzMHfbrg1LhH0CSj377ckB4w0dCjIZHYStYK5vM8p6TWazPa8z6eXfm0hzNJ1BQ21quNlg5FO4ferZckelqsxWt+xmYLaDTFeMz8kL68EOJFrFX0Vh40ctkno/ULinGQB3mjdZYvwTeJvUUxtxjtpRwx6UxQ1uVDzJ7m90UShlD4bBTx7wja2xK1GhnCJbGc6BfiEFcursALvvXRFZOs=; 4:OQ4P4ZtL7bXnuGF5jgHbDPgaLOAZTwqaFOmOLMhkXPucp2Vt/cbWn3ix5epkFf0whFy2HlBAUosFa9iEFxG/6ITm9hBsttiDYl6odPBlHH3/RH/mnDyJ3s7KVXiJtOC24sF0+lFnZU3DKVvJIhcVYybZ+h25RTjt6e4e0b6aPlBmfmD8y0GTBpqsXFcjOwFgR1xjWJYwtjlTEUo+0H3tuAi4Fq+LZePRYCRZBJoYpmiwuM6zSM8AVMynJXTQMfPA2ZF9fms2erWWq/vkAxFJww== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231254)(944501410)(52105095)(149027)(150022)(6041310)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BLUPR0701MB1891; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1891; X-Forefront-PRVS: 066517B35B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(376002)(346002)(396003)(366004)(39850400004)(39380400002)(189003)(199004)(486006)(16526019)(476003)(31696002)(50466002)(36756003)(8936002)(68736007)(31686004)(305945005)(7736002)(2906002)(64126003)(6666003)(4326008)(42882007)(6486002)(81156014)(81166006)(8676002)(11346002)(956004)(446003)(229853002)(2616005)(478600001)(3846002)(66066001)(47776003)(16576012)(76176011)(55236004)(386003)(58126008)(86152003)(26005)(65806001)(52116002)(65826007)(2486003)(23676004)(52146003)(5660300001)(6246003)(77096007)(230700001)(72206003)(186003)(53936002)(97736004)(4477795004)(316002)(106356001)(105586002)(25786009)(65956001)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1891; H:[10.89.1.23]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTFVQUjA3MDFNQjE4OTE7MjM6NG9wOGxJdWMvVnVNUnVVQlM0U0x5eWlR?= =?utf-8?B?NTVZMDBJeGNNQ2pnV3puWEhmK3VlSG1VNzFjaldMS25HdHZrSTJOWXBpeTNi?= =?utf-8?B?QTFCRGhEQllreEpPVlNBcUJKUlQyb0ZtZXhHaHIyM01YbUgwOENGSHdpcWs0?= =?utf-8?B?MGd6MVgxenRrRnp1ZkVseWNNZERNTjk3UC9PR1pNU3RPNGYyMVlmcnFiZmhP?= =?utf-8?B?UUxpbjJ6SH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u17yyVAai0h9JvIVX20zSkj1Ns/kFxowx6IZNi/3/f2zy5K3/ItwNf1dukTi9iQc9yRHMnv1kB44dhAgsKvkskm/z5JJvML7yLBc6aX3pGeBxj/ee3HiwYpJwZANkGqW1rOzqme/WS3wC1mqlDFKza1X6aTAua7UzcnGxh7Mg48ibLMH2sQs4KOZAd X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1891; 6:oHZkhuw3UFoK7KPQ/OkgU2cSOejVxzEl/8pqFuZwahT5colTMl973GzNbbxyYgPyZeDKGhuwee/OijtAFx/XC0tjhZcGTGaBFmxv9/aZUzw+ajRepSE7NOtQQzNCBj3rDngMrwEqaf0oXnYskxhvlvlg5JUDwa45iy64piT9oCg1Gup9RIgAEVCqPqBUPJ4Td+lVJDuxSgIAnA00kGYcOLso0fevEnX/3qlHk/u9zxangYqF4hePtMXqiXLJsJ6v3I6K6C5Ffe5cIdtOOV7fwxQF30faWLjqEfUfjB2SDeF2OGqfwq6lCanpBtx5lYkqVp3DocZqJz1EvCK9uz5H0NYpD3xk8nGHVQr3NVIGOzmtPi0prMno5WfctFrdorTBUtAe5YA9y2BAkKc76DJAWXcuL08Vbrbwnl0El5inhWZHRyQrokqi7ywxj/tt84EvMgSDv8U5szAGDG7fQfsaUw==; 5:wRxfeQ6DhxK20jdoQP1q1jBQXCU2TxNyrmMlLHIRp9Upl6Y9+HSpLo2LulGgTE2TKqqw6/RE3BjjGsv9oJhn05XaYy3F1ID+MAX47jMn+X4ah79r2mDUximwlkfEu5ps8bqN68VLoBu6qgsD7epQI+4kZtV6ZKMhHSSVcJeBPVE=; 24:9y1XpqOZqF017vjxU6hMkLsVFh4oi4q+NhPhjIoJTi+7ZzltfbMDqIKMDBBaeRiDL0qwmmRWhUW+9XBa8FywmYuexXafofr8nOTdREZL6oU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1891; 7:SGTMrH21WKhG72wsWwhuZTNJbIDkZqdOBXrl4k1xUFPxhqvFzrOJflTCByBgXCGh/jagVOp5TP4PgRt84B4zR2Xw1YHtNai7WYM5j9Nsbwf2p2p9iJOfoj3DA6OoXZkZLYL0wvSy69LifGRKywryoBAh55A0nGTavk3KfqjPC6Ig+NL3kU+sEK2npQxub57wMYZ6zJg0GQYygc1Cyc3JwUTz22co4WhobWOM4Xe5chH9xNSd3hyP8nonWZBd6GRk X-MS-Office365-Filtering-Correlation-Id: 872a4e88-73ee-4fad-82d8-08d5b3dd6260 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2018 05:42:54.7585 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 872a4e88-73ee-4fad-82d8-08d5b3dd6260 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1891 Subject: Re: [dpdk-dev] [PATCH] eal: copy optarg when parsing mempool ops name 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, 07 May 2018 05:42:59 -0000 On Friday 04 May 2018 04:01 PM, Andrew Rybchenko wrote: > From: Ivan Malov > > The code aimed to pick and remember the value of > mempool ops name from EAL command line arguments does not > copy the string and remembers the pointer provided > by getopt_long() directly. The latter could be clobbered > later and result in reading wrong mbuf pool ops name > by rte_mempool library. > > Typically, this flaw could be avoided by using strdup() > to remember the string value of the option. > > Fixes: a103a97e7191 ("eal: allow user to override default mempool driver") > Cc: Santosh Shukla > Cc: stable@dpdk.org > > Signed-off-by: Ivan Malov > Signed-off-by: Andrew Rybchenko > --- Acked-by: Santosh Shukla