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 A1A7EA0679 for ; Wed, 3 Apr 2019 19:32:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 964611B54C; Wed, 3 Apr 2019 19:32:29 +0200 (CEST) Received: from mail-vs1-f68.google.com (mail-vs1-f68.google.com [209.85.217.68]) by dpdk.org (Postfix) with ESMTP id 0E4111B54C for ; Wed, 3 Apr 2019 19:32:28 +0200 (CEST) Received: by mail-vs1-f68.google.com with SMTP id n4so10494150vsm.3 for ; Wed, 03 Apr 2019 10:32:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4AkMWFsKr1VFb12HPwDfRm5eu5xQ+SCRsWtMvuG4WVs=; b=t8xApnXUe9ibAlJlygcRzP/xG7IIXKFY92mAZilrmUD3Q7TYZ0J8kDcbfUwm+mQgNv Ee3G1VSR0gQtejopAO09nEwaikxpOkTcyqDnh7MfuaZhOZmA+4BY3QZgpZK10NIzYO+J MK3/gwPQFjtZkP6cuxGL+/HLRtn4XKxaoKcFJpNO7IehwrP8xJ9yqXHawX4GEg4stZl/ FWHhFZMf+sf+0nbrW8XtzWlSVTgK7opUi4KY90VULSI1fCexEIyJNHUTcfWZmMIH4L4/ K4nwBPcAM+JOhjHnhzbM+XJoyv87/h5h83madB3NZCDJHjUOgYdZI1sDYKENK+EheuT4 gnzw== X-Gm-Message-State: APjAAAU5Z7rRDEeyHhA4TTAFN720FjsqOAfpnzrBMCe/cYRQz3zd2fiZ yjCoPFwyzzq//dGCelq5LQ5Gxc3BtO24apGWlG/LCA== X-Google-Smtp-Source: APXvYqxxuvSjkc7q3R7KzFOrHc8st7VL3+Xq47PTHgCyodfuUW4zIFT1a4NrIvNcoI8O5Z7DfAOR52+KjmV84GCC4Ko= X-Received: by 2002:a67:f588:: with SMTP id i8mr1089075vso.91.1554312747497; Wed, 03 Apr 2019 10:32:27 -0700 (PDT) MIME-Version: 1.0 References: <20190403160726.1231-1-mohammad.abdul.awal@intel.com> <1807422.QXMQecOh3y@xps> <20190403164116.GA1344@bricha3-MOBL.ger.corp.intel.com> <938cd677-9563-b29e-a4ab-3c2d84c519d8@intel.com> In-Reply-To: <938cd677-9563-b29e-a4ab-3c2d84c519d8@intel.com> From: David Marchand Date: Wed, 3 Apr 2019 19:32:16 +0200 Message-ID: To: Ferruh Yigit Cc: Bruce Richardson , Thomas Monjalon , Mohammad Abdul Awal , dev , Andrew Rybchenko , dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Wed, Apr 3, 2019 at 6:53 PM Ferruh Yigit wrote: > On 4/3/2019 5:41 PM, Bruce Richardson wrote: > > On Wed, Apr 03, 2019 at 05:35:22PM +0100, Ferruh Yigit wrote: > >> On 4/3/2019 5:27 PM, Thomas Monjalon wrote: > >>> 03/04/2019 18:07, Mohammad Abdul Awal: > >>>> Null value for parameter name will cause segfault for the strnlen and > >>>> strcmp functions. > >>> > >>> I'm not sure we want such obvious checks for all APIs. Here I would > >>> say yes. > >> > >> These are internal functions, not APIs. I am for verifying input for > >> (all) APIs but not for internal functions, drivers should call them and > >> they are in our control, if they are passing NULL we can fix them :) > >> > > True, but if these are control path or init time code paths rather than > > data path APIs, I don't see the harm in putting in the checks. > > No harm from performance point of view, agree, but also looks unnecessary > to me. > +1 All the more when you see the following patches that adds input checks in the faulty/too naive drivers. -- David Marchand