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 7579FA0C41 for ; Tue, 30 Nov 2021 17:42:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F76E41190; Tue, 30 Nov 2021 17:42:02 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 0F48441170 for ; Tue, 30 Nov 2021 17:42:01 +0100 (CET) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 632FE3FFF1 for ; Tue, 30 Nov 2021 16:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290520; bh=oB+tqyjfvNXffVfaBNJiHxW1OAuWdRVST/QjQd0JYmg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Uqstrs9Xi/WCoQBa5+pOnd7zIIIL177N8X45aI9ypLka4xLr5rK7sQgHp4jew13tX 5g/CacAcuXBlyDwA0MFUZRZ788BIO5wcUVqoGR2+Y5UkXvKKAP1o0luL0Gwywp4xws ls7uLQ4CsXA/VWgenJgs5Ti5qCV8viFV8q5FRKEpHGVUfu/rMAICo6X6uY3a6PxLEv CNcfIw6OJr21r/JQgCo5GeomzGFcILnZcPLks9Y3LQAnEnLuEdzz0d1LXnnnom+xyT Z047+ZU3j0X5uYVGp0oiQhqSaoVrsBsglBDJ6ZpDheBylEJ6NH2In9bCErsMalh3N1 nJhf99qtkhWuA== Received: by mail-ed1-f69.google.com with SMTP id y9-20020aa7c249000000b003e7bf7a1579so17441192edo.5 for ; Tue, 30 Nov 2021 08:42:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oB+tqyjfvNXffVfaBNJiHxW1OAuWdRVST/QjQd0JYmg=; b=ofDR+97fqN8eCa8MalFuM+DT4CXT+7i1PjHA11biIpfosLeIxVXQUHAXohRsMW6PWa trW0coTikGhwD/Vdarc78dNExyDPiOM8eDx4sSAd9N17ySOQrtqGGUza0hxUweiXQrw1 QQpvM1rN1yZ7y8sbXLaj6T6A5j3v/bOXJTYcyjxVSCGjoXZbD9mVS3dXf2EIhpBmw+YM KEQO1fBPkp3k/GYTllAq1vYZZ7WZ6OdDHkcEEQ3B37ASsc6qg3o9J9CIfOMNdObwP0cQ rz9tXbiBfpteGtNz42AllQFQr/0RAjSFHR96rEH2JsnKfyJwwwQhiWKj00EVMBl+TNYr sSFw== X-Gm-Message-State: AOAM53250cYDIHlBWjiK0LAyoL2fP177CqdVIcIKQpqqA4zAfGhoC6+M LTvnbnSxvK1gvxVo//CfvaF/BLrlQeGOwxDF4ALYSutXMO+pabhgvtziswadkV0G58L+vvIYzGX zbUkuf1/FfLpZOlhTcmIZH4IT X-Received: by 2002:a05:6402:50d4:: with SMTP id h20mr172306edb.52.1638290520084; Tue, 30 Nov 2021 08:42:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyV+b63HQ1BlsARB9Skv1Rlupo1vZC6S9dqlt3DI6SaQN5ofnUiNK4v9A6ZDpFmGv/jQKtMkw== X-Received: by 2002:a05:6402:50d4:: with SMTP id h20mr172280edb.52.1638290519917; Tue, 30 Nov 2021 08:41:59 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id ds17sm9708918ejc.45.2021.11.30.08.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:41:59 -0800 (PST) From: christian.ehrhardt@canonical.com To: Stephen Hemminger Cc: Somnath Kotur , Ajit Khaparde , dpdk stable Subject: patch 'net/bnxt: fix firmware version query' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:35:19 +0100 Message-Id: <20211130163605.2460997-115-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/710a081d81a3fe6c28bbc67ad43b7f3050538e58 Thanks. Christian Ehrhardt --- >From 710a081d81a3fe6c28bbc67ad43b7f3050538e58 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 2 Nov 2021 14:27:44 -0700 Subject: [PATCH] net/bnxt: fix firmware version query [ upstream commit 211262d925268a3f5ac1c6a5a6610762b5ca5f5a ] UBSan testing revealed undefined shift here. The firmware returns the version in bytes; and shifting a 8 bit quantity here can lead to undefined behaviour or truncation. The fix is to promote the bytes to 32 bit before shifting. Bugzilla ID: 838 Fixes: 9a891c1764ea ("net/bnxt: update HWRM to version 1.9.2") Signed-off-by: Stephen Hemminger Acked-by: Somnath Kotur Acked-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 89f30e1b48..844f1e8cae 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1036,9 +1036,9 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout) resp->hwrm_intf_upd_8b, resp->hwrm_fw_maj_8b, resp->hwrm_fw_min_8b, resp->hwrm_fw_bld_8b, resp->hwrm_fw_rsvd_8b); - bp->fw_ver = (resp->hwrm_fw_maj_8b << 24) | - (resp->hwrm_fw_min_8b << 16) | - (resp->hwrm_fw_bld_8b << 8) | + bp->fw_ver = ((uint32_t)resp->hwrm_fw_maj_8b << 24) | + ((uint32_t)resp->hwrm_fw_min_8b << 16) | + ((uint32_t)resp->hwrm_fw_bld_8b << 8) | resp->hwrm_fw_rsvd_8b; PMD_DRV_LOG(INFO, "Driver HWRM version: %d.%d.%d\n", HWRM_VERSION_MAJOR, HWRM_VERSION_MINOR, HWRM_VERSION_UPDATE); -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:12.627744701 +0100 +++ 0115-net-bnxt-fix-firmware-version-query.patch 2021-11-30 16:50:05.938874615 +0100 @@ -1 +1 @@ -From 211262d925268a3f5ac1c6a5a6610762b5ca5f5a Mon Sep 17 00:00:00 2001 +From 710a081d81a3fe6c28bbc67ad43b7f3050538e58 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 211262d925268a3f5ac1c6a5a6610762b5ca5f5a ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 55dcb1dd6a..3fefd558d8 100644 +index 89f30e1b48..844f1e8cae 100644 @@ -27 +28 @@ -@@ -1260,9 +1260,9 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout) +@@ -1036,9 +1036,9 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)