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 7B1A143B95; Thu, 29 Feb 2024 19:32:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E404B42F7D; Thu, 29 Feb 2024 19:32:07 +0100 (CET) Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) by mails.dpdk.org (Postfix) with ESMTP id 7346C402CD; Thu, 29 Feb 2024 19:32:06 +0100 (CET) Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-5a0d96012d0so634133eaf.3; Thu, 29 Feb 2024 10:32:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709231525; x=1709836325; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kEI6gwtkU4PCUm50TsER7rSvQD9h5CQTZ+Al5qNii+I=; b=XrptQ3bCLydS107eq3G3y3ipWnVv9z2zKTpOXQxTFHKSOqYO3H+wG/bCll2D1x6NCW pd9KUChhH+5x8veRIcgSXLFPH1H0e2NE7uCAu30EZSMI+yzxmKMlRTNnn8beJi6CsLjB QgNY30tY17gSo9XnRmMZPjexvJoWFZ2oC458islCJ0lxm85aSEwCDOSsQA+x/Zv9mBqu 2S5Tt2fh2a0FdtqO31Nxrl217yc7FvuWUzrPiMcPMyGAVSAuv5FDdJhQQzbQCMAjRw/s Z/8wPtTZR4I6vX5mXvgUWoXYJi0vTCLluZXf3KITlpbYGmTxEiVjlnm56cwaVJPC5R57 UUzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709231525; x=1709836325; h=content-transfer-encoding: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=kEI6gwtkU4PCUm50TsER7rSvQD9h5CQTZ+Al5qNii+I=; b=I2xh02MqFGRE2BOOx+lWZwWPh+G9aV6LG/UQUcHqdy//Y0CovxDel8Z2k9orO35SKq 9zO2FMpBQSclScI+FeGJhGmfCyJ++AlYXz004YnlxGHGgP4JOsJufytA+WlWDfCsjSjU JWT/w06BjTXsLip/7Mcx/Iq1ljInCyrVHfkgYvoQrbUithWRvtjKfBVcvQLtJbqiIDw2 xlCFmfHx52aElqXpavF4hWwt09Qd6Vlr5Lp0uU+t9ASGf0ACzyxbxqdk36SEaLBKQ8nW ll4KXUx14n+ASLdWprhOzGX2wBuc2a9A2pHYq11U4FAmbC6WSGsyD9JyCZ6wg2Lq1Tyu krqg== X-Forwarded-Encrypted: i=1; AJvYcCXnIEMWs67HKoFPq7BEQgehLjMIW34B+76/JsHe6ckyaw1uKs1aObnEiY/3atlscD+agxRdlmpwgwl/qk++7VBj612DQaHBvhmYDvo1Xg== X-Gm-Message-State: AOJu0YyecAHk7LTdULExbiLppf4cSdayIKv/iyVQXDGHeVvJfstDfzPL HYWz7tDq44CMvz17jvjbjHVbVuTn/Tki6IQztqwTWnu60VqW9gqkjoIjMyE9eZQlyIBVdVP02UF FGyKyHwWnuxh0UTvjENk03/fDn2I= X-Google-Smtp-Source: AGHT+IE+ufmuTQFLg8iUQ4BD7WuobTKQLIdLUCKOCeAXyY+nL5ju3A+S4Jj/ipO1O4La4utQa/gXl+vnkxcskGxv7aM= X-Received: by 2002:a05:6358:290f:b0:178:7ac7:a0df with SMTP id y15-20020a056358290f00b001787ac7a0dfmr3203933rwb.29.1709231525533; Thu, 29 Feb 2024 10:32:05 -0800 (PST) MIME-Version: 1.0 References: <20240228064643.1923169-1-psatheesh@marvell.com> In-Reply-To: <20240228064643.1923169-1-psatheesh@marvell.com> From: Jerin Jacob Date: Fri, 1 Mar 2024 00:01:39 +0530 Message-ID: Subject: Re: [dpdk-dev] [PATCH] common/cnxk: fix Coverity issues To: psatheesh@marvell.com Cc: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Jerin Jacob , dev@dpdk.org, stable@dpdk.org, Harman Kalra Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Wed, Feb 28, 2024 at 12:25=E2=80=AFPM wrote: > > From: Satheesh Paul Please change the subject "common/cnxk: fix Coverity issues" and align on what is fixed and send as separate patches. > Fix Out-of-bounds access and remove dead code > reported by Coverity. > > Coverity issue: 384431, 384439, 380992 > Fixes: 585bb3e538f9 ("common/cnxk: add VF support to base device class") > Fixes: da1ec39060b2 ("common/cnxk: delay inline device RQ enable to dev s= tart") > Cc: stable@dpdk.org > > Signed-off-by: Satheesh Paul > Reviewed-by: Nithin Dabilpuram > Reviewed-by: Harman Kalra > --- > drivers/common/cnxk/roc_dev.c | 2 ++ > drivers/common/cnxk/roc_nix_inl.c | 3 +-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.= c > index 084343c3b4..14aff233d5 100644 > --- a/drivers/common/cnxk/roc_dev.c > +++ b/drivers/common/cnxk/roc_dev.c > @@ -502,6 +502,8 @@ pf_vf_mbox_send_up_msg(struct dev *dev, void *rec_msg= ) > size_t size; > > size =3D PLT_ALIGN(mbox_id2size(msg->hdr.id), MBOX_MSG_ALIGN); > + if (size < sizeof(struct mbox_msghdr)) > + return; > /* Send UP message to all VF's */ > for (vf =3D 0; vf < vf_mbox->ndevs; vf++) { > /* VF active */ > diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_= nix_inl.c > index a205c658e9..7dbeae5017 100644 > --- a/drivers/common/cnxk/roc_nix_inl.c > +++ b/drivers/common/cnxk/roc_nix_inl.c > @@ -677,8 +677,7 @@ roc_nix_reassembly_configure(uint32_t max_wait_time, = uint16_t max_frags) > return -EFAULT; > > PLT_SET_USED(max_frags); > - if (idev =3D=3D NULL) > - return -ENOTSUP; > + > roc_cpt =3D idev->cpt; > if (!roc_cpt) { > plt_err("Cannot support inline inbound, cryptodev not pro= bed"); > -- > 2.39.2 >