<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/ipv6.h, branch v3.10</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.10</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.10'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-03-24T21:16:30Z</updated>
<entry>
<title>ipv6: implement RFC3168 5.3 (ecn protection) for ipv6 fragmentation handling</title>
<updated>2013-03-24T21:16:30Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2013-03-22T08:24:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eec2e6185ff6eab18c2cae9b01a9fbc5c33248fc'/>
<id>urn:sha1:eec2e6185ff6eab18c2cae9b01a9fbc5c33248fc</id>
<content type='text'>
Hello!

After patch 1 got accepted to net-next I will also send a patch to
netfilter-devel to make the corresponding changes to the netfilter
reassembly logic.

Thanks,

  Hannes

-- &gt;8 --
[PATCH 2/2] ipv6: implement RFC3168 5.3 (ecn protection) for ipv6 fragmentation handling

This patch also ensures that INET_ECN_CE is propagated if one fragment
had the codepoint set.

Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Jesper Dangaard Brouer &lt;jbrouer@redhat.com&gt;
Cc: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Acked-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: introdcue __ipv6_addr_needs_scope_id and ipv6_iface_scope_id helper functions</title>
<updated>2013-03-08T17:29:22Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2013-03-08T02:07:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7ef213ef65256168df83ddfbb8131ed9adc10f9'/>
<id>urn:sha1:b7ef213ef65256168df83ddfbb8131ed9adc10f9</id>
<content type='text'>
__ipv6_addr_needs_scope_id checks if an ipv6 address needs to supply
a 'sin6_scope_id != 0'. 'sin6_scope_id != 0' was enforced in case
of link-local addresses. To support interface-local multicast these
checks had to be enhanced and are now consolidated into these new helper
functions.

v2:
a) migrated to struct ipv6_addr_props

v3:
a) reverted changes for ipv6_addr_props
b) test for address type instead of comparing scope

v4:
a) unchanged

Suggested-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Cc: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Acked-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Acked-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6 flowlabel: add __rcu annotations</title>
<updated>2013-03-07T21:33:10Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-03-07T04:20:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7f0e44ac9f7f12a2519bfed9ea4df3c1471bd8bb'/>
<id>urn:sha1:7f0e44ac9f7f12a2519bfed9ea4df3c1471bd8bb</id>
<content type='text'>
Commit 18367681a10b (ipv6 flowlabel: Convert np-&gt;ipv6_fl_list to RCU.)
omitted proper __rcu annotations.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: use a stronger hash for tcp</title>
<updated>2013-02-21T23:15:58Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-02-21T12:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=08dcdbf6a7b9d14c2302c5bd0c5390ddf122f664'/>
<id>urn:sha1:08dcdbf6a7b9d14c2302c5bd0c5390ddf122f664</id>
<content type='text'>
It looks like its possible to open thousands of TCP IPv6
sessions on a server, all landing in a single slot of TCP hash
table. Incoming packets have to lookup sockets in a very
long list.

We should hash all bits from foreign IPv6 addresses, using
a salt and hash mix, not a simple XOR.

inet6_ehashfn() can also separately use the ports, instead
of xoring them.

Reported-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6 flowlabel: Convert np-&gt;ipv6_fl_list to RCU.</title>
<updated>2013-01-31T03:41:13Z</updated>
<author>
<name>YOSHIFUJI Hideaki / 吉藤英明</name>
<email>yoshfuji@linux-ipv6.org</email>
</author>
<published>2013-01-30T09:27:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=18367681a10bd29c3f2305e6b7b984de5b33d548'/>
<id>urn:sha1:18367681a10bd29c3f2305e6b7b984de5b33d548</id>
<content type='text'>
Signed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6 flowlabel: Convert hash list to RCU.</title>
<updated>2013-01-31T03:41:13Z</updated>
<author>
<name>YOSHIFUJI Hideaki / 吉藤英明</name>
<email>yoshfuji@linux-ipv6.org</email>
</author>
<published>2013-01-30T09:27:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3aedd5ebd4b0b925b0bcda548066803e1318499'/>
<id>urn:sha1:d3aedd5ebd4b0b925b0bcda548066803e1318499</id>
<content type='text'>
Signed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: frag helper functions for mem limit tracking</title>
<updated>2013-01-29T18:36:24Z</updated>
<author>
<name>Jesper Dangaard Brouer</name>
<email>brouer@redhat.com</email>
</author>
<published>2013-01-28T23:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d433673e5f9180e05a770c4b2ab18c08ad51cc21'/>
<id>urn:sha1:d433673e5f9180e05a770c4b2ab18c08ad51cc21</id>
<content type='text'>
This change is primarily a preparation to ease the extension of memory
limit tracking.

