<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/mctp, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-04-13T18:03:13Z</updated>
<entry>
<title>mctp: Use output netdev to allocate skb headroom</title>
<updated>2022-04-13T18:03:13Z</updated>
<author>
<name>Matt Johnston</name>
</author>
<published>2022-04-01T02:48:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=420abafe4f8a8e4347112c151ce58bbf21b36ee3'/>
<id>urn:sha1:420abafe4f8a8e4347112c151ce58bbf21b36ee3</id>
<content type='text'>
[ Upstream commit 4a9dda1c1da65beee994f0977a56a9a21c5db2a7 ]

Previously the skb was allocated with headroom MCTP_HEADER_MAXLEN,
but that isn't sufficient if we are using devs that are not MCTP
specific.

This also adds a check that the smctp_halen provided to sendmsg for
extended addressing is the correct size for the netdev.

Fixes: 833ef3b91de6 ("mctp: Populate socket implementation")
Reported-by: Matthew Rinaldi &lt;mjrinal@g.clemson.edu&gt;
Signed-off-by: Matt Johnston &lt;matt@codeconstruct.com.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mctp: Fix check for dev_hard_header() result</title>
<updated>2022-04-13T18:03:13Z</updated>
<author>
<name>Matt Johnston</name>
</author>
<published>2022-04-01T02:48:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82af53430f818d0a0009f37c7d800882204fa6f1'/>
<id>urn:sha1:82af53430f818d0a0009f37c7d800882204fa6f1</id>
<content type='text'>
[ Upstream commit 60be976ac45137657b7b505d7e0d44d0e51accb7 ]

dev_hard_header() returns the length of the header, so
we need to test for negative errors rather than non-zero.

Fixes: 889b7da23abf ("mctp: Add initial routing framework")
Signed-off-by: Matt Johnston &lt;matt@codeconstruct.com.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mctp: fix use after free</title>
<updated>2022-02-23T11:05:57Z</updated>
<author>
<name>Tom Rix</name>
</author>
<published>2022-02-15T02:05:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1dd3ecbec5f606b2a526c47925c8634b1a6bb81e'/>
<id>urn:sha1:1dd3ecbec5f606b2a526c47925c8634b1a6bb81e</id>
<content type='text'>
commit 7e5b6a5c8c44310784c88c1c198dde79f6402f7b upstream.

Clang static analysis reports this problem
route.c:425:4: warning: Use of memory after it is freed
  trace_mctp_key_acquire(key);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
When mctp_key_add() fails, key is freed but then is later
used in trace_mctp_key_acquire().  Add an else statement
to use the key only when mctp_key_add() is successful.

Fixes: 4f9e1ba6de45 ("mctp: Add tracepoints for tag/key handling")
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mctp: test: zero out sockaddr</title>
<updated>2022-01-27T11:02:58Z</updated>
<author>
<name>Matt Johnston</name>
</author>
<published>2022-01-10T02:18:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1164ad5937880012e109c1f4db3020e64147b8f4'/>
<id>urn:sha1:1164ad5937880012e109c1f4db3020e64147b8f4</id>
<content type='text'>
commit 284a4d94e8e74fbd731ee67e29196656ca823423 upstream.

MCTP now requires that padding bytes are zero.

Signed-off-by: Matt Johnston &lt;matt@codeconstruct.com.au&gt;
Fixes: 1e4b50f06d97 ("mctp: handle the struct sockaddr_mctp padding fields")
Link: https://lore.kernel.org/r/20220110021806.2343023-1-matt@codeconstruct.com.au
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mctp/test: Update refcount checking in route fragment tests</title>
<updated>2022-01-27T11:01:31Z</updated>
<author>
<name>Jeremy Kerr</name>
</author>
<published>2021-11-18T06:57:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de886282a2f4d7648d2878f1ab552cb4adb6aa77'/>
<id>urn:sha1:de886282a2f4d7648d2878f1ab552cb4adb6aa77</id>
<content type='text'>
[ Upstream commit f6ef47e5bdc6f652176e433b02317fc83049f8d7 ]

