patch 'common/idpf: fix PTP message validation' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Mon Aug 12 14:49:00 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=39b2b4c7de880511a0cbe5a3412d49328380b100
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 39b2b4c7de880511a0cbe5a3412d49328380b100 Mon Sep 17 00:00:00 2001
From: Soumyadeep Hore <soumyadeep.hore at intel.com>
Date: Mon, 24 Jun 2024 09:16:36 +0000
Subject: [PATCH] common/idpf: fix PTP message validation
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 420cde5c539eb8bc9936a482404fc29f4d53c5e1 ]
When the message for getting timestamp latches is sent by the driver,
number of latches is equal to 0. Current implementation of message
validation function incorrectly notifies this kind of message length as
invalid.
Fixes: 3f72f4472b57 ("common/idpf/base: initialize PTP support")
Signed-off-by: Soumyadeep Hore <soumyadeep.hore at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/common/idpf/base/virtchnl2.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/common/idpf/base/virtchnl2.h b/drivers/common/idpf/base/virtchnl2.h
index 3900b784d0..21b2039aa2 100644
--- a/drivers/common/idpf/base/virtchnl2.h
+++ b/drivers/common/idpf/base/virtchnl2.h
@@ -1872,7 +1872,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3
case VIRTCHNL2_OP_GET_PTP_CAPS:
valid_len = sizeof(struct virtchnl2_get_ptp_caps);
- if (msglen >= valid_len) {
+ if (msglen > valid_len) {
struct virtchnl2_get_ptp_caps *ptp_caps =
(struct virtchnl2_get_ptp_caps *)msg;
@@ -1888,7 +1888,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3
case VIRTCHNL2_OP_GET_PTP_TX_TSTAMP_LATCHES:
valid_len = sizeof(struct virtchnl2_ptp_tx_tstamp_latches);
- if (msglen >= valid_len) {
+ if (msglen > valid_len) {
struct virtchnl2_ptp_tx_tstamp_latches *tx_tstamp_latches =
(struct virtchnl2_ptp_tx_tstamp_latches *)msg;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-12 20:44:04.638477030 +0800
+++ 0063-common-idpf-fix-PTP-message-validation.patch 2024-08-12 20:44:02.135069302 +0800
@@ -1 +1 @@
-From 420cde5c539eb8bc9936a482404fc29f4d53c5e1 Mon Sep 17 00:00:00 2001
+From 39b2b4c7de880511a0cbe5a3412d49328380b100 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 420cde5c539eb8bc9936a482404fc29f4d53c5e1 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index e76ccbd46f..24a8b37876 100644
+index 3900b784d0..21b2039aa2 100644
@@ -24 +26 @@
-@@ -2272,7 +2272,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3
+@@ -1872,7 +1872,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3
@@ -33 +35 @@
-@@ -2288,7 +2288,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3
+@@ -1888,7 +1888,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3
More information about the stable
mailing list