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 159CF41C5F for ; Fri, 10 Feb 2023 10:42:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DABD40EE6; Fri, 10 Feb 2023 10:42:05 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 8D5E840687 for ; Fri, 10 Feb 2023 10:42:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676022123; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qVaCLQB3o3XHg06N5VFVZlk3OFr1EjOmG01I1XCHkIE=; b=J7S0tnG9FGV+e5O2BG+Scq1AkWrdgxZnnvydAMlvtJkZ7BXYReg3PdYX9QMVLPVBW9H4CU VPJS0zz0z3KFwFx5RA1KZEuF1VH7yTgRhLN1YZCQPVQO0YlOgBHX++A6JaNIRiSUSWC2Jf r9CPcinxqHb9D9wkDwI0UYv0VXeZzt0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-9-qZNqPMe6NoWRGOyumGV3BA-1; Fri, 10 Feb 2023 04:42:00 -0500 X-MC-Unique: qZNqPMe6NoWRGOyumGV3BA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7C05185A588; Fri, 10 Feb 2023 09:41:59 +0000 (UTC) Received: from [10.39.208.26] (unknown [10.39.208.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 888E0400DEF3; Fri, 10 Feb 2023 09:41:58 +0000 (UTC) Message-ID: <98a1515b-d844-f7ba-27e7-9f539d4c3500@redhat.com> Date: Fri, 10 Feb 2023 10:41:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v1 7/9] baseband/acc: fix potential arithmetic overflow Fix potential issue of overflow causing coverity warning. To: Nicolas Chautru , dev@dpdk.org Cc: hernan.vargas@intel.com, stable@dpdk.org References: <20230209221929.265059-1-nicolas.chautru@intel.com> <20230209221929.265059-8-nicolas.chautru@intel.com> From: Maxime Coquelin In-Reply-To: <20230209221929.265059-8-nicolas.chautru@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org There seems to be formatting issue of the commit log, the commit message is appended to the title. On 2/9/23 23:19, Nicolas Chautru wrote: > Coverity issue: 383154 > Fixes: 8e16839937 ("baseband/acc: extension of the device structure") > Cc: stable@dpdk.org > > Signed-off-by: Nicolas Chautru > --- > drivers/baseband/acc/rte_vrb_pmd.c | 2 +- > drivers/baseband/acc/vrb_pmd.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) With commit log fixed: Reviewed-by: Maxime Coquelin Thanks, Maxime > diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c > index 0bd5c65177..8fcb06b4ff 100644 > --- a/drivers/baseband/acc/rte_vrb_pmd.c > +++ b/drivers/baseband/acc/rte_vrb_pmd.c > @@ -518,7 +518,7 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) > if (d->tail_ptrs == NULL) > d->tail_ptrs = rte_zmalloc_socket( > dev->device->driver->name, > - d->num_qgroups * d->num_aqs * sizeof(uint32_t), > + VRB_MAX_QGRPS * VRB_MAX_AQS * sizeof(uint32_t), > RTE_CACHE_LINE_SIZE, socket_id); > if (d->tail_ptrs == NULL) { > rte_bbdev_log(ERR, "Failed to allocate tail ptr for %s:%u", > diff --git a/drivers/baseband/acc/vrb_pmd.h b/drivers/baseband/acc/vrb_pmd.h > index f3c9239881..01028273e7 100644 > --- a/drivers/baseband/acc/vrb_pmd.h > +++ b/drivers/baseband/acc/vrb_pmd.h > @@ -36,6 +36,7 @@ > > #define VRB_NUM_ACCS 6 > #define VRB_MAX_QGRPS 32 > +#define VRB_MAX_AQS 32 > > #define ACC_STATUS_WAIT 10 > #define ACC_STATUS_TO 100