From: luca.boccassi@gmail.com
To: Hernan Vargas <hernan.vargas@intel.com>
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>,
dpdk stable <stable@dpdk.org>
Subject: patch 'baseband/acc: fix access to deallocated mem' has been queued to stable release 22.11.7
Date: Wed, 23 Oct 2024 22:16:08 +0100 [thread overview]
Message-ID: <20241023211704.1216956-28-luca.boccassi@gmail.com> (raw)
In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com>
Hi,
FYI, your patch has been queued to stable release 22.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/25/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://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e8d41d4db2561550810000b00b6c6775907833c3
Thanks.
Luca Boccassi
---
From e8d41d4db2561550810000b00b6c6775907833c3 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Wed, 9 Oct 2024 14:12:51 -0700
Subject: [PATCH] baseband/acc: fix access to deallocated mem
[ upstream commit a090b8ffe73ed21d54e17e5d5711d2e817d7229e ]
Prevent op_addr access during queue_stop operation, as this memory may
have been deallocated.
Fixes: e640f6cdfa84 ("baseband/acc200: add LDPC processing")
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/baseband/acc/rte_acc100_pmd.c | 36 --------------------------
drivers/baseband/acc/rte_acc200_pmd.c | 37 +--------------------------
2 files changed, 1 insertion(+), 72 deletions(-)
diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index 955c0236e4..a5b1bb66eb 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -837,51 +837,15 @@ free_q:
return ret;
}
-static inline void
-acc100_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
- uint16_t index)
-{
- if (op == NULL)
- return;
- if (op_type == RTE_BBDEV_OP_LDPC_DEC)
- rte_bbdev_log(DEBUG,
- " Op 5GUL %d %d %d %d %d %d %d %d %d %d %d %d",
- index,
- op->ldpc_dec.basegraph, op->ldpc_dec.z_c,
- op->ldpc_dec.n_cb, op->ldpc_dec.q_m,
- op->ldpc_dec.n_filler, op->ldpc_dec.cb_params.e,
- op->ldpc_dec.op_flags, op->ldpc_dec.rv_index,
- op->ldpc_dec.iter_max, op->ldpc_dec.iter_count,
- op->ldpc_dec.harq_combined_input.length
- );
- else if (op_type == RTE_BBDEV_OP_LDPC_ENC) {
- struct rte_bbdev_enc_op *op_dl = (struct rte_bbdev_enc_op *) op;
- rte_bbdev_log(DEBUG,
- " Op 5GDL %d %d %d %d %d %d %d %d %d",
- index,
- op_dl->ldpc_enc.basegraph, op_dl->ldpc_enc.z_c,
- op_dl->ldpc_enc.n_cb, op_dl->ldpc_enc.q_m,
- op_dl->ldpc_enc.n_filler, op_dl->ldpc_enc.cb_params.e,
- op_dl->ldpc_enc.op_flags, op_dl->ldpc_enc.rv_index
- );
- }
-}
-
static int
acc100_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
{
struct acc_queue *q;
- struct rte_bbdev_dec_op *op;
- uint16_t i;
q = dev->data->queues[queue_id].queue_private;
rte_bbdev_log(INFO, "Queue Stop %d H/T/D %d %d %x OpType %d",
queue_id, q->sw_ring_head, q->sw_ring_tail,
q->sw_ring_depth, q->op_type);
- for (i = 0; i < q->sw_ring_depth; ++i) {
- op = (q->ring_addr + i)->req.op_addr;
- acc100_print_op(op, q->op_type, i);
- }
/* ignore all operations in flight and clear counters */
q->sw_ring_tail = q->sw_ring_head;
q->aq_enqueued = 0;
diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index 8bda3a8e07..f2b7172e71 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -924,51 +924,16 @@ free_q:
return ret;
}
-static inline void
-acc200_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
- uint16_t index)
-{
- if (op == NULL)
- return;
- if (op_type == RTE_BBDEV_OP_LDPC_DEC)
- rte_bbdev_log(INFO,
- " Op 5GUL %d %d %d %d %d %d %d %d %d %d %d %d",
- index,
- op->ldpc_dec.basegraph, op->ldpc_dec.z_c,
- op->ldpc_dec.n_cb, op->ldpc_dec.q_m,
- op->ldpc_dec.n_filler, op->ldpc_dec.cb_params.e,
- op->ldpc_dec.op_flags, op->ldpc_dec.rv_index,
- op->ldpc_dec.iter_max, op->ldpc_dec.iter_count,
- op->ldpc_dec.harq_combined_input.length
- );
- else if (op_type == RTE_BBDEV_OP_LDPC_ENC) {
- struct rte_bbdev_enc_op *op_dl = (struct rte_bbdev_enc_op *) op;
- rte_bbdev_log(INFO,
- " Op 5GDL %d %d %d %d %d %d %d %d %d",
- index,
- op_dl->ldpc_enc.basegraph, op_dl->ldpc_enc.z_c,
- op_dl->ldpc_enc.n_cb, op_dl->ldpc_enc.q_m,
- op_dl->ldpc_enc.n_filler, op_dl->ldpc_enc.cb_params.e,
- op_dl->ldpc_enc.op_flags, op_dl->ldpc_enc.rv_index
- );
- }
-}
-
/* Stop ACC200 queue and clear counters. */
static int
acc200_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
{
struct acc_queue *q;
- struct rte_bbdev_dec_op *op;
- uint16_t i;
+
q = dev->data->queues[queue_id].queue_private;
rte_bbdev_log(INFO, "Queue Stop %d H/T/D %d %d %x OpType %d",
queue_id, q->sw_ring_head, q->sw_ring_tail,
q->sw_ring_depth, q->op_type);
- for (i = 0; i < q->sw_ring_depth; ++i) {
- op = (q->ring_addr + i)->req.op_addr;
- acc200_print_op(op, q->op_type, i);
- }
/* ignore all operations in flight and clear counters */
q->sw_ring_tail = q->sw_ring_head;
q->aq_enqueued = 0;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.588552062 +0100
+++ 0028-baseband-acc-fix-access-to-deallocated-mem.patch 2024-10-23 22:16:40.463941341 +0100
@@ -1 +1 @@
-From a090b8ffe73ed21d54e17e5d5711d2e817d7229e Mon Sep 17 00:00:00 2001
+From e8d41d4db2561550810000b00b6c6775907833c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a090b8ffe73ed21d54e17e5d5711d2e817d7229e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,3 +16,3 @@
- drivers/baseband/acc/rte_acc100_pmd.c | 36 ----------------------
- drivers/baseband/acc/rte_vrb_pmd.c | 44 +--------------------------
- 2 files changed, 1 insertion(+), 79 deletions(-)
+ drivers/baseband/acc/rte_acc100_pmd.c | 36 --------------------------
+ drivers/baseband/acc/rte_acc200_pmd.c | 37 +--------------------------
+ 2 files changed, 1 insertion(+), 72 deletions(-)
@@ -20 +21 @@
-index 5e6ee85e13..c690d1492b 100644
+index 955c0236e4..a5b1bb66eb 100644
@@ -23 +24 @@
-@@ -838,51 +838,15 @@ free_q:
+@@ -837,51 +837,15 @@ free_q:
@@ -75,5 +76,5 @@
-diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
-index 646c12ad5c..e3f98d6e42 100644
---- a/drivers/baseband/acc/rte_vrb_pmd.c
-+++ b/drivers/baseband/acc/rte_vrb_pmd.c
-@@ -1048,58 +1048,16 @@ free_q:
+diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
+index 8bda3a8e07..f2b7172e71 100644
+--- a/drivers/baseband/acc/rte_acc200_pmd.c
++++ b/drivers/baseband/acc/rte_acc200_pmd.c
+@@ -924,51 +924,16 @@ free_q:
@@ -84 +85 @@
--vrb_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
+-acc200_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
@@ -110,7 +110,0 @@
-- } else if (op_type == RTE_BBDEV_OP_MLDTS) {
-- struct rte_bbdev_mldts_op *op_mldts = (struct rte_bbdev_mldts_op *) op;
-- rte_bbdev_log(INFO, " Op MLD %d RBs %d NL %d Rp %d %d %x",
-- index,
-- op_mldts->mldts.num_rbs, op_mldts->mldts.num_layers,
-- op_mldts->mldts.r_rep,
-- op_mldts->mldts.c_rep, op_mldts->mldts.op_flags);
@@ -120 +114 @@
- /* Stop queue and clear counters. */
+ /* Stop ACC200 queue and clear counters. */
@@ -122 +116 @@
- vrb_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
+ acc200_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
@@ -134 +128 @@
-- vrb_print_op(op, q->op_type, i);
+- acc200_print_op(op, q->op_type, i);
next prev parent reply other threads:[~2024-10-23 21:18 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' " luca.boccassi
2024-10-23 21:15 ` patch 'eal/x86: fix 32-bit write combining store' " luca.boccassi
2024-10-23 21:15 ` patch 'examples/eventdev: fix queue crash with generic pipeline' " luca.boccassi
2024-10-23 21:15 ` patch 'crypto/dpaa2_sec: fix memory leak' " luca.boccassi
2024-10-23 21:15 ` patch 'common/dpaax/caamflib: fix PDCP SNOW-ZUC watchdog' " luca.boccassi
2024-10-23 21:15 ` patch 'dev: fix callback lookup when unregistering device' " luca.boccassi
2024-10-23 21:15 ` patch 'examples/ipsec-secgw: fix dequeue count from cryptodev' " luca.boccassi
2024-10-23 21:15 ` patch 'bpf: fix free function mismatch if convert fails' " luca.boccassi
2024-10-23 21:15 ` patch 'baseband/la12xx: fix use after free in modem config' " luca.boccassi
2024-10-23 21:15 ` patch 'crypto/bcmfs: fix free function mismatch' " luca.boccassi
2024-10-23 21:15 ` patch 'dma/idxd: fix free function mismatch in device probe' " luca.boccassi
2024-10-23 21:15 ` patch 'event/cnxk: fix free function mismatch in port config' " luca.boccassi
2024-10-23 21:15 ` patch 'net/e1000: fix use after free in filter flush' " luca.boccassi
2024-10-23 21:15 ` patch 'net/nfp: fix double free in flow destroy' " luca.boccassi
2024-10-23 21:15 ` patch 'net/sfc: fix use after free in debug logs' " luca.boccassi
2024-10-23 21:15 ` patch 'raw/ifpga/base: fix use after free' " luca.boccassi
2024-10-23 21:15 ` patch 'raw/ifpga: fix free function mismatch in interrupt config' " luca.boccassi
2024-10-23 21:15 ` patch 'examples/vhost: fix free function mismatch' " luca.boccassi
2024-10-23 21:15 ` patch 'net/nfb: fix use after free' " luca.boccassi
2024-10-23 21:16 ` patch 'power: enable CPPC' " luca.boccassi
2024-10-23 21:16 ` patch 'fib6: add runtime checks in AVX512 lookup' " luca.boccassi
2024-10-23 21:16 ` patch 'app/dumpcap: fix handling of jumbo frames' " luca.boccassi
2024-10-23 21:16 ` patch 'net/cnxk: fix Rx timestamp handling for VF' " luca.boccassi
2024-10-23 21:16 ` patch 'net/cnxk: fix Rx offloads to handle timestamp' " luca.boccassi
2024-10-23 21:16 ` patch 'event/cnxk: fix Rx timestamp handling' " luca.boccassi
2024-10-23 21:16 ` patch 'common/cnxk: fix CPT HW word size for outbound SA' " luca.boccassi
2024-10-23 21:16 ` patch 'common/cnxk: fix base log level' " luca.boccassi
2024-10-23 21:16 ` luca.boccassi [this message]
2024-10-23 21:16 ` patch 'vhost: fix offset while mapping log base address' " luca.boccassi
2024-10-23 21:16 ` patch 'vdpa: update used flags in used ring relay' " luca.boccassi
2024-10-23 21:16 ` patch 'net/virtio-user: reset used index counter' " luca.boccassi
2024-10-23 21:16 ` patch 'fib: fix AVX512 lookup' " luca.boccassi
2024-10-23 21:16 ` patch 'net/e1000: fix link status crash in secondary process' " luca.boccassi
2024-10-23 21:16 ` patch 'net/iavf: fix crash when link is unstable' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: fix link speed for 200G' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: fix iteration of TLVs in Preserved Fields Area' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ixgbe/base: fix unchecked return value' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix setting flags in init function' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix misleading debug logs and comments' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix blinking X722 with X557 PHY' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix DDP loading with reserved track ID' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix repeated register dumps' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix unchecked return value' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix loop bounds' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e: fix AVX-512 pointer copy on 32-bit' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ice: " luca.boccassi
2024-10-23 21:16 ` patch 'net/iavf: " luca.boccassi
2024-10-23 21:16 ` patch 'net/tap: avoid memcpy with null argument' " luca.boccassi
2024-10-23 21:16 ` patch 'app/testpmd: remove unnecessary cast' " luca.boccassi
2024-10-23 21:16 ` patch 'net/pcap: set live interface as non-blocking' " luca.boccassi
2024-10-23 21:16 ` patch 'net/mana: support rdma-core via pkg-config' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ena: revert redefining memcpy' " luca.boccassi
2024-10-23 21:16 ` patch 'net/hns3: remove some basic address dump' " luca.boccassi
2024-10-23 21:16 ` patch 'net/hns3: fix dump counter of registers' " luca.boccassi
2024-10-23 21:16 ` patch 'ethdev: fix overflow in descriptor count' " luca.boccassi
2024-10-23 21:16 ` patch 'bus/dpaa: fix PFDRs leaks due to FQRNIs' " luca.boccassi
2024-10-23 21:16 ` patch 'net/dpaa: fix typecasting channel ID' " luca.boccassi
2024-10-23 21:16 ` patch 'bus/dpaa: fix VSP for 1G fm1-mac9 and 10' " luca.boccassi
2024-10-23 21:16 ` patch 'bus/dpaa: fix the fman details status' " luca.boccassi
2024-10-23 21:16 ` patch 'net/dpaa: fix reallocate mbuf handling' " luca.boccassi
2024-10-23 21:16 ` patch 'net/memif: fix buffer overflow in zero copy Rx' " luca.boccassi
2024-10-23 21:16 ` patch 'net/tap: restrict maximum number of MP FDs' " luca.boccassi
2024-10-23 21:16 ` patch 'ethdev: verify queue ID in Tx done cleanup' " luca.boccassi
2024-10-23 21:16 ` patch 'net/hns3: verify reset type from firmware' " luca.boccassi
2024-10-23 21:16 ` patch 'net/nfp: fix link change return value' " luca.boccassi
2024-10-23 21:16 ` patch 'net/pcap: fix blocking Rx' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: add bounds check' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: fix VLAN replay after reset' " luca.boccassi
2024-10-23 21:16 ` patch 'net/iavf: preserve MAC address with i40e PF Linux driver' " luca.boccassi
2024-10-23 21:16 ` patch 'net/mlx5: workaround list management of Rx queue control' " luca.boccassi
2024-10-23 21:16 ` patch 'net/mlx5: fix number of supported flex parsers' " luca.boccassi
2024-10-23 21:16 ` patch 'app/testpmd: remove flex item init command leftover' " luca.boccassi
2024-10-23 21:16 ` patch 'net/mlx5: fix next protocol validation after flex item' " luca.boccassi
2024-10-23 21:16 ` patch 'build: remove version check on compiler links function' " luca.boccassi
2024-10-23 21:16 ` patch 'hash: fix thash LFSR initialization' " luca.boccassi
2024-10-23 21:16 ` patch 'dmadev: fix potential null pointer access' " luca.boccassi
2024-10-23 21:16 ` patch 'net/gve/base: fix build with Fedora Rawhide' " luca.boccassi
2024-10-23 21:16 ` patch 'power: fix mapped lcore ID' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ionic: fix build on Fedora Rawhide' " luca.boccassi
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=20241023211704.1216956-28-luca.boccassi@gmail.com \
--to=luca.boccassi@gmail.com \
--cc=hernan.vargas@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
/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).