From: sashiko-bot@kernel.org
To: "Harshitha Ramamurthy" <hramamurthy@google.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net-next v2 02/15] gve: refactor initialization with helper functions
Date: Wed, 03 Jun 2026 23:59:28 +0000 [thread overview]
Message-ID: <20260603235929.3BBE11F00899@smtp.kernel.org> (raw)
In-Reply-To: <20260602235900.3050782-3-hramamurthy@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] gve_verify_driver_compatibility() is incorrectly skipped during device reset recovery, causing the device to lose driver capability context.
--
commit 8cee6a7e999b446ef0c02854dce95bbc44f444e8
Author: Harshitha Ramamurthy <hramamurthy@google.com>
gve: refactor initialization with helper functions
This commit refactors gve_probe() and gve_init_priv() to commonize code
using helper functions gve_set_num_ntfy_blks() and gve_set_num_queues().
It also reorders code to combine lines that accomplish similar objectives
and moves setting HW-GRO and UDP GSO support into gve_init_priv().
> diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
> index 30bf6df4ebc58..b9542ef36b297 100644
> --- a/drivers/net/ethernet/google/gve/gve_main.c
> +++ b/drivers/net/ethernet/google/gve/gve_main.c
[ ... ]
> @@ -2470,18 +2437,73 @@ static int gve_init_priv(struct gve_priv *priv, bool skip_describe_device)
[ ... ]
> +static int gve_init_priv(struct gve_priv *priv, bool skip_describe_device)
> +{
> + int err;
> +
> + /* Set up the adminq */
> + err = gve_adminq_alloc(&priv->pdev->dev, priv);
> + if (err) {
> + dev_err(&priv->pdev->dev,
> + "Failed to alloc admin queue: err=%d\n", err);
> + return err;
> + }
> +
> + priv->num_registered_pages = 0;
> +
> + if (skip_describe_device)
> + goto setup_device;
> +
> + err = gve_verify_driver_compatibility(priv);
[Severity: High]
Does moving this driver compatibility check below the early-exit bypass the
critical capability handshake during reset recovery?
When a device reset occurs, the hardware clears its internal state. In the
baseline code, gve_verify_driver_compatibility() was called unconditionally
at the beginning of gve_init_priv(), ensuring the device was repopulated
with the driver's capabilities.
By placing it after the skip_describe_device check, the driver capability
handshake appears to be skipped during reset recovery. This leaves the
hardware unaware of the driver's features, which can cause it to reject
subsequent configuration commands or misinterpret descriptors, potentially
resulting in a denial of service until the module is reloaded.
Is it intentional to omit this handshake during recovery?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260602235900.3050782-1-hramamurthy@google.com?part=2
next prev parent reply other threads:[~2026-06-03 23:59 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 23:58 [PATCH net-next v2 00/15] gve: AdminQ mode related refactors Harshitha Ramamurthy
2026-06-02 23:58 ` [PATCH net-next v2 01/15] gve: don't pass in unused parameter to gve_adminq_free Harshitha Ramamurthy
2026-06-02 23:58 ` [PATCH net-next v2 02/15] gve: refactor initialization with helper functions Harshitha Ramamurthy
2026-06-03 23:59 ` sashiko-bot [this message]
2026-06-05 3:41 ` Harshitha Ramamurthy
2026-06-02 23:58 ` [PATCH net-next v2 03/15] gve: introduce gve_adminq_get_device_properties() Harshitha Ramamurthy
2026-06-02 23:58 ` [PATCH net-next v2 04/15] gve: add a few helper functions to set device properties Harshitha Ramamurthy
2026-06-02 23:58 ` [PATCH net-next v2 05/15] gve: add struct gve_device_info to hold " Harshitha Ramamurthy
2026-06-03 23:59 ` sashiko-bot
2026-06-05 3:44 ` Harshitha Ramamurthy
2026-06-02 23:58 ` [PATCH net-next v2 06/15] gve: introduce control plane operations structure Harshitha Ramamurthy
2026-06-02 23:58 ` [PATCH net-next v2 07/15] gve: introduce ctrl ops to set vectors and Qs Harshitha Ramamurthy
2026-06-02 23:58 ` [PATCH net-next v2 08/15] gve: refactor gve_init_priv for reset path Harshitha Ramamurthy
2026-06-03 23:59 ` sashiko-bot
2026-06-05 3:52 ` Harshitha Ramamurthy
2026-06-02 23:58 ` [PATCH net-next v2 09/15] gve: simplify reset logic Harshitha Ramamurthy
2026-06-03 23:59 ` sashiko-bot
2026-06-07 22:20 ` Joshua Washington
2026-06-02 23:58 ` [PATCH net-next v2 10/15] gve: add gve_ctrl_ops for gve initialization/teardown sequences Harshitha Ramamurthy
2026-06-02 23:58 ` [PATCH net-next v2 11/15] gve: split up notify block allocation and setup paths Harshitha Ramamurthy
2026-06-03 23:59 ` sashiko-bot
2026-06-07 22:29 ` Joshua Washington
2026-06-02 23:58 ` [PATCH net-next v2 12/15] gve: introduce new methods to handle IRQ doorbells Harshitha Ramamurthy
2026-06-03 23:59 ` sashiko-bot
2026-06-07 22:35 ` Joshua Washington
2026-06-02 23:58 ` [PATCH net-next v2 13/15] gve: setup and teardown management interrupts Harshitha Ramamurthy
2026-06-03 23:59 ` sashiko-bot
2026-06-07 22:39 ` Joshua Washington
2026-06-02 23:58 ` [PATCH net-next v2 14/15] gve: add ctrl ops to for queue operations Harshitha Ramamurthy
2026-06-05 3:56 ` Harshitha Ramamurthy
2026-06-02 23:58 ` [PATCH net-next v2 15/15] gve: add link status/speed ctrl ops Harshitha Ramamurthy
2026-06-03 23:59 ` sashiko-bot
2026-06-07 22:45 ` Joshua Washington
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=20260603235929.3BBE11F00899@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=hramamurthy@google.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.