Re: [PATCH net-next 0/5] net: make xdp config checks effective vs netif_xdp_propagate()

From
Stanislav Fomichev <hidden>
Date
2026-11-13 22:22:46
Also in
bpf, linux-doc, linux-kselftest
Reply to
Jakub Kicinski, 2026-11-12
On 11/12, Jakub Kicinski wrote:
Bonding (and netvsc) try to auto-propagate XDP programs down
to their lower devices. These programs were installed directly
with .ndo_bpf and not recorded in struct net_device of the lowers.
This makes all the config checks for features incompatible with XDP
ineffective - HDS, memory providers etc. use dev_xdp_prog_count()
and do not call down to the driver to ask it whether it has XDP
installed.

Record the state appropriately. dev_xdp_prog_count() will now
"see" the propagated programs.

The issue was discovered when reworking HW-GRO and XDP interactions.
I was trying to make sure HW-GRO is reliably disabled with XDP,
and discovered we have a way to bypass all checks with bonding.
Not treating this as a fix since it's admin-only self-inflicted
damage that nobody is reporting being bothered by in real life.

Jakub Kicinski (5):
  net: don't safety-check device features for XDP uninstall
  net: move dev_xdp_set_link() and dev_xdp_set_prog() up
  net: record XDP programs propagated to lower devices
  selftests/bpf: check XDP attach on a nested bond slave
  selftests/bpf: check replacing and detaching XDP on a bond through a
    link
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Thread (12 messages) 12 messages, 3 authors, last reply 3d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help