1
0
Fork 0
remarkable-linux/net/core
Eric Dumazet 117632e64d tcp: take care of misalignments
We discovered that TCP stack could retransmit misaligned skbs if a
malicious peer acknowledged sub MSS frame. This currently can happen
only if output interface is non SG enabled : If SG is enabled, tcp
builds headless skbs (all payload is included in fragments), so the tcp
trimming process only removes parts of skb fragments, header stay
aligned.

Some arches cant handle misalignments, so force a head reallocation and
shrink headroom to MAX_TCP_HEADER.

Dont care about misaligments on x86 and PPC (or other arches setting
NET_IP_ALIGN to 0)

This patch introduces __pskb_copy() which can specify the headroom of
new head, and pskb_copy() becomes a wrapper on top of __pskb_copy()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-04 13:20:39 -05:00
..
Makefile net: introduce skb_flow_dissect() 2011-11-28 19:09:07 -05:00
datagram.c net: add skb frag size accessors 2011-10-19 03:10:46 -04:00
dev.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-12-02 13:49:21 -05:00
dev_addr_lists.c net: Fix corruption in /proc/*/net/dev_mcast 2011-11-28 18:07:29 -05:00
drop_monitor.c net,rcu: convert call_rcu(free_dm_hw_stat) to kfree_rcu() 2011-05-07 22:50:59 -07:00
dst.c net: fix potential neighbour race in dst_ifdown() 2011-08-09 21:47:14 -07:00
ethtool.c net: ethtool: fix coding style 2011-11-16 22:00:14 -05:00
fib_rules.c net: Fix files explicitly needing to include module.h 2011-10-31 19:30:28 -04:00
filter.c filter: use unsigned int to silence static checker warning 2011-10-19 19:35:51 -04:00
flow.c net/flow: Fix potential memory leak 2011-10-17 19:18:42 -04:00
flow_dissector.c flow_dissector: use a 64bit load/store 2011-11-29 13:17:03 -05:00
gen_estimator.c net,rcu: convert call_rcu(__gen_kill_estimator) to kfree_rcu() 2011-05-07 22:50:57 -07:00
gen_stats.c net/core: EXPORT_SYMBOL cleanups 2010-07-12 12:57:55 -07:00
iovec.c net: Limit socket I/O iovec total length to INT_MAX. 2010-10-28 11:47:52 -07:00
kmap_skb.h net: convert core to skb paged frag APIs 2011-08-24 17:52:11 -07:00
link_watch.c net: linkwatch: allow vlans to get carrier changes faster 2011-09-15 15:36:34 -04:00
neighbour.c neigh: Add device constructor/destructor capability. 2011-11-30 18:48:03 -05:00
net-sysfs.c bql: Byte queue limits 2011-11-29 12:46:19 -05:00
net-sysfs.h xps: Add CONFIG_XPS 2010-11-28 18:24:14 -08:00
net-traces.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
net_namespace.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
netevent.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
netpoll.c net: Add queue state xoff flag for stack 2011-11-29 12:46:19 -05:00
netprio_cgroup.c net: treewide use of RCU_INIT_POINTER 2011-11-23 18:48:19 -05:00
pktgen.c net: Add queue state xoff flag for stack 2011-11-29 12:46:19 -05:00
request_sock.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-12-08 13:47:38 -08:00
rtnetlink.c if_link: Add additional parameter to IFLA_VF_INFO for spoof checking 2011-10-16 13:15:38 -07:00
scm.c af_unix: dont send SCM_CREDENTIALS by default 2011-09-28 13:29:50 -04:00
secure_seq.c tcp: add const qualifiers where possible 2011-10-21 05:22:42 -04:00
skbuff.c tcp: take care of misalignments 2011-12-04 13:20:39 -05:00
sock.c net: optimize socket timestamping 2011-11-29 00:27:11 -05:00
stream.c net: Fix the condition passed to sk_wait_event() 2010-10-03 20:41:32 -07:00
sysctl_net_core.c net: use jump_label to shortcut RPS if not setup 2011-11-17 17:06:08 -05:00
timestamping.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
user_dma.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
utils.c net: Kill ratelimit.h dependency in linux/net.h 2011-05-27 13:41:33 -04:00