aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorMichal Kubeček <mkubecek@suse.cz>2015-03-02 18:27:11 +0100
committerSuren Baghdasaryan <surenb@google.com>2018-03-26 11:31:41 -0700
commit4dc9a8217bd1ca4f6c3a6eb9713dff6879627b3f (patch)
tree9a40373347c22cfb4bf2d9c3576022c302597484 /tools/perf/scripts/python/syscall-counts.py
parent90405c5cd1698393aed20521975813844cf69275 (diff)
udp: only allow UFO for packets from SOCK_DGRAM sockets
[ Upstream commit acf8dd0a9d0b9e4cdb597c2f74802f79c699e802 ] If an over-MTU UDP datagram is sent through a SOCK_RAW socket to a UFO-capable device, ip_ufo_append_data() sets skb->ip_summed to CHECKSUM_PARTIAL unconditionally as all GSO code assumes transport layer checksum is to be computed on segmentation. However, in this case, skb->csum_start and skb->csum_offset are never set as raw socket transmit path bypasses udp_send_skb() where they are usually set. As a result, driver may access invalid memory when trying to calculate the checksum and store the result (as observed in virtio_net driver). Moreover, the very idea of modifying the userspace provided UDP header is IMHO against raw socket semantics (I wasn't able to find a document clearly stating this or the opposite, though). And while allowing CHECKSUM_NONE in the UFO case would be more efficient, it would be a bit too intrusive change just to handle a corner case like this. Therefore disallowing UFO for packets from SOCK_DGRAM seems to be the best option. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Change-Id: I0862e8e03e23888c9ff3f8a39fbbeea1de4377c8 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions