<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core, branch v2.6.35</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/core?h=v2.6.35</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/core?h=v2.6.35'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-07-26T04:58:46Z</updated>
<entry>
<title>net: dev_forward_skb should call nf_reset</title>
<updated>2010-07-26T04:58:46Z</updated>
<author>
<name>Ben Greear</name>
<email>greearb@candelatech.com</email>
</author>
<published>2010-07-22T09:54:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c736eefadb71a01a5e61e0de700f28f6952b4444'/>
<id>urn:sha1:c736eefadb71a01a5e61e0de700f28f6952b4444</id>
<content type='text'>
With conn-track zones and probably with different network
namespaces, the netfilter logic needs to be re-calculated
on packet receive.  If the netfilter logic is not reset,
it will not be recalculated properly.  This patch adds
the nf_reset logic to dev_forward_skb.

Signed-off-by: Ben Greear &lt;greearb@candelatech.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Fix skb_copy_expand() handling of -&gt;csum_start</title>
<updated>2010-07-22T20:27:09Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2010-07-22T20:27:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=be2b6e62357dd7ee56bdcb05e54002afb4830292'/>
<id>urn:sha1:be2b6e62357dd7ee56bdcb05e54002afb4830292</id>
<content type='text'>
It should only be adjusted if ip_summed == CHECKSUM_PARTIAL.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Fix corruption of skb csum field in pskb_expand_head() of net/core/skbuff.c</title>
<updated>2010-07-22T20:25:18Z</updated>
<author>
<name>Andrea Shepard</name>
<email>andrea@persephoneslair.org</email>
</author>
<published>2010-07-22T09:12:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=00c5a9834b476a138158fb17d576da751727a9f1'/>
<id>urn:sha1:00c5a9834b476a138158fb17d576da751727a9f1</id>
<content type='text'>
Make pskb_expand_head() check ip_summed to make sure csum_start is really
csum_start and not csum before adjusting it.

This fixes a bug I encountered using a Sun Quad-Fast Ethernet card and VLANs.
On my configuration, the sunhme driver produces skbs with differing amounts
of headroom on receive depending on the packet size.  See line 2030 of
drivers/net/sunhme.c; packets smaller than RX_COPY_THRESHOLD have 52 bytes
of headroom but packets larger than that cutoff have only 20 bytes.

When these packets reach the VLAN driver, vlan_check_reorder_header()
calls skb_cow(), which, if the packet has less than NET_SKB_PAD (== 32) bytes
of headroom, uses pskb_expand_head() to make more.

Then, pskb_expand_head() needs to adjust a lot of offsets into the skb,
including csum_start.  Since csum_start is a union with csum, if the packet
has a valid csum value this will corrupt it, which was the effect I observed.
The sunhme hardware computes receive checksums, so the skbs would be created
by the driver with ip_summed == CHECKSUM_COMPLETE and a valid csum field, and
then pskb_expand_head() would corrupt the csum field, leading to an "hw csum
error" message later on, for example in icmp_rcv() for pings larger than the
sunhme RX_COPY_THRESHOLD.

On the basis of the comment at the beginning of include/linux/skbuff.h,
I believe that the csum_start skb field is only meaningful if ip_csummed is
CSUM_PARTIAL, so this patch makes pskb_expand_head() adjust it only in that
case to avoid corrupting a valid csum value.

Please see my more in-depth disucssion of tracking down this bug for
more details if you like:

http://puellavulnerata.livejournal.com/112186.html
http://puellavulnerata.livejournal.com/112567.html
http://puellavulnerata.livejournal.com/112891.html
http://puellavulnerata.livejournal.com/113096.html
http://puellavulnerata.livejournal.com/113591.html

I am not subscribed to this list, so please CC me on replies.

Signed-off-by: Andrea Shepard &lt;andrea@persephoneslair.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fix problem in reading sock TX queue</title>
<updated>2010-07-15T03:50:29Z</updated>
<author>
<name>Tom Herbert</name>
<email>therbert@google.com</email>
</author>
<published>2010-07-15T03:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b0f77d0eae0c58a5a9691a067ada112ceeae2d00'/>
<id>urn:sha1:b0f77d0eae0c58a5a9691a067ada112ceeae2d00</id>
<content type='text'>
Fix problem in reading the tx_queue recorded in a socket.  In
dev_pick_tx, the TX queue is read by doing a check with
sk_tx_queue_recorded on the socket, followed by a sk_tx_queue_get.
The problem is that there is not mutual exclusion across these
calls in the socket so it it is possible that the queue in the
sock can be invalidated after sk_tx_queue_recorded is called so
that sk_tx_queue get returns -1, which sets 65535 in queue_index
and thus dev_pick_tx returns 65536 which is a bogus queue and
can cause crash in dev_queue_xmit.

We fix this by only calling sk_tx_queue_get which does the proper
checks.  The interface is that sk_tx_queue_get returns the TX queue
if the sock argument is non-NULL and TX queue is recorded, else it
returns -1.  sk_tx_queue_recorded is no longer used so it can be
completely removed.

