<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/core/skbuff.c, branch linux-2.6.33.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-11-07T21:47:34Z</updated>
<entry>
<title>gro: Re-fix different skb headrooms</title>
<updated>2011-11-07T21:47:34Z</updated>
<author>
<name>Jarek Poplawski</name>
</author>
<published>2010-09-04T10:34:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65d1d29f4cf001219f2b30c9d6de9aff43ba7757'/>
<id>urn:sha1:65d1d29f4cf001219f2b30c9d6de9aff43ba7757</id>
<content type='text'>
commit 64289c8e6851bca0e589e064c9a5c9fbd6ae5dd4 upstream.

The patch: "gro: fix different skb headrooms" in its part:
"2) allocate a minimal skb for head of frag_list" is buggy. The copied
skb has p-&gt;data set at the ip header at the moment, and skb_gro_offset
is the length of ip + tcp headers. So, after the change the length of
mac header is skipped. Later skb_set_mac_header() sets it into the
NET_SKB_PAD area (if it's long enough) and ip header is misaligned at
NET_SKB_PAD + NET_IP_ALIGN offset. There is no reason to assume the
original skb was wrongly allocated, so let's copy it as it was.

bugzilla : https://bugzilla.kernel.org/show_bug.cgi?id=16626
fixes commit: 3d3be4333fdf6faa080947b331a6a19bce1a4f57

Reported-by: Plamen Petrov &lt;pvp-lsts@fs.uni-ruse.bg&gt;
Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Tested-by: Plamen Petrov &lt;pvp-lsts@fs.uni-ruse.bg&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>gro: fix different skb headrooms</title>
<updated>2011-11-07T21:47:33Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2010-09-01T00:50:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c17af21c93dd588454eb2ed6148fab24af6d70c'/>
<id>urn:sha1:2c17af21c93dd588454eb2ed6148fab24af6d70c</id>
<content type='text'>
commit 3d3be4333fdf6faa080947b331a6a19bce1a4f57 upstream.

Packets entering GRO might have different headrooms, even for a given
flow (because of implementation details in drivers, like copybreak).
We cant force drivers to deliver packets with a fixed headroom.

1) fix skb_segment()

skb_segment() makes the false assumption headrooms of fragments are same
than the head. When CHECKSUM_PARTIAL is used, this can give csum_start
errors, and crash later in skb_copy_and_csum_dev()

2) allocate a minimal skb for head of frag_list

skb_gro_receive() uses netdev_alloc_skb(headroom + skb_gro_offset(p)) to
allocate a fresh skb. This adds NET_SKB_PAD to a padding already
provided by netdevice, depending on various things, like copybreak.

Use alloc_skb() to allocate an exact padding, to reduce cache line
needs:
NET_SKB_PAD + NET_IP_ALIGN

bugzilla : https://bugzilla.kernel.org/show_bug.cgi?id=16626

Many thanks to Plamen Petrov, testing many debugging patches !
With help of Jarek Poplawski.

Reported-by: Plamen Petrov &lt;pvp-lsts@fs.uni-ruse.bg&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
Cc: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>GRO: fix merging a paged skb after non-paged skbs</title>
<updated>2011-11-07T21:46:44Z</updated>
<author>
<name>Michal Schmidt</name>
</author>
<published>2011-01-24T12:08:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa9e14a4e38ab9d658c40ccebc4ede0caf26a99b'/>
<id>urn:sha1:aa9e14a4e38ab9d658c40ccebc4ede0caf26a99b</id>
<content type='text'>
commit d1dc7abf2fafa34b0ffcd070fd59405aa9c0a4d8 upstream.

Suppose that several linear skbs of the same flow were received by GRO. They
were thus merged into one skb with a frag_list. Then a new skb of the same flow
arrives, but it is a paged skb with data starting in its frags[].

Before adding the skb to the frag_list skb_gro_receive() will of course adjust
the skb to throw away the headers. It correctly modifies the page_offset and
size of the frag, but it leaves incorrect information in the skb:
 -&gt;data_len is not decreased at all.
 -&gt;len is decreased only by headlen, as if no change were done to the frag.
Later in a receiving process this causes skb_copy_datagram_iovec() to return
-EFAULT and this is seen in userspace as the result of the recv() syscall.

In practice the bug can be reproduced with the sfc driver. By default the
driver uses an adaptive scheme when it switches between using
napi_gro_receive() (with skbs) and napi_gro_frags() (with pages). The bug is
reproduced when under rx load with enough successful GRO merging the driver
decides to switch from the former to the latter.

Manual control is also possible, so reproducing this is easy with netcat:
 - on machine1 (with sfc): nc -l 12345 &gt; /dev/null
 - on machine2: nc machine1 12345 &lt; /dev/zero
 - on machine1:
   echo 1 &gt; /sys/module/sfc/parameters/rx_alloc_method  # use skbs
   echo 2 &gt; /sys/module/sfc/parameters/rx_alloc_method  # use pages
 - See that nc has quit suddenly.

[v2: Modified by Eric Dumazet to avoid advancing skb-&gt;data past the end
     and to use a temporary variable.]

