<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/tipc/msg.c, branch v3.16</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.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-07-08T22:55:09Z</updated>
<entry>
<title>tipc: fix bug in multicast/broadcast message reassembly</title>
<updated>2014-07-08T22:55:09Z</updated>
<author>
<name>Jon Paul Maloy</name>
<email>jon.maloy@ericsson.com</email>
</author>
<published>2014-07-05T17:44:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=29322d0db98e5a84f5cc6a55655bee3dc4ffb5ab'/>
<id>urn:sha1:29322d0db98e5a84f5cc6a55655bee3dc4ffb5ab</id>
<content type='text'>
Since commit 37e22164a8a3c39bdad45aa463b1e69a1fdf4110 ("tipc: rename and
move message reassembly function") reassembly of long broadcast messages
has been broken. This is because we test for a non-NULL return value
of the *buf parameter as criteria for succesful reassembly. However, this
parameter is left defined even after reception of the first fragment,
when reassebly is still incomplete. This leads to a kernel crash as soon
as a the first fragment of a long broadcast message is received.

We fix this with this commit, by implementing a stricter behavior of the
function and its return values.

This commit should be applied to both net and net-next.

Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Acked-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: rename and move message reassembly function</title>
<updated>2014-05-14T19:19:48Z</updated>
<author>
<name>Jon Paul Maloy</name>
<email>jon.maloy@ericsson.com</email>
</author>
<published>2014-05-14T09:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37e22164a8a3c39bdad45aa463b1e69a1fdf4110'/>
<id>urn:sha1:37e22164a8a3c39bdad45aa463b1e69a1fdf4110</id>
<content type='text'>
The function tipc_link_frag_rcv() is in reality a re-entrant generic
message reassemby function that has nothing in particular to do with
the link, where it is defined now. This becomes obvious when we see
the need to call the function from other places in the code.

In this commit rename it to tipc_buf_append() and move it to the file
msg.c. We also simplify its signature by moving the tail pointer to
the control block of the head buffer, hence making the head buffer
self-contained.

Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Reviewed-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: remove iovec length parameter from all sending functions</title>
<updated>2013-10-18T17:20:42Z</updated>
<author>
<name>Ying Xue</name>
<email>ying.xue@windriver.com</email>
</author>
<published>2013-10-18T05:23:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9446b87addd90a067b21c726aedd3c42694c1780'/>
<id>urn:sha1:9446b87addd90a067b21c726aedd3c42694c1780</id>
<content type='text'>
tipc_msg_build() now copies message data from iovec to skb_buff
using memcpy_fromiovecend(), which doesn't need to be passed the
iovec length to perform the copying.

So we remove the parameter indicating iovec length in all
functions where TIPC messages are built and sent.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: don't use memcpy to copy from user space</title>
<updated>2013-10-18T17:20:42Z</updated>
<author>
<name>Ying Xue</name>
<email>ying.xue@windriver.com</email>
</author>
<published>2013-10-18T05:23:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5c0a0fc81f4dc786b42c4fc9c7c72ba635406ab5'/>
<id>urn:sha1:5c0a0fc81f4dc786b42c4fc9c7c72ba635406ab5</id>
<content type='text'>
tipc_msg_build() calls skb_copy_to_linear_data_offset() to copy data
from user space to kernel space. However, the latter function does
in its turn call memcpy() to perform the actual copying. This poses
an obvious security and robustness risk, since memcpy() never makes
any validity check on the pointer it is copying from.

To correct this, we the replace the offending function call with
a call to memcpy_fromiovecend(), which uses copy_from_user() to
perform the copying.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Reviewed-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: cosmetic realignment of function arguments</title>
<updated>2013-06-17T22:53:01Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2013-06-17T14:54:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ae8509c420122866344bde1241e31858d0aa2fbc'/>
<id>urn:sha1:ae8509c420122866344bde1241e31858d0aa2fbc</id>
<content type='text'>
No runtime code changes here.  Just a realign of the function
arguments to start where the 1st one was, and fit as many args
as can be put in an 80 char line.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: remove user_port instance from tipc_port structure</title>
<updated>2013-06-17T22:53:00Z</updated>
<author>
<name>Ying Xue</name>
<email>ying.xue@windriver.com</email>
</author>
<published>2013-06-17T14:54:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1733d7580ff94deb8ea071a293c23939ae0d450'/>
<id>urn:sha1:f1733d7580ff94deb8ea071a293c23939ae0d450</id>
<content type='text'>
After the native API has been completely removed, the 'user_port'
field in struct tipc_port becomes unused, and can be removed.
As a consequence, the "usrmem" argument in tipc_msg_build() is no
longer needed, and so we remove that one too.

Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: remove TIPC packet debugging functions and macros</title>
<updated>2012-07-13T23:25:16Z</updated>
<author>
<name>Erik Hugne</name>
<email>erik.hugne@ericsson.com</email>
</author>
<published>2012-06-29T04:50:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=568fc588fce85602e4e2c7573f6f912311306b72'/>
<id>urn:sha1:568fc588fce85602e4e2c7573f6f912311306b72</id>
<content type='text'>
The link queue traces and packet level debug functions served
a purpose during early development, but are now redundant
since there are other, more capable tools available for
debugging at the packet level.

The TIPC_DEBUG Kconfig option is removed since it does not
provide any extra debugging features anymore.

This gets rid of a lot of tipc_printf usages, which will
make the pending cleanup work of that function easier.

Signed-off-by: Erik Hugne &lt;erik.hugne@ericsson.com&gt;
Signed-off-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>tipc: compress out gratuitous extra carriage returns</title>
<updated>2012-04-30T19:53:56Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2012-04-30T19:29:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=617d3c7a50b3dc15f558d60013047aede79dc055'/>
<id>urn:sha1:617d3c7a50b3dc15f558d60013047aede79dc055</id>
<content type='text'>
Some of the comment blocks are floating in limbo between two
functions, or between blocks of code.  Delete the extra line
feeds between any comment and its associated following block
of code, to be consistent with the majority of the rest of
the kernel.  Also delete trailing newlines at EOF and fix
a couple trivial typos in existing comments.

This is a 100% cosmetic change with no runtime impact.  We get
rid of over 500 lines of non-code, and being blank line deletes,
they won't even show up as noise in git blame.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>tipc: Eliminate trivial buffer manipulation helper routines</title>
<updated>2012-02-24T22:05:16Z</updated>
<author>
<name>Allan Stephens</name>
<email>allan.stephens@windriver.com</email>
</author>
<published>2011-11-04T17:24:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5f6d9123f1c7ef7297b0da1620988fe16c738e75'/>
<id>urn:sha1:5f6d9123f1c7ef7297b0da1620988fe16c738e75</id>
<content type='text'>
Gets rid of two inlined routines that simply call existing sk_buff
manipulation routines, since there is no longer any extra processing
done by the helper routines.

Note that these changes are essentially cosmetic in nature, and have
no impact on the actual operation of TIPC.

Signed-off-by: Allan Stephens &lt;allan.stephens@windriver.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>tipc: Hide media-specific addressing details from generic bearer code</title>
<updated>2011-12-27T16:33:36Z</updated>
<author>
<name>Allan Stephens</name>
<email>allan.stephens@windriver.com</email>
</author>
<published>2011-10-07T19:19:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d749a6a26b0811b4b2bb4ec2c47cd630a6bbf88'/>
<id>urn:sha1:3d749a6a26b0811b4b2bb4ec2c47cd630a6bbf88</id>
<content type='text'>
Reworks TIPC's media address data structure and associated processing
routines to transfer all media-specific details of address conversion
to the associated TIPC media adaptation code. TIPC's generic bearer code
now only needs to know which media type an address is associated with
and whether or not it is a broadcast address, and totally ignores the
"value" field that contains the actual media-specific addressing info.

These changes eliminate the need for a number of endianness conversion
operations and will make it easier for TIPC to support new media types
in the future.

Signed-off-by: Allan Stephens &lt;allan.stephens@windriver.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
</feed>
