xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* xennet_start_xmit assumptions
@ 2017-01-18 15:31 Sowmini Varadhan
  0 siblings, 0 replies; 13+ messages in thread
From: Sowmini Varadhan @ 2017-01-18 15:31 UTC (permalink / raw)
  To: netdev, xen-devel

As I was playing around with pf_packet, I accidentally wrote
a buggy application program that bzero'ed the msghdr, then set
up the msg_name, msg_namelen correctly, and then did a sendmsg
on the pf_packet/SOCK_RAW fd.

This causes packet_snd to set up an skb with a lot of issues,
e.g., skb->len = 0, skb_headlen(skb) is 0, etc. I think we can/should
drop the packet in packet_snd if the skb->len is 0, but there
may be other driver bugs going on:

Turns out that ixgbe and sunvnet handle this problematic
skb correctly (they drop it and system remains stable), 
but it creates a panic in xen_netfront (xennet_start_xmit()
hits a null pointer deref when xennet_make_first_txreq() returns 
NULL)

I'm new to the xen driver code, so I'm hoping that
the experts can comment here: reading the code in xennet_start_xmit,
it seems like it mandatorily requires the skb_headlen() to be
non-zero in order to create the first_tx? That may not always be
true, how does the code recover for purely non-linear skbs?

--Sowmini


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2017-01-25 15:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170118153132.GB9258@oracle.com>
2017-01-18 19:25 ` xennet_start_xmit assumptions Konrad Rzeszutek Wilk
     [not found] ` <20170118192528.GA6847@char.us.oracle.com>
2017-01-19  9:36   ` Paul Durrant
2017-01-19 11:14     ` Sowmini Varadhan
     [not found]     ` <20170119111426.GA22018@oracle.com>
2017-01-19 11:31       ` Paul Durrant
2017-01-19 11:37         ` Sowmini Varadhan
2017-01-19 16:37       ` David Miller
2017-01-19 18:47         ` Sowmini Varadhan
2017-01-19 22:41           ` Sowmini Varadhan
     [not found]           ` <20170119224123.GB19618@oracle.com>
2017-01-20 19:30             ` David Miller
     [not found]             ` <20170120.143059.1390682983473502518.davem@davemloft.net>
2017-01-20 20:03               ` Sowmini Varadhan
2017-01-25 15:06       ` Paul Durrant
     [not found]       ` <fa531e2ed014488baa10556c724e176c@AMSPEX02CL03.citrite.net>
2017-01-25 15:45         ` Sowmini Varadhan
2017-01-18 15:31 Sowmini Varadhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).