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 D21EC42EDA; Fri, 21 Jul 2023 14:32:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C220040E2D; Fri, 21 Jul 2023 14:32:56 +0200 (CEST) Received: from mail-ua1-f44.google.com (mail-ua1-f44.google.com [209.85.222.44]) by mails.dpdk.org (Postfix) with ESMTP id 158FC40DDC; Fri, 21 Jul 2023 14:32:55 +0200 (CEST) Received: by mail-ua1-f44.google.com with SMTP id a1e0cc1a2514c-794cddcab71so684874241.1; Fri, 21 Jul 2023 05:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689942774; x=1690547574; 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=jSJ8+ioDhbOjX8NkR7pAaN7u0+yKoxN1/aIsUSf2rk0=; b=r/jLD8wvyqabOVqkaUgCPkaqFdY93AhOOncHxC6Ff9NZyJVL+MjLfdL7I/L0gX7l2M r85aBsl9Q+3p3OCXqT3PVgDfp/LluRKCp6IXt3GYaJos9/mpTG+lek7sUayZXMdFw+3M b7Yz3CL0/0c621DWwA/8KPi7HeXRCYSSdfTFVrlLyLsafcBCS0X5L0clHWpQ4OgQMZqG 2wlrkMTILXUI2K4yifp9cW485IH9Jzv1esulg/9GVpo0cPtbG/QyluQK4TWiLAUxRnFX ERhg83MyaNAUY35d2zMiku5BtGvdbK1WU24vr/bhqBZsSKhpUxBYEgzBlqWDMmOe62bL 08EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689942774; x=1690547574; 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=jSJ8+ioDhbOjX8NkR7pAaN7u0+yKoxN1/aIsUSf2rk0=; b=Tx3pyyLbtvEX4VxH1XpFAYtlC/4RdOaOc2rvrOdSRI09tcwk64dCgINC1XxFTS/RuJ 61FtwKMMHbGtRhl9+OeagMFP7V5FRZjy+zUFAWunUu1fwiloBZHHYflyMCmibFILWaHO 0DDMBzfdD/OthyA035SikZVwWPnr4y3zCNSUsIyag3e/KRNz9XlS7TZ1HK03ZSTz2XMS +XTCA7gWel59M4ZgRJ1IO3JoPU48G8GQ8pKq5bgO2d3tq/+nV4JP3BJmqHfJsRFM/zCv 9dlLWT/Xx5FCB/ka1EtoxeE19NUcss7UfKJm76eg16dPfKRumM5jDcK1b2NULhkCh34N R0Cw== X-Gm-Message-State: ABy/qLYioXndBO6RpO5dCB6FBswC7skfTSNFUodkZRSu3OzUbA8qaOSA /xCL8HanxakuTotyrM0ZzWN6fWI/i0mq3rIlaLQ= X-Google-Smtp-Source: APBJJlE0NHU1rLrI6AAtFgBVdlSnrnu43RfAbRiIl4ZIbriNhXyfNQcVDM6hU6MVLYj49ultclCN9F9pQkNzvluon08= X-Received: by 2002:a05:6102:496:b0:446:8c5a:189e with SMTP id n22-20020a056102049600b004468c5a189emr970424vsa.0.1689942774384; Fri, 21 Jul 2023 05:32:54 -0700 (PDT) MIME-Version: 1.0 References: <20230721052810.2048437-1-g.singh@nxp.com> <0d101e19-a273-a4ca-9fdd-2c0262de3528@oss.nxp.com> In-Reply-To: <0d101e19-a273-a4ca-9fdd-2c0262de3528@oss.nxp.com> From: Jerin Jacob Date: Fri, 21 Jul 2023 18:02:28 +0530 Message-ID: Subject: Re: [PATCH] bus/dpaa: fix outside array bounds error with GCC v13 To: hemant.agrawal@nxp.com Cc: Gagandeep Singh , ferruh.yigit@amd.com, dev@dpdk.org, jerinj@marvell.com, stable@dpdk.org 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 Fri, Jul 21, 2023 at 4:18=E2=80=AFPM Hemant Agrawal wrote: > > Acked-by: Hemant Agrawal Acked-by: Jerin Jacob > > On 21-Jul-23 10:58 AM, Gagandeep Singh wrote: > > Caution: This is an external email. Please take care when clicking link= s or opening attachments. When in doubt, report the message using the 'Repo= rt this email' button > > > > > > when RTE_ENABLE_ASSERT is enable, DPAA driver is doing > > wrong NULL check on frame queue which allows the code > > to have access to NULL address. > > GCC v13 is giving array bounds error if code is > > accessing any memory region less than 4KB. > > This patch fixes this issue by adding proper NULL checks > > on frame queue. > > > > Please refer: https://bugs.dpdk.org/show_bug.cgi?id=3D1233 > > > > Bugzilla ID: 1233 > > Fixes: c47ff048b99a ("bus/dpaa: add QMAN driver core routines") > > Cc: stable@dpdk.org > > > > Signed-off-by: Gagandeep Singh > > --- > > drivers/bus/dpaa/base/qbman/qman.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base= /qbman/qman.c > > index 3949bf8712..83db0a534e 100644 > > --- a/drivers/bus/dpaa/base/qbman/qman.c > > +++ b/drivers/bus/dpaa/base/qbman/qman.c > > @@ -1,7 +1,7 @@ > > /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) > > * > > * Copyright 2008-2016 Freescale Semiconductor Inc. > > - * Copyright 2017,2019 NXP > > + * Copyright 2017,2019-2023 NXP > > * > > */ > > > > @@ -897,7 +897,7 @@ static u32 __poll_portal_slow(struct qman_portal *p= , u32 is) > > /* Lookup in the retirement table */ > > fq =3D table_find_fq(p, > > be32_to_cpu(msg->fq= .fqid)); > > - DPAA_BUG_ON(!fq); > > + DPAA_BUG_ON(fq !=3D NULL); > > fq_state_change(p, fq, &swapped_msg, v= erb); > > if (fq->cb.fqs) > > fq->cb.fqs(p, fq, &swapped_msg= ); > > @@ -909,6 +909,7 @@ static u32 __poll_portal_slow(struct qman_portal *p= , u32 is) > > #else > > fq =3D (void *)(uintptr_t)msg->fq.cont= extB; > > #endif > > + DPAA_BUG_ON(fq !=3D NULL); > > fq_state_change(p, fq, msg, verb); > > if (fq->cb.fqs) > > fq->cb.fqs(p, fq, &swapped_msg= ); > > -- > > 2.25.1 > >