From: Joshua Washington <joshwash@google.com>
To: Jeroen de Borst <jeroendb@google.com>,
Joshua Washington <joshwash@google.com>,
Rushil Gupta <rushilg@google.com>,
Ferruh Yigit <ferruh.yigit@amd.com>
Cc: dev@dpdk.org, stable@dpdk.org, Mark Blasko <blasko@google.com>
Subject: [PATCH 1/9] net/gve: clear out shared memory region for stats report
Date: Wed, 1 Jul 2026 11:35:19 -0700 [thread overview]
Message-ID: <20260701183528.2443032-2-joshwash@google.com> (raw)
In-Reply-To: <20260701183528.2443032-1-joshwash@google.com>
The stats report memzone is allocated from hugepage memory which could
possibly have had sensitive data from a previous DPDK invocation.
Clear out the buffer before sharing the memory region with the virtual
device to protect guest memory.
Fixes: 458b53dec01e ("net/gve: enable imissed stats for GQ format")
Cc: stable@dpdk.org
Signed-off-by: Joshua Washington <joshwash@google.com>
Reviewed-by: Mark Blasko <blasko@google.com>
---
drivers/net/gve/gve_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
index 0b02dcb3ad..f73784a109 100644
--- a/drivers/net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -306,6 +306,8 @@ gve_alloc_stats_report(struct gve_priv *priv,
if (!priv->stats_report_mem)
return -ENOMEM;
+ memset(priv->stats_report_mem->addr, 0, priv->stats_report_mem->len);
+
/* offset by skipping stats written by gve. */
priv->stats_start_idx = (GVE_TX_STATS_REPORT_NUM * nb_tx_queues) +
(GVE_RX_STATS_REPORT_NUM * nb_rx_queues);
--
2.55.0.rc0.799.gd6f94ed593-goog
next prev parent reply other threads:[~2026-07-01 18:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 18:35 [PATCH 0/9] Stability fixes for GVE Joshua Washington
2026-07-01 18:35 ` Joshua Washington [this message]
2026-07-01 18:35 ` [PATCH 2/9] net/gve: delay adding mbuf head to software ring Joshua Washington
2026-07-01 18:35 ` [PATCH 3/9] net/gve: copy data to QPL buffer when mbuf read does not Joshua Washington
2026-07-01 18:35 ` [PATCH 4/9] net/gve: validate buf ID before processing Rx packet Joshua Washington
2026-07-01 18:35 ` [PATCH 5/9] net/gve: set mbuf to null in software ring after use Joshua Washington
2026-07-01 18:35 ` [PATCH 6/9] net/gve: free ctx mbuf if packet dropped after first segment Joshua Washington
2026-07-01 18:35 ` [PATCH 7/9] net/gve: increase range of DMA memzone ids to 64 bits Joshua Washington
2026-07-01 18:35 ` [PATCH 8/9] net/gve: don't reset ring size bounds to default on reset Joshua Washington
2026-07-01 18:35 ` [PATCH 9/9] net/gve: restrict max ring size in GQ QPL to 2K Joshua Washington
2026-07-01 18:50 ` [PATCH 0/9] Stability fixes for GVE Stephen Hemminger
2026-07-01 19:59 ` Joshua Washington
2026-07-03 4:36 ` Stephen Hemminger
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=20260701183528.2443032-2-joshwash@google.com \
--to=joshwash@google.com \
--cc=blasko@google.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=jeroendb@google.com \
--cc=rushilg@google.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