<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/sctp, branch v3.11</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/sctp?h=v3.11</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/sctp?h=v3.11'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-08-13T05:13:47Z</updated>
<entry>
<title>net: sctp: sctp_transport_destroy{, _rcu}: fix potential pointer corruption</title>
<updated>2013-08-13T05:13:47Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2013-08-09T14:25:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=771085d6bf3c52de29fc213e5bad07a82e57c23e'/>
<id>urn:sha1:771085d6bf3c52de29fc213e5bad07a82e57c23e</id>
<content type='text'>
Probably this one is quite unlikely to be triggered, but it's more safe
to do the call_rcu() at the end after we have dropped the reference on
the asoc and freed sctp packet chunks. The reason why is because in
sctp_transport_destroy_rcu() the transport is being kfree()'d, and if
we're unlucky enough we could run into corrupted pointers. Probably
that's more of theoretical nature, but it's safer to have this simple fix.

Introduced by commit 8c98653f ("sctp: sctp_close: fix release of bindings
for deferred call_rcu's"). I also did the 8c98653f regression test and
it's fine that way.

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: sctp_assoc_control_transport: fix MTU size in SCTP_PF state</title>
<updated>2013-08-13T05:12:20Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2013-08-09T13:09:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ac4f9599362475662efb6efbb334cbcec98d4778'/>
<id>urn:sha1:ac4f9599362475662efb6efbb334cbcec98d4778</id>
<content type='text'>
The SCTP Quick failover draft [1] section 5.1, point 5 says that the cwnd
should be 1 MTU. So, instead of 1, set it to 1 MTU.

  [1] https://tools.ietf.org/html/draft-nishida-tsvwg-sctp-failover-05

Reported-by: Karl Heiss &lt;kheiss@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: confirm route during forward progress</title>
<updated>2013-07-09T19:49:56Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2013-07-09T14:17:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8c2f414ad1b3aa3af05791cd7312eb8ff9d80e0d'/>
<id>urn:sha1:8c2f414ad1b3aa3af05791cd7312eb8ff9d80e0d</id>
<content type='text'>
This fix has been proposed originally by Vlad Yasevich. He says:

  When SCTP makes forward progress (receives a SACK that acks new chunks,
  renegs, or answeres 0-window probes) or when HB-ACK arrives, mark
  the route as confirmed so we don't unnecessarily send NUD probes.

Having a simple SCTP client/server that exchange data chunks every 1sec,
without this patch ARP requests are sent periodically every 40-60sec.
With this fix applied, an ARP request is only done once right at the
"session" beginning. Also, when clearing the related ARP cache entry
manually during the session, a new request is correctly done. I have
only "backported" this to net-next and tested that it works, so full
credit goes to Vlad.

Signed-off-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: use get_unused_fd_flags(0) instead of get_unused_fd()</title>
<updated>2013-07-02T23:14:11Z</updated>
<author>
<name>Yann Droneaud</name>
<email>ydroneaud@opteya.com</email>
</author>
<published>2013-07-02T16:39:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8a59bd3e9b296b93b905b5509c4ff540ee0e00bf'/>
<id>urn:sha1:8a59bd3e9b296b93b905b5509c4ff540ee0e00bf</id>
<content type='text'>
Macro get_unused_fd() is used to allocate a file descriptor with
default flags. Those default flags (0) can be "unsafe":
O_CLOEXEC must be used by default to not leak file descriptor
across exec().

Instead of macro get_unused_fd(), functions anon_inode_getfd()
or get_unused_fd_flags() should be used with flags given by userspace.
If not possible, flags should be set to O_CLOEXEC to provide userspace
with a default safe behavor.

In a further patch, get_unused_fd() will be removed so that
new code start using anon_inode_getfd() or get_unused_fd_flags()
with correct flags.

This patch replaces calls to get_unused_fd() with equivalent call to
get_unused_fd_flags(0) to preserve current behavor for existing code.

The hard coded flag value (0) should be reviewed on a per-subsystem basis,
and, if possible, set to O_CLOEXEC.

Signed-off-by: Yann Droneaud &lt;ydroneaud@opteya.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: get rid of SCTP_DBG_TSNS entirely</title>
<updated>2013-07-02T07:08:03Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2013-07-01T09:31:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e02010adeeb21ef56d6b9b68c785ed1ecc832aee'/>
<id>urn:sha1:e02010adeeb21ef56d6b9b68c785ed1ecc832aee</id>
<content type='text'>
After having reworked the debugging framework, Neil and Vlad agreed to
get rid of the leftover SCTP_DBG_TSNS code for a couple of reasons:

We can use systemtap scripts to investigate these things, we now have
pr_debug() helpers that make life easier, and if we really need anything
else besides those tools, we will be forced to come up with something
better than we have there. Therefore, get rid of this ifdef debugging
code entirely for now.

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
CC: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
CC: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: rework debugging framework to use pr_debug and friends</title>
<updated>2013-07-02T06:22:13Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2013-06-28T17:49:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bb33381d0c97cdee25f2cdab540b6e2bd16fa03b'/>
<id>urn:sha1:bb33381d0c97cdee25f2cdab540b6e2bd16fa03b</id>
<content type='text'>
We should get rid of all own SCTP debug printk macros and use the ones
that the kernel offers anyway instead. This makes the code more readable
and conform to the kernel code, and offers all the features of dynamic
debbuging that pr_debug() et al has, such as only turning on/off portions
of debug messages at runtime through debugfs. The runtime cost of having
CONFIG_DYNAMIC_DEBUG enabled, but none of the debug statements printing,
is negligible [1]. If kernel debugging is completly turned off, then these
statements will also compile into "empty" functions.

While we're at it, we also need to change the Kconfig option as it /now/
only refers to the ifdef'ed code portions in outqueue.c that enable further
debugging/tracing of SCTP transaction fields. Also, since SCTP_ASSERT code
was enabled with this Kconfig option and has now been removed, we
transform those code parts into WARNs resp. where appropriate BUG_ONs so
that those bugs can be more easily detected as probably not many people
have SCTP debugging permanently turned on.

To turn on all SCTP debugging, the following steps are needed:

 # mount -t debugfs none /sys/kernel/debug
 # echo -n 'module sctp +p' &gt; /sys/kernel/debug/dynamic_debug/control

This can be done more fine-grained on a per file, per line basis and others
as described in [2].

 [1] https://www.kernel.org/doc/ols/2009/ols2009-pages-39-46.pdf
 [2] Documentation/dynamic-debug-howto.txt

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: simplify sctp_get_port</title>
<updated>2013-06-25T23:33:05Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2013-06-25T16:17:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=62208f12451f723cd9e9f1d6d22866a61545e488'/>
<id>urn:sha1:62208f12451f723cd9e9f1d6d22866a61545e488</id>
<content type='text'>
No need to have an extra ret variable when we directly can return
the value of sctp_get_port_local().

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: decouple cleaning some socket data from endpoint</title>
<updated>2013-06-25T23:33:04Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2013-06-25T16:17:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0a2fbac197441ebeafbbef09d4bbc0b5e73716d7'/>
<id>urn:sha1:0a2fbac197441ebeafbbef09d4bbc0b5e73716d7</id>
<content type='text'>
Rather instead of having the endpoint clean the garbage from the
socket, use a sk_destruct handler sctp_destruct_sock(), that does
the job for that when there are no more references on the socket.
At least do this for our crypto transform through crypto_free_hash()
that is allocated when in listening state.

Also, perform sctp_put_port() only when sk is valid. At a later
point in time we can still determine if there's an option of
placing this into sk_prot-&gt;unhash() or sctp_endpoint_free() without
any races. For now, leave it in sctp_endpoint_destroy() though.

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: minor: sctp_seq_dump_local_addrs add missing newline</title>
<updated>2013-06-25T23:33:04Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2013-06-25T16:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b527fe693304d244b6103dc9f8a87150e71c29f7'/>
<id>urn:sha1:b527fe693304d244b6103dc9f8a87150e71c29f7</id>
<content type='text'>
A trailing newline has been forgotten to add into the WARN().

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: migrate cookie life from timeval to ktime</title>
<updated>2013-06-25T23:33:04Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2013-06-25T16:17:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=52db882f3fc2903014e638ee91e690085fe37fdb'/>
<id>urn:sha1:52db882f3fc2903014e638ee91e690085fe37fdb</id>
<content type='text'>
Currently, SCTP code defines its own timeval functions (since timeval
is rarely used inside the kernel by others), namely tv_lt() and
TIMEVAL_ADD() macros, that operate on SCTP cookie expiration.

We might as well remove all those, and operate directly on ktime
structures for a couple of reasons: ktime is available on all archs;
complexity of ktime calculations depending on the arch is less than
(reduces to a simple arithmetic operations on archs with
BITS_PER_LONG == 64 or CONFIG_KTIME_SCALAR) or equal to timeval
functions (other archs); code becomes more readable; macros can be
thrown out.

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
