[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5147b618-cc2e-4edb-8e9c-978c48f2dd55@intel.com>
Date: Tue, 3 Feb 2026 17:41:50 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Harshitha Ramamurthy <hramamurthy@...gle.com>, <netdev@...r.kernel.org>
CC: <joshwash@...gle.com>, <andrew+netdev@...n.ch>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<willemb@...gle.com>, <ziweixiao@...gle.com>, <jordanrhee@...gle.com>,
<nktgrg@...gle.com>, <kuozhao@...gle.com>, <yangchun@...gle.com>,
<awogbemila@...gle.com>, <maolson@...gle.com>, <ast@...nel.org>,
<daniel@...earbox.net>, <hawk@...nel.org>, <john.fastabend@...il.com>,
<sdf@...ichev.me>, <bpf@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<stable@...r.kernel.com>, Debarghya Kundu <debarghyak@...gle.com>,
<stable@...r.kernel.org>
Subject: Re: [PATCH net 1/2] gve: Fix stats report corruption on queue count
change
On 2/2/2026 11:39 AM, Harshitha Ramamurthy wrote:
> From: Debarghya Kundu <debarghyak@...gle.com>
>
> The driver and the NIC share a region in memory for stats reporting.
> The NIC calculates its offset into this region based on the total size
> of the stats region and the size of the NIC's stats.
>
> When the number of queues is changed, the driver's stats region is
> resized. If the queue count is increased, the NIC can write past
> the end of the allocated stats region, causing memory corruption.
> If the queue count is decreased, there is a gap between the driver
> and NIC stats, leading to incorrect stats reporting.
>
> This change fixes the issue by allocating stats region with maximum
> size, and the offset calculation for NIC stats is changed to match
> with the calculation of the NIC.
>
> Cc: stable@...r.kernel.org
> Fixes: 24aeb56f2d38 ("gve: Add Gvnic stats AQ command and ethtool show/set-priv-flags.")
> Signed-off-by: Debarghya Kundu <debarghyak@...gle.com>
> Reviewed-by: Joshua Washington <joshwash@...gle.com>
> Signed-off-by: Harshitha Ramamurthy <hramamurthy@...gle.com>
> ---
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
Powered by blists - more mailing lists