linux/include/xen/interface/io
Wei Liu 2810e5b9a7 xen-netback: coalesce slots in TX path and fix regressions
This patch tries to coalesce tx requests when constructing grant copy
structures. It enables netback to deal with situation when frontend's
MAX_SKB_FRAGS is larger than backend's MAX_SKB_FRAGS.

With the help of coalescing, this patch tries to address two regressions
avoid reopening the security hole in XSA-39.

Regression 1. The reduction of the number of supported ring entries (slots)
per packet (from 18 to 17). This regression has been around for some time but
remains unnoticed until XSA-39 security fix. This is fixed by coalescing
slots.

Regression 2. The XSA-39 security fix turning "too many frags" errors from
just dropping the packet to a fatal error and disabling the VIF. This is fixed
by coalescing slots (handling 18 slots when backend's MAX_SKB_FRAGS is 17)
which rules out false positive (using 18 slots is legit) and dropping packets
using 19 to `max_skb_slots` slots.

To avoid reopening security hole in XSA-39, frontend sending packet using more
than max_skb_slots is considered malicious.

The behavior of netback for packet is thus:

    1-18            slots: valid
   19-max_skb_slots slots: drop and respond with an error
   max_skb_slots+   slots: fatal error

max_skb_slots is configurable by admin, default value is 20.

Also change variable name from "frags" to "slots" in netbk_count_requests.

Please note that RX path still has dependency on MAX_SKB_FRAGS. This will be
fixed with separate patch.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-22 15:37:01 -04:00
..
blkif.h xen/blkback: correctly respond to unknown, non-native requests 2013-03-11 13:54:28 -04:00
console.h
fbif.h xen pvfb: Dynamic mode support (screen resizing) 2008-05-27 10:11:36 +02:00
kbdif.h xen pvfb: Pointer z-axis (mouse wheel) support 2008-05-27 10:11:36 +02:00
netif.h xen-netback: coalesce slots in TX path and fix regressions 2013-04-22 15:37:01 -04:00
pciif.h xen-pcifront: Xen PCI frontend driver. 2010-10-18 10:49:37 -04:00
protocols.h xen/arm: compile blkfront and blkback 2012-08-08 17:21:14 +00:00
ring.h xen: Provide a variant of __RING_SIZE() that is an integer constant expression 2010-12-15 12:34:28 -08:00
xenbus.h xenbus: Xen paravirtualised PCI hotplug support. 2010-10-18 10:49:35 -04:00
xs_wire.h xen/pv-on-hvm kexec: shutdown watches from old kernel 2012-07-19 15:52:02 -04:00