Signed-off-by: Michal Schmidt &lt;mschmidt@redhat.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>gro: Fix bogus gso_size on the first fraglist entry</title>
<updated>2010-08-02T17:26:24Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2010-05-21T06:07:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a8641620981ea60268d86b1d8107160ff0ab4d5'/>
<id>urn:sha1:8a8641620981ea60268d86b1d8107160ff0ab4d5</id>
<content type='text'>
[ Upstream commit 622e0ca1cd4d459f5af4f2c65f4dc0dd823cb4c3 ]

When GRO produces fraglist entries, and the resulting skb hits
an interface that is incapable of TSO but capable of FRAGLIST,
we end up producing a bogus packet with gso_size non-zero.

This was reported in the field with older versions of KVM that
did not set the TSO bits on tuntap.

This patch fixes that.

Reported-by: Igor Zhang &lt;yugzhang@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>const: constify remaining pipe_buf_operations</title>
<updated>2009-12-16T15:20:05Z</updated>
<author>
<name>Alexey Dobriyan</name>
</author>
<published>2009-12-16T00:46:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=28dfef8febe48f59cf1e7596e1992a6a1893ca24'/>
<id>urn:sha1:28dfef8febe48f59cf1e7596e1992a6a1893ca24</id>
<content type='text'>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>net: rename skb-&gt;iif to skb-&gt;skb_iif</title>
<updated>2009-11-20T23:35:04Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2009-11-20T23:35:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8964be4a9a5ca8cab1219bb046db2f6d1936227c'/>
<id>urn:sha1:8964be4a9a5ca8cab1219bb046db2f6d1936227c</id>
<content type='text'>
To help grep games, rename iif to skb_iif

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2009-11-19T06:19:03Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2009-11-19T06:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3505d1a9fd65e2d3e00827857b6795d9d8983658'/>
<id>urn:sha1:3505d1a9fd65e2d3e00827857b6795d9d8983658</id>
<content type='text'>
Conflicts:
	drivers/net/sfc/sfe4001.c
	drivers/net/wireless/libertas/cmd.c
	drivers/staging/Kconfig
	drivers/staging/Makefile
	drivers/staging/rtl8187se/Kconfig
	drivers/staging/rtl8192e/Kconfig
</content>
</entry>
<entry>
<title>gro: Fix illegal merging of trailer trash</title>
<updated>2009-11-17T13:18:18Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2009-11-17T13:18:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69c0cab120a85471054614418b447349caba22d7'/>
<id>urn:sha1:69c0cab120a85471054614418b447349caba22d7</id>
<content type='text'>
When we've merged skb's with page frags, and subsequently receive
a trailer skb (&lt; MSS) that is not completely non-linear (this can
occur on Intel NICs if the packet size falls below the threshold),
GRO ends up producing an illegal GSO skb with a frag_list.

This is harmless unless the skb is then forwarded through an
interface that requires software GSO, whereupon the GSO code
will BUG.

This patch detects this case in GRO and avoids merging the
trailer skb.

Reported-by: Mark Wagner &lt;mwagner@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>skbuff: Do not allow skb recycling with disabled IRQs</title>
<updated>2009-11-12T03:03:28Z</updated>
<author>
<name>Anton Vorontsov</name>
</author>
<published>2009-11-10T14:11:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e84af6ddef0e447c56b256a2bb5a90af11bdac2e'/>
<id>urn:sha1:e84af6ddef0e447c56b256a2bb5a90af11bdac2e</id>
<content type='text'>
NAPI drivers try to recycle SKBs in their polling routine, but we
generally don't know the context in which the polling will be called,
and the skb recycling itself may require IRQs to be enabled.

This patch adds irqs_disabled() test to the skb_recycle_check()
routine, so that we'll not let the drivers hit the skb recycling
path with IRQs disabled.

As a side effect, this patch actually disables skb recycling for some
[broken] drivers. E.g. gianfar driver grabs an irqsave spinlock during
TX ring processing, and then tries to recycle an skb, and that caused
the following badness:

nf_conntrack version 0.5.0 (1008 buckets, 4032 max)
------------[ cut here ]------------
Badness at kernel/softirq.c:143
NIP: c003e3c4 LR: c423a528 CTR: c003e344
...
NIP [c003e3c4] local_bh_enable+0x80/0xc4
LR [c423a528] destroy_conntrack+0xd4/0x13c [nf_conntrack]
Call Trace:
[c15d1b60] [c003e32c] local_bh_disable+0x1c/0x34 (unreliable)
[c15d1b70] [c423a528] destroy_conntrack+0xd4/0x13c [nf_conntrack]
[c15d1b80] [c02c6370] nf_conntrack_destroy+0x3c/0x70

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: remove unused skb-&gt;do_not_encrypt</title>
<updated>2009-07-24T19:05:31Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2009-06-17T15:45:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=72bce62775db0315511474e8d8f8e25d25b48366'/>
<id>urn:sha1:72bce62775db0315511474e8d8f8e25d25b48366</id>
<content type='text'>
mac80211 required this due to the master netdev, but now
it can put all information into skb-&gt;cb and this can go.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
</feed>
