Re: [PATCH net-next v6 1/8] net: add get_netmem/put_netmem support

From
Mina Almasry <hidden>
Date
2025-03-06 22:44:56
Also in
kvm, linux-doc, linux-kselftest, lkml, virtualization
Reply to
Jakub Kicinski, 2025-03-06
On Thu, Mar 6, 2025 at 1:40 PM Jakub Kicinski [off-list ref] wrote:
On Tue, 4 Mar 2025 17:39:37 -0800 Mina Almasry wrote:
quoted
quoted
quoted
Yes, great idea. I don't see why it wouldn't work.

We don't expect mixing of net_iovs and pages in the same skb, but
netdevsim could create one net_iov skb every N skbs.

I guess I'm not totally sure something is discoverable to syzbot. Is a
netdevsim hack toggleable via a debugfs sufficient for syzbot? I'll
investigate and ask.
Yeah, my unreliable memory is that syzbot has a mixed record discovering
problems with debugfs. If you could ask Dmitry for advice that'd be
ideal.
Yes, I took a look here and discussed with Willem. Long story short is
that syzbot support is possible but with a handful of changes. We'll
look into that.

Long story long, for syzbot support I don't think netdevsim itself
will be useful. Its our understanding so far that syzbot doesn't do
anything special with netdevsim.
Meaning it doesn't currently do anything special, or you can't make it
do anything special with netdevsim?
Meaning it currently doesn't do anything special with netdevsim. I
imagine we may be able to create a specialized syzbot instance that
loads netdevsim and starts fuzzing its APIs. However I'm told
specialized syzbot instances are much less valuable than making the
feature discoverable to existing syzbot instances, which is why our
thoughts went to adding devmem/unreadable skb support to virtio or
tun/tap.

Do I surmise from your question you prefer a netdevsim-based approach?
(and just curious maybe, why?)
quoted
We'll need to add queue API/page_pool/unreadable netmem support to
one of the drivers qemu (syzbot) uses, and that should get syzbot
fuzzing the control plane.

To get syzbot to fuzz the data plane, I think we need to set up a
special syzbot instance which configures udmabuf/rss/flow
To be clear for Tx you don't need RSS and flow steering, Tx should
be trivial for any device driver which managers DMAs directly (not USB).
Yes, we don't need queue API or page_pool support or header split
either for that matter. TX fuzzing is definitely simpler. Maybe we can
start with that.

--
Thanks,
Mina
Thread (25 messages) 25 messages, 6 authors, last reply 2025-03-06
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