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 B252941D9C; Tue, 28 Feb 2023 12:29:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E07240EE4; Tue, 28 Feb 2023 12:29:54 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 773AE4021F for ; Tue, 28 Feb 2023 12:29:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677583792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Hy+MfFmSmXJQ+mjxRKjMOMaSgbnX20DS+RcEyFFTGsg=; b=QLKWD7WX+wRGbXUyZy+h13909wINXUiG5GOygxMUFCEXe+4ItfmuoC9zO3xJ6wgg23B6Go E+enVOHxO1sGCIQHFBYMRoaSZDjNjCIsHfhWxeuMY4C06wTeICohfXEeG8lpZ3lr4eNk35 POMuoAZXUzVcRJku750awFAs72iHJ54= Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-288-B13rBHrQP1O3h4lx00X2Rg-1; Tue, 28 Feb 2023 06:29:48 -0500 X-MC-Unique: B13rBHrQP1O3h4lx00X2Rg-1 Received: by mail-pl1-f198.google.com with SMTP id iw4-20020a170903044400b0019ccafc1fbeso5138489plb.3 for ; Tue, 28 Feb 2023 03:29:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Hy+MfFmSmXJQ+mjxRKjMOMaSgbnX20DS+RcEyFFTGsg=; b=mu3Ice17Ri2QNHzsqIcZMs68sF9RbTA1XsWYYV8o3UeZD7UwXf7rs98un/wRYQaPND /YGGLcppjAPTaQXmSQT+o+lkj6kUtzuzYDrxC6H/G3h9Fr9Mh6MIzvIm9rZbt81v/yV8 Ad+GRP+gV+Xd7olBYxkBkOuiGBDbYrTwJ/rz5VVrbJJxgCXODKUNNT3CtHBu6pptB07a KbA8yCQSKfae5b6Rq0v0Y9nZZOYfZpRJhvcExJM8yReNtw2zUSU6UZw8kyC0nF30VbI8 WrWA7G95KUsS/RH4QX348hutuX+2x9nHFvZlOFmgTxRVp/8g2gUlphW/awR+dUjBdLZY QJzA== X-Gm-Message-State: AO0yUKXE3d6lsjRXu312e5EmjPynCaq3uBU5pKvs4nI4eznEQmfiteWI 4cczOiOloofSoRtcgIDjmUixVFjSIIZXEGxTSzI6y7w3gvBjvR2g/y6bT7kAJGbDuP70qGIGtq3 zJ36y1C3CX4TKmXyuYG0= X-Received: by 2002:a63:3681:0:b0:4fc:2058:fa29 with SMTP id d123-20020a633681000000b004fc2058fa29mr680233pga.1.1677583787558; Tue, 28 Feb 2023 03:29:47 -0800 (PST) X-Google-Smtp-Source: AK7set+8y0NAmBLmguD+DDAF+TA56nyLu9RhtzBY+cjcuFA6hsMcESCdRvb/miGnThwqqewWIX/eP/b4mQCSxYWj0UE= X-Received: by 2002:a63:3681:0:b0:4fc:2058:fa29 with SMTP id d123-20020a633681000000b004fc2058fa29mr680226pga.1.1677583787235; Tue, 28 Feb 2023 03:29:47 -0800 (PST) MIME-Version: 1.0 References: <20230223123029.2117781-1-adwivedi@marvell.com> <20230223123029.2117781-2-adwivedi@marvell.com> In-Reply-To: From: David Marchand Date: Tue, 28 Feb 2023 12:29:35 +0100 Message-ID: Subject: Re: [PATCH v1 1/2] ethdev: fix null pointer dereference To: Ferruh Yigit Cc: Ankur Dwivedi , dev@dpdk.org, Thomas Monjalon , jerinj@marvell.com, Ali Alnubani , "Li, WeiyuanX" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Tue, Feb 28, 2023 at 12:05 PM Ferruh Yigit wrote: > > On 2/23/2023 12:30 PM, Ankur Dwivedi wrote: > > The speed_fec_capa pointer can be null. So dereferencing the pointer is > > removed and only the pointer is captured in trace function. > > Fixed few more trace functions in which null pointer can be dereferenced. > > > > Coverity issue: 383238 > > Bugzilla ID: 1162 > > Fixes: 6679cf21d608 ("ethdev: add trace points") > > Fixes: ed04fd4072e9 ("ethdev: add trace points for flow") > > > > Signed-off-by: Ankur Dwivedi > > Hi Ankur, > > There is another bug report: https://bugs.dpdk.org/show_bug.cgi?id=1167 > > > As far as I can see that is caused by '__rte_trace_point_register()' is > calling 'register_fn()' [1]. > > At registering trace point stage, most of the pointers can be invalid, > and this can crash other locations too. I remember hitting this issue when running with UBsan. > > Why 'register_fn()' called withing the trace point register? Can we > remove it? IIRC, this is used to evaluate the size of the trace point event. -- David Marchand