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 937A342ED9; Fri, 21 Jul 2023 12:48:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F3AF40DDC; Fri, 21 Jul 2023 12:48:00 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2080.outbound.protection.outlook.com [40.107.15.80]) by mails.dpdk.org (Postfix) with ESMTP id 0D0E340DD8; Fri, 21 Jul 2023 12:47:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SQ0mPfBOyyXb17Hh0u8lJEOinKarZy1DdKIzyZKQc7+k6HV+JdGbS4M576Bnpp84dGMJaebZb4VvqPK5DByGEwnUa4+sYWCEpifc949CrlfBgIU7au1pEjr2klbFSEvks7nBxg2oEl+8BsISuNywZZJEZgo/DZXNf0dEtwy3IV/kUZGDjCE0FffyrSDZb2Hxm+aphwrih+BZMelqODgnaxfnxpqkm65TM5mSsBfR1FgnO/bPhaRE0v7ORfajzrYPM0iU9NrsSTpUQU3yJ8GPitfwSBOPq0MSX2Hut2lbGxhXwf1xCkvpkxBQZbNr4VNhdUHmPTvJxIZvy6rWLWDFoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0JtKnMo6FKtPfpaM0YRD9vhUSH2LY2nnR/5ENqvI5ZI=; b=nT+OgmDrBuUw7ckiH0N5yHxfvAzzff1eis1fqPlR4fRAFExuQOZ9tUNzULk1dm/hHkAZIBW0bP8nlqlqcEBiZmdYjNtXHc3DI9W+Kd+DX/pi23AYC9ztfkTcgVKfsBNtKRMm+ijnzvScaEozgrv1Iwp+BSjBCt27uRa0e+EZug3WdAqBHtB4KC3UIV8QDdQNT/Qna8pNbiYeNY+A9VHUx1w6O2KJd+7qK+uzHi4mBgmkJNTEMdCzM7o/Eaz67CP/4kVEWxGqkv+FGIeMLl4N9hbJxXH8t6zD8czgyFnPulv1b27K9ReRxftDqY0Suj/EyX9r8A6NRvzXbWEFF9wyaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0JtKnMo6FKtPfpaM0YRD9vhUSH2LY2nnR/5ENqvI5ZI=; b=UyGbilpkRZ9zv1FSR0ds1dTzYEAcnq4u+8/HA28Md5tQOlXm0yuTjWioSL6ZPd+1w41u8wDSE/WQbTLSn8F+u3Q3ey/v5vcXGfocaouTly5GmLyU1rfNxQkqQWYGs7g6aTRMjIuuHKmWvV87HUXHY66W64DJ6k2uOtLFc95QQ7E= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by PA4PR04MB7726.eurprd04.prod.outlook.com (2603:10a6:102:ea::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.24; Fri, 21 Jul 2023 10:47:57 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::450d:89ac:4f6a:6ae2]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::450d:89ac:4f6a:6ae2%4]) with mapi id 15.20.6609.026; Fri, 21 Jul 2023 10:47:57 +0000 Message-ID: <0d101e19-a273-a4ca-9fdd-2c0262de3528@oss.nxp.com> Date: Fri, 21 Jul 2023 16:17:48 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] bus/dpaa: fix outside array bounds error with GCC v13 To: Gagandeep Singh , ferruh.yigit@amd.com, dev@dpdk.org Cc: jerinj@marvell.com, stable@dpdk.org References: <20230721052810.2048437-1-g.singh@nxp.com> Content-Language: en-US From: Hemant Agrawal In-Reply-To: <20230721052810.2048437-1-g.singh@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SI2PR02CA0003.apcprd02.prod.outlook.com (2603:1096:4:194::13) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|PA4PR04MB7726:EE_ X-MS-Office365-Filtering-Correlation-Id: 6db0ab86-326a-4dfb-75bf-08db89d7f19e X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nE18+PrlahDTKMxO5Bqf9lGPs85nIObzd/9aCCbj6eL5U847XB+D+7vB63sjINOB8puFEza67YDGwvaXzwZgYi4MAU7hKxhU68QFudoC6vFaXOk071y/K6y4Zr6m+FUbit1UbWjwFXR+/ePDvjpsrM/ze+vXx7erCgyg2Y4Nc5gqipAJSIOPNjQowow6Hn0xIKeqxbNOckJZ4Ny3vw42O86QhAHWHWNfQiW57QzERiI7QNFC/VDi2DI+RE1KRy1Rk8weunEcdfCyBvnS0IY9DnMDIq7yeD856EcdKe8Vnrbo/vL1704hGcIeNX13Or8B+nQF+fTd1GjnjC9lI2aOdn7sLH3fkPksbIPIkIDEgHCO5uQCoasAaxbgZw99HthVfCBXmHCMBzScq1N4YDVK3kpPfp12i3mT25+gnvKSED5njFiG8LvdMJ89GCss5Hbp+fV92JxSNYgxQoGH2W4KGm6pIZbM5bIlUD9YHvFji+1QQNPDXTK7jaNwDGTKc5eSZjAnAKpLbq8JzZ4IlPFw9lBLIYj/P6Sf6Sjo+ZbiR0xP2DleuOSqAWHiP6UEVXW5TH5NmJWCW+16LNvrSmV0C/1aIhj1WHLWv4cqKrTqYpBo+8QRp/MfdDy1Rd2a67unBen8/KDRXqRNNVYsNd+C3g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(396003)(39860400002)(366004)(346002)(376002)(451199021)(5660300002)(8936002)(8676002)(44832011)(26005)(186003)(86362001)(6506007)(6666004)(478600001)(41300700001)(6486002)(316002)(66556008)(966005)(66476007)(6512007)(4326008)(38100700002)(66946007)(55236004)(53546011)(2906002)(31686004)(83380400001)(2616005)(31696002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Z0RIdHZtWjAxN0VrVUNoZXVHZURTbkZuRVZ0TWxtNWZPZTRmZVFxOS9ySXdP?= =?utf-8?B?NVp6ZitMbEZvNUNhR0ZzRTBYbC80cDFRblVjNHFLanpuVXUzNWxJcUFGblAz?= =?utf-8?B?cUVtZ0h6UDZIZ21UNkIrVVRyVGVVWjErNHJXa0tOSWpGdzBZTlJ6ZHVDZElB?= =?utf-8?B?TmhTZSsxMDRzdlhsRG5CaXRvWDdBSkZvZzlEYiszSXdhUDNRUmZaWFU2WFQr?= =?utf-8?B?bEdsTG1zcDljQ3FNcU5Ed3NZUVVIT29SU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ZwZDF1d0ZjT0lRSzJFdDNsUGViYWVEa2gySHRRT0xsYWJNc3A4?= =?utf-8?B?VWtPYXBmSlV6RzVQVlJ3R2poNWVIZWpCTkFWTWFzUGRHVVhacUhISVkzU0d4?= =?utf-8?B?RHc9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6db0ab86-326a-4dfb-75bf-08db89d7f19e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2023 10:47:57.1122 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PmP3jcq9CBaeCtwaKQMIVLyZkwxPxB0M/I55KusweJXyfUaqCxzCaRFpHBqQlvvXI5H5HyJ+K9ZHkRL3/Q6/Zg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 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: , Reply-To: hemant.agrawal@nxp.com Errors-To: dev-bounces@dpdk.org Acked-by: Hemant Agrawal On 21-Jul-23 10:58 AM, Gagandeep Singh wrote: > Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report 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=1233 > > 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 = table_find_fq(p, > be32_to_cpu(msg->fq.fqid)); > - DPAA_BUG_ON(!fq); > + DPAA_BUG_ON(fq != NULL); > fq_state_change(p, fq, &swapped_msg, verb); > 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 = (void *)(uintptr_t)msg->fq.contextB; > #endif > + DPAA_BUG_ON(fq != NULL); > fq_state_change(p, fq, msg, verb); > if (fq->cb.fqs) > fq->cb.fqs(p, fq, &swapped_msg); > -- > 2.25.1 >