linux/include/xen/interface
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
..
hvm Feature: 2012-10-12 22:20:28 +09:00
io xen-netback: coalesce slots in TX path and fix regressions 2013-04-22 15:37:01 -04:00
callback.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
elfnote.h Fix common misspellings 2011-03-31 11:26:23 -03:00
event_channel.h xen: Add EVTCHNOP_reset in Xen interface header files. 2012-12-17 21:58:05 -05:00
features.h xen/arm: get privilege status 2012-08-08 17:20:18 +00:00
grant_table.h xen: grant: use xen_pfn_t type for frame_list. 2012-10-19 15:17:55 -04:00
memory.h xen: implement updated XENMEM_add_to_physmap_range ABI 2013-02-19 22:01:55 -05:00
physdev.h xen-pciback: notify hypervisor about devices intended to be assigned to guests 2013-03-22 10:20:55 -04:00
platform.h xen/acpi: ACPI cpu hotplug 2013-02-19 22:02:29 -05:00
sched.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
vcpu.h xen: add missing definitions in include/xen/interface/vcpu.h which ia64/xen needs 2008-04-24 23:57:32 +02:00
version.h xen/acpi: Move the xen_running_on_version_or_later function. 2012-11-28 14:39:31 -05:00
xen-mca.h xen/mce: Add mcelog support for Xen platform 2012-07-19 15:51:36 -04:00
xen.h xen: event channel arrays are xen_ulong_t and not unsigned long 2013-02-20 08:45:07 -05:00
xencomm.h xen: import arch generic part of xencomm 2008-04-24 23:57:32 +02:00