All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v4 0/2] gve: fix RX page refcount overflow with the pagecnt bias
@ 2026-11-06 11:45 Amaan Cheval
  2026-11-06 11:45 ` [PATCH net v4 1/2] gve: block XDP on the DQO-QPL queue format Amaan Cheval
  2026-11-06 11:45 ` [PATCH net v4 2/2] gve: fix RX page refcount overflow from the pagecnt bias Amaan Cheval
  0 siblings, 2 replies; 8+ messages in thread
From: Amaan Cheval @ 2026-11-06 11:45 UTC (permalink / raw)
  To: netdev
  Cc: joshwash, hramamurthy, andrew+netdev, davem, edumazet, kuba,
	pabeni, bcf, jordanrhee, przemyslaw.kitszel, maciej.fijalkowski,
	pkaligineedi, maolson, csully, willemb, yangchun, npl, awogbemila,
	shailend, nktgrg, maxyuan, bpf, john.fastabend, hawk, sdf, daniel,
	ast, linux-kernel, stable, Amaan Cheval

gve's GQI and DQO-QPL RX paths bias every RX page's refcount to INT_MAX,
so a single get_page() from the stack, e.g. splice() of received data,
overflows it: splice/tee fail with EIO/EFAULT and GQI can reset the
NIC. Patch 2 lowers the bias to USHRT_MAX, as other drivers do.

With the smaller bias the driver gives up its last reference on a page
once every USHRT_MAX handoffs instead of once every INT_MAX, which is
only safe while every consumer holds its reference until the buffer is
recycled. That is not the case for an XDP_REDIRECT from DQO-QPL to an
AF_XDP socket in copy mode, a path the driver never meant to support:
commit d8a8ca14c937 dropped the queue_format check that used to refuse
it. Patch 1 restores that check for DQO-QPL, so patch 2 depends on it.
Trees before 6.17 still have the old check, so there patch 2 stands
alone.

Harshitha mentioned on v2 that Google would send a patch blocking XDP
on DQO-QPL; if one is already in flight I'm happy to drop patch 1 in
its favour.

v4:
 - Add patch 1/2 blocking XDP on DQO-QPL (Sashiko).
 - Say "overflow" instead of "headroom"; use USHRT_MAX directly instead
   of a macro (Maciej).
 - Say which trees need patch 1, for stable.
v3: https://lore.kernel.org/netdev/20261103090651.35399-1-amaan.cheval@gmail.com/
v2: https://lore.kernel.org/netdev/20261102112613.18334-1-amaan.cheval@gmail.com/
v1: https://lore.kernel.org/netdev/20261031173449.2439047-1-amaan.cheval@gmail.com/


Amaan Cheval (2):
  gve: block XDP on the DQO-QPL queue format
  gve: fix RX page refcount overflow from the pagecnt bias

 drivers/net/ethernet/google/gve/gve.h                |  2 +-
 .../net/ethernet/google/gve/gve_buffer_mgmt_dqo.c    |  4 ++--
 drivers/net/ethernet/google/gve/gve_main.c           |  6 ++++++
 drivers/net/ethernet/google/gve/gve_rx.c             |  8 ++++----
 drivers/net/ethernet/google/gve/gve_utils.c          | 12 ++++--------
 drivers/net/ethernet/google/gve/gve_utils.h          |  2 +-
 6 files changed, 18 insertions(+), 16 deletions(-)


base-commit: 21f57ec673a1917547c808cfa81890485fffa03b
-- 
2.47.3


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-10 13:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06 11:45 [PATCH net v4 0/2] gve: fix RX page refcount overflow with the pagecnt bias Amaan Cheval
2026-11-06 11:45 ` [PATCH net v4 1/2] gve: block XDP on the DQO-QPL queue format Amaan Cheval
2026-11-07  3:13   ` Joshua Washington
2026-11-09  9:38     ` Amaan Cheval
2026-11-07 11:46   ` sashiko-bot
2026-11-10 12:04   ` netdev-bot+sashiko
2026-11-10 13:33     ` Amaan Cheval
2026-11-06 11:45 ` [PATCH net v4 2/2] gve: fix RX page refcount overflow from the pagecnt bias Amaan Cheval

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.