The change does reduce the number atomic operation, during freeing of
a frag queue.  This does introduce a some performance improvement, as
these atomic operations are at the core of the performance problems
seen on NUMA systems.

Signed-off-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Unshare ip6_nd_hdr() and change return type to void.</title>
<updated>2013-01-21T18:33:15Z</updated>
<author>
<name>YOSHIFUJI Hideaki / 吉藤英明</name>
<email>yoshfuji@linux-ipv6.org</email>
</author>
<published>2013-01-21T06:48:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2576f17dfad402e2446244238ed22dddf35c2e53'/>
<id>urn:sha1:2576f17dfad402e2446244238ed22dddf35c2e53</id>
<content type='text'>
- move ip6_nd_hdr() to its users' source files.
  In net/ipv6/mcast.c, it will be called ip6_mc_hdr().
- make return type to void since this function never fails.

Signed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: fix ipv6_prefix_equal64_half mask conversion</title>
<updated>2013-01-17T19:29:58Z</updated>
<author>
<name>Fabio Baltieri</name>
<email>fabio.baltieri@linaro.org</email>
</author>
<published>2013-01-16T21:30:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=512613d7dde7b679597485e9335bd64e90df78fa'/>
<id>urn:sha1:512613d7dde7b679597485e9335bd64e90df78fa</id>
<content type='text'>
Fix the 64bit optimized version of ipv6_prefix_equal to convert the
bitmask to network byte order only after the bit-shift.

The bug was introduced in:

3867517 ipv6: 64bit version of ipv6_prefix_equal().

Signed-off-by: Fabio Baltieri &lt;fabio.baltieri@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: increase fragment memory usage limits</title>
<updated>2013-01-17T19:29:53Z</updated>
<author>
<name>Jesper Dangaard Brouer</name>
<email>brouer@redhat.com</email>
</author>
<published>2013-01-15T07:16:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c2a936600f78aea00d3312ea4b66a79a4619f9b4'/>
<id>urn:sha1:c2a936600f78aea00d3312ea4b66a79a4619f9b4</id>
<content type='text'>
Increase the amount of memory usage limits for incomplete
IP fragments.

Arguing for new thresh high/low values:

 High threshold = 4 MBytes
 Low  threshold = 3 MBytes

The fragmentation memory accounting code, tries to account for the
real memory usage, by measuring both the size of frag queue struct
(inet_frag_queue (ipv4:ipq/ipv6:frag_queue)) and the SKB's truesize.

We want to be able to handle/hold-on-to enough fragments, to ensure
good performance, without causing incomplete fragments to hurt
scalability, by causing the number of inet_frag_queue to grow too much
(resulting longer searches for frag queues).

For IPv4, how much memory does the largest frag consume.

Maximum size fragment is 64K, which is approx 44 fragments with
MTU(1500) sized packets. Sizeof(struct ipq) is 200.  A 1500 byte
packet results in a truesize of 2944 (not 2048 as I first assumed)

  (44*2944)+200 = 129736 bytes

The current default high thresh of 262144 bytes, is obviously
problematic, as only two 64K fragments can fit in the queue at the
same time.

How many 64K fragment can we fit into 4 MBytes:

  4*2^20/((44*2944)+200) = 32.34 fragment in queues

An attacker could send a separate/distinct fake fragment packets per
queue, causing us to allocate one inet_frag_queue per packet, and thus
attacking the hash table and its lists.

How many frag queue do we need to store, and given a current hash size
of 64, what is the average list length.

Using one MTU sized fragment per inet_frag_queue, each consuming
(2944+200) 3144 bytes.

  4*2^20/(2944+200) = 1334 frag queues -&gt; 21 avg list length

An attack could send small fragments, the smallest packet I could send
resulted in a truesize of 896 bytes (I'm a little surprised by this).

  4*2^20/(896+200)  = 3827 frag queues -&gt; 59 avg list length

When increasing these number, we also need to followup with
improvements, that is going to help scalability.  Simply increasing
the hash size, is not enough as the current implementation does not
have a per hash bucket locking.

Signed-off-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