In 99ce45d5e, we moved a route refcount decrement from
mctp_do_fragment_route into the caller. This invalidates the assumption
that the route test makes about refcount behaviour, so the route tests
fail.

This change fixes the test case to suit the new refcount behaviour.

Fixes: 99ce45d5e7db ("mctp: Implement extended addressing")
Signed-off-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mctp: Remove only static neighbour on RTM_DELNEIGH</title>
<updated>2022-01-02T12:18:14Z</updated>
<author>
<name>Gagan Kumar</name>
</author>
<published>2022-01-01T05:41:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae81de737885820616f9c67c2e7935998b523d58'/>
<id>urn:sha1:ae81de737885820616f9c67c2e7935998b523d58</id>
<content type='text'>
Add neighbour source flag in mctp_neigh_remove(...) to allow removal of
only static neighbours.

This should be a no-op change and might be useful later when mctp can
have MCTP_NEIGH_DISCOVER neighbours.

Signed-off-by: Gagan Kumar &lt;gagan1kumar.cs@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mctp: Don't let RTM_DELROUTE delete local routes</title>
<updated>2021-12-02T12:15:25Z</updated>
<author>
<name>Matt Johnston</name>
</author>
<published>2021-12-01T08:07:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=76d001603c509562181f3787a7065b8e163bc7b9'/>
<id>urn:sha1:76d001603c509562181f3787a7065b8e163bc7b9</id>
<content type='text'>
We need to test against the existing route type, not
the rtm_type in the netlink request.

Fixes: 83f0a0b7285b ("mctp: Specify route types, require rtm_type in RTM_*ROUTE messages")
Signed-off-by: Matt Johnston &lt;matt@codeconstruct.com.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mctp: test: fix skb free in test device tx</title>
<updated>2021-11-29T13:00:09Z</updated>
<author>
<name>Jeremy Kerr</name>
</author>
<published>2021-11-29T02:16:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8519565447078f141c58ba4193d820f2cdf1914'/>
<id>urn:sha1:d8519565447078f141c58ba4193d820f2cdf1914</id>
<content type='text'>
In our test device, we're currently freeing skbs in the transmit path
with kfree(), rather than kfree_skb(). This change uses the correct
kfree_skb() instead.

Fixes: ded21b722995 ("mctp: Add test utils")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mctp: handle the struct sockaddr_mctp_ext padding field</title>
<updated>2021-11-05T02:17:48Z</updated>
<author>
<name>Eugene Syromiatnikov</name>
</author>
<published>2021-11-03T19:09:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e9ea574ec1c27e555e7f78cbbcd28af91889d529'/>
<id>urn:sha1:e9ea574ec1c27e555e7f78cbbcd28af91889d529</id>
<content type='text'>
struct sockaddr_mctp_ext.__smctp_paddin0 has to be checked for being set
to zero, otherwise it cannot be utilised in the future.

Fixes: 99ce45d5e7dbde39 ("mctp: Implement extended addressing")
Signed-off-by: Eugene Syromiatnikov &lt;esyr@redhat.com&gt;
Acked-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>mctp: handle the struct sockaddr_mctp padding fields</title>
<updated>2021-11-05T02:17:34Z</updated>
<author>
<name>Eugene Syromiatnikov</name>
</author>
<published>2021-11-03T19:09:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1e4b50f06d970d8da3474d2a0354450416710bda'/>
<id>urn:sha1:1e4b50f06d970d8da3474d2a0354450416710bda</id>
<content type='text'>
In order to have the padding fields actually usable in the future,
there have to be checks that user space doesn't supply non-zero garbage
there.  It is also worth setting these padding fields to zero, unless
it is known that they have been already zeroed.

Cc: stable@vger.kernel.org # v5.15
Fixes: 5a20dd46b8b84593 ("mctp: Be explicit about struct sockaddr_mctp padding")
Signed-off-by: Eugene Syromiatnikov &lt;esyr@redhat.com&gt;
Acked-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