Signed-off-by: Tom Herbert &lt;therbert@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/core: neighbour update Oops</title>
<updated>2010-07-15T01:02:16Z</updated>
<author>
<name>Doug Kehn</name>
<email>rdkehn@yahoo.com</email>
</author>
<published>2010-07-15T01:02:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=91a72a70594e5212c97705ca6a694bd307f7a26b'/>
<id>urn:sha1:91a72a70594e5212c97705ca6a694bd307f7a26b</id>
<content type='text'>
When configuring DMVPN (GRE + openNHRP) and a GRE remote
address is configured a kernel Oops is observed.  The
obserseved Oops is caused by a NULL header_ops pointer
(neigh-&gt;dev-&gt;header_ops) in neigh_update_hhs() when

void (*update)(struct hh_cache*, const struct net_device*, const unsigned char *)
= neigh-&gt;dev-&gt;header_ops-&gt;cache_update;

is executed.  The dev associated with the NULL header_ops is
the GRE interface.  This patch guards against the
possibility that header_ops is NULL.

This Oops was first observed in kernel version 2.6.26.8.

Signed-off-by: Doug Kehn &lt;rdkehn@yahoo.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: skb_tx_hash() fix relative to skb_orphan_try()</title>
<updated>2010-07-14T22:33:27Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-07-13T05:24:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=87fd308cfc6b2e880bf717a740bd5c58d2aed10c'/>
<id>urn:sha1:87fd308cfc6b2e880bf717a740bd5c58d2aed10c</id>
<content type='text'>
commit fc6055a5ba31e2 (net: Introduce skb_orphan_try()) added early
orphaning of skbs.

This unfortunately added a performance regression in skb_tx_hash() in
case of stacked devices (bonding, vlans, ...)

Since skb-&gt;sk is now NULL, we cannot access sk-&gt;sk_hash anymore to
spread tx packets to multiple NIC queues on multiqueue devices.

skb_tx_hash() in this case only uses skb-&gt;protocol, same value for all
flows.

skb_orphan_try() can copy sk-&gt;sk_hash into skb-&gt;rxhash and skb_tx_hash()
can use this saved sk_hash value to compute its internal hash value.

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>net: decreasing real_num_tx_queues needs to flush qdisc</title>
<updated>2010-07-03T04:59:07Z</updated>
<author>
<name>John Fastabend</name>
<email>john.r.fastabend@intel.com</email>
</author>
<published>2010-07-01T13:21:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f0796d5c73e59786d09a1e617689d1d415f2db44'/>
<id>urn:sha1:f0796d5c73e59786d09a1e617689d1d415f2db44</id>
<content type='text'>
Reducing real_num_queues needs to flush the qdisc otherwise
skbs with queue_mappings greater then real_num_tx_queues can
be sent to the underlying driver.

The flow for this is,

dev_queue_xmit()
	dev_pick_tx()
		skb_tx_hash()  =&gt; hash using real_num_tx_queues
		skb_set_queue_mapping()
	...
	qdisc_enqueue_root() =&gt; enqueue skb on txq from hash
...
dev-&gt;real_num_tx_queues -= n
...
sch_direct_xmit()
	dev_hard_start_xmit()
		ndo_start_xmit(skb,dev) =&gt; skb queue set with old hash

skbs are enqueued on the qdisc with skb-&gt;queue_mapping set
0 &lt; queue_mappings &lt; real_num_tx_queues.  When the driver
decreases real_num_tx_queues skb's may be dequeued from the
qdisc with a queue_mapping greater then real_num_tx_queues.

This fixes a case in ixgbe where this was occurring with DCB
and FCoE. Because the driver is using queue_mapping to map
skbs to tx descriptor rings we can potentially map skbs to
rings that no longer exist.

Signed-off-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethtool: Fix potential user buffer overflow for ETHTOOL_{G, S}RXFH</title>
<updated>2010-06-29T08:00:29Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2010-06-28T08:45:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bf988435bd5b53529f4408a8efb1f433f6ddfda9'/>
<id>urn:sha1:bf988435bd5b53529f4408a8efb1f433f6ddfda9</id>
<content type='text'>
struct ethtool_rxnfc was originally defined in 2.6.27 for the
ETHTOOL_{G,S}RXFH command with only the cmd, flow_type and data
fields.  It was then extended in 2.6.30 to support various additional
commands.  These commands should have been defined to use a new
structure, but it is too late to change that now.

Since user-space may still be using the old structure definition
for the ETHTOOL_{G,S}RXFH commands, and since they do not need the
additional fields, only copy the originally defined fields to and
from user-space.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Cc: stable@kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL</title>
<updated>2010-06-29T08:00:29Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2010-06-28T08:44:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=db048b69037e7fa6a7d9e95a1271a50dc08ae233'/>
<id>urn:sha1:db048b69037e7fa6a7d9e95a1271a50dc08ae233</id>
<content type='text'>
On a 32-bit machine, info.rule_cnt &gt;= 0x40000000 leads to integer
overflow and the buffer may be smaller than needed.  Since
ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at
least denial of service.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Cc: stable@kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: rxhash already set in __copy_skb_header</title>
<updated>2010-06-14T00:16:54Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-06-13T10:50:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e8d15e6460cb0eea00f2574a80d94496943403ba'/>
<id>urn:sha1:e8d15e6460cb0eea00f2574a80d94496943403ba</id>
<content type='text'>
No need to copy rxhash again in __skb_clone()

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
