Skip to content

Don't split IP-reassembled packets in homa_softirq - #13

Closed
Stuartwastaken wants to merge 1 commit into
mainfrom
fix/softirq-frag-list
Closed

Stuartwastaken wants to merge 1 commit into
mainfrom
fix/softirq-frag-list

Conversation

@Stuartwastaken

Copy link
Copy Markdown
Owner

homa_softirq treats any frag_list as a batch from Homa's GRO, but IP reassembly also builds one when a Homa packet arrives in fragments. The fragments then get dispatched as separate Homa packets with skb->dev == NULL, so dev_net() faults in homa_dispatch_pkts. Any remote host can trigger this, and in the stripped build (no GRO) a frag_list can only come from reassembly.

Reassembly counts the fragments in skb->len and Homa's GRO doesn't, so this only splits the list when skb->len == skb_pagelen(skb). The new unit test homa_softirq__frag_list_from_ip_reassembly crashes in dev_net under ASan without the fix; all 887 unit tests pass with it.

homa_softirq assumed that any frag_list was a batch built by Homa's
GRO and processed each entry as a separate Homa packet. IP reassembly
also leaves fragments on frag_list, and those are pieces of one
packet: their bytes are counted in the head's len, their payload was
parsed as Homa headers, and their dev is NULL, so dev_net crashed in
homa_dispatch_pkts. Any remote host can send fragmented Homa packets,
and in the stripped build, which has no GRO, every frag_list comes
from reassembly.

Homa's GRO doesn't add batched packets to the head's len, so split
the list only when skb->len == skb_pagelen(skb).
@Stuartwastaken

Copy link
Copy Markdown
Owner Author

Raised upstream as PlatformLab#155.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant