From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net,
Peter Spreadborough <peter.spreadborough@broadcom.com>
Subject: [PATCH 08/11] net/bnxt: address coverity overflow issues
Date: Wed, 5 Feb 2025 09:20:01 -0800 [thread overview]
Message-ID: <20250205172004.50395-9-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20250205172004.50395-1-ajit.khaparde@broadcom.com>
From: Peter Spreadborough <peter.spreadborough@broadcom.com>
This change addresses the CID 449058: Integer handling issues
(OVERFLOW_BEFORE_WIDEN) reported by coverity.
Coverity issue: 449058
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c b/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
index 1770069295..c29933b803 100644
--- a/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
+++ b/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
@@ -468,7 +468,7 @@ static int alloc_link_pbl(struct tfc_ts_mem_cfg *mem_cfg, uint32_t page_size,
* and page tables. The allocation will occur once only per backing
* store and will located by name and reused on subsequent runs.
*/
- total_size = page_size * total_pages;
+ total_size = (uint64_t)page_size * (uint64_t)total_pages;
if (total_size <= (1024 * 256))
mz_size = RTE_MEMZONE_256KB;
--
2.39.5 (Apple Git-154)
next prev parent reply other threads:[~2025-02-05 17:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 17:19 [PATCH 00/11] bnxt patch set Ajit Khaparde
2025-02-05 17:19 ` [PATCH 01/11] net/bnxt: disable TruFlow if compressed CQE is set Ajit Khaparde
2025-02-05 17:19 ` [PATCH 02/11] net/bnxt: simplify check for CQE mode Ajit Khaparde
2025-02-05 17:19 ` [PATCH 03/11] net/bnxt: fix Rx handler Ajit Khaparde
2025-02-05 17:19 ` [PATCH 04/11] net/bnxt: set burst handler correctly Ajit Khaparde
2025-02-05 17:19 ` [PATCH 05/11] net/bnxt/truFlow: Fix seg fault when rep are re-attached Ajit Khaparde
2025-02-05 17:19 ` [PATCH 06/11] net/bnxt: address coverity deadcode issue Ajit Khaparde
2025-02-05 17:20 ` [PATCH 07/11] net/bnxt: address coverity checked return issues Ajit Khaparde
2025-02-05 17:20 ` Ajit Khaparde [this message]
2025-02-05 17:20 ` [PATCH 09/11] net/bnxt: address coverity integer overflow issues Ajit Khaparde
2025-02-05 17:20 ` [PATCH 10/11] net/bnxt: address coverity uninitialized variables issues Ajit Khaparde
2025-02-05 17:20 ` [PATCH 11/11] net/bnxt: address coverity control flow issues Ajit Khaparde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250205172004.50395-9-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=peter.spreadborough@broadcom.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).