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 1AA06A0540; Tue, 13 Dec 2022 17:43:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A24C340146; Tue, 13 Dec 2022 17:43:06 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mails.dpdk.org (Postfix) with ESMTP id E244E400D5 for ; Tue, 13 Dec 2022 17:43:04 +0100 (CET) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 768B0B8124E for ; Tue, 13 Dec 2022 16:43:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6BE9C433EF for ; Tue, 13 Dec 2022 16:43:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670949783; bh=0C/zcX51+/KAXJgRzuEHrpQghMG9HuCeNFL+TWq0zfk=; h=Subject:From:To:Date:In-Reply-To:References:From; b=TjjZ005/7zderiobJ0a2eAL2mwax49shy0Rrv5ySbt1wmdiBJZGyHrD2tWQcCU2Vq BZmBGvm8Et29muc3pMJbb5kjd8v7sOCuttWVIe8eJqxPJzf2z205tlvAClQrWj7s0Y 7Ojch1t4gmhu+yj5IVE+rPsKKUoBXnmV9U8EfFws2WvG7gJJllg1a1aIekf9WNHMZt zdlXbnVgFsuW3CxITiz6Zb1KcAx0983QA0waJiHyMd2JWLKc2f2EFyYIDon0QuN5rR /nh+Or+FlEeWdFygIo6GiHhLecewXHwccV0/b3Ii/swhAKcqh36811p+aBicX+VT0C oX1rBqNoXtn3g== Message-ID: <750bb3b53fe0521b1850a49666aba09d5d9565cf.camel@kernel.org> Subject: Re: [PATCH RESEND v2 00/11] codeql fixes for various subsystems From: Sinan Kaya To: dev@dpdk.org Date: Tue, 13 Dec 2022 11:43:01 -0500 In-Reply-To: <20221122153053.1172434-1-okaya@kernel.org> References: <20221122153053.1172434-1-okaya@kernel.org> Content-Type: multipart/alternative; boundary="=-roASafOGRweddg/AdjtB" User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 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 --=-roASafOGRweddg/AdjtB Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Tue, 2022-11-22 at 10:30 -0500, okaya@kernel.org wrote: > From: Sinan Kaya > Following up the codeql reported problems first submittedby Stephen > Hemminger here: > https://lore.kernel.org/all/20220527161210.77212d0b@hermes.local/t/ > > Posting a series of fixes about potential null pointer accesses. > Changes from v1:- Remove braces around single line statements- use > NULL comparisons > Sinan Kaya (11): ethdev: check return result of > rte_eth_dev_info_get net/tap: check if name is null memzone: check > result of rte_fbarray_get memzone: check result of > malloc_elem_from_data malloc: malloc_elem_join_adjacent_free can > return null malloc: check result of > rte_mem_virt2memseg_list malloc: check result of > rte_fbarray_get malloc: check result of rte_mem_virt2memseg malloc: > check result of malloc_elem_free malloc: check result of > elem_start_pt bus/vdev: check result of rte_vdev_device_name > drivers/net/tap/rte_eth_tap.c | 3 +++ > lib/eal/common/eal_common_memalloc.c | 5 ++++- > lib/eal/common/eal_common_memzone.c | 10 +++++++++- > lib/eal/common/malloc_elem.c | 14 +++++++++++--- > lib/eal/common/malloc_heap.c | 9 ++++++++- > lib/ethdev/ethdev_vdev.h | 2 ++ > lib/ethdev/rte_class_eth.c | 4 +++- 7 files changed, 40 > insertions(+), 7 deletions(-) > Checking to see if I need to cover any feedback. --=-roASafOGRweddg/AdjtB Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
On Tue, 2022-11-22 at 10:30 -0500, okaya@kernel.org wrote:
From: Sinan Kaya <
okaya@kernel.org
>

Following up the codeql reported problems first submitted
b=
y Stephen Hemminger here:

https://lore.kernel=
.org/all/20220527161210.77212d0b@hermes.local/t/


Posting a series of fixes about potential null pointer ac=
cesses.

Changes from v1:
- Remove braces=
 around single line statements
- use NULL comparisons
<=
br>
Sinan Kaya (11):
  ethdev: check return result of r=
te_eth_dev_info_get
  net/tap: check if name is null
  =
memzone: check result of rte_fbarray_get
  memzone: check result =
of malloc_elem_from_data
  malloc: malloc_elem_join_adjacent_free=
 can return null
  malloc: check result of rte_mem_virt2memseg_li=
st
  malloc: check result of rte_fbarray_get
  malloc: =
check result of rte_mem_virt2memseg
  malloc: check result of mal=
loc_elem_free
  malloc: check result of elem_start_pt
 =
 bus/vdev: check result of rte_vdev_device_name

 d=
rivers/net/tap/rte_eth_tap.c        |  3 +++
 lib/eal/common/eal_=
common_memalloc.c |  5 ++++-
 lib/eal/common/eal_common_memzone.c=
  | 10 +++++++++-
 lib/eal/common/malloc_elem.c         | 14 ++++=
+++++++---
 lib/eal/common/malloc_heap.c         |  9 ++++++++-
 lib/ethdev/ethdev_vdev.h             |  2 ++
 lib/ethde=
v/rte_class_eth.c           |  4 +++-
 7 files changed, 40 insert=
ions(+), 7 deletions(-)




Checking to see if I need to cover any feed=
back.


--=-roASafOGRweddg/AdjtB--