<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/net/dst.h, branch linux-5.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-07-28T06:27:13Z</updated>
<entry>
<title>net: make skb_dst_force return true when dst is refcounted</title>
<updated>2019-07-28T06:27:13Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2019-06-26T18:40:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f45b2574be524484496e69e8b8a29fbe8a85fcfc'/>
<id>urn:sha1:f45b2574be524484496e69e8b8a29fbe8a85fcfc</id>
<content type='text'>
[ Upstream commit b60a77386b1d4868f72f6353d35dabe5fbe981f2 ]

netfilter did not expect that skb_dst_force() can cause skb to lose its
dst entry.

I got a bug report with a skb-&gt;dst NULL dereference in netfilter
output path.  The backtrace contains nf_reinject(), so the dst might have
been cleared when skb got queued to userspace.

Other users were fixed via
if (skb_dst(skb)) {
	skb_dst_force(skb);
	if (!skb_dst(skb))
		goto handle_err;
}

But I think its preferable to make the 'dst might be cleared' part
of the function explicit.

In netfilter case, skb with a null dst is expected when queueing in
prerouting hook, so drop skb for the other hooks.

v2:
 v1 of this patch returned true in case skb had no dst entry.
 Eric said:
   Say if we have two skb_dst_force() calls for some reason
   on the same skb, only the first one will return false.

 This now returns false even when skb had no dst, as per Erics
 suggestion, so callers might need to check skb_dst() first before
 skb_dst_force().

Signed-off-by: Florian Westphal &lt;fw@strlen.de&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>net: dst: remove gc leftovers</title>
<updated>2019-03-21T20:39:25Z</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2019-03-20T19:02:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=02afc7ad45bd6cfc9fd51fdbc132455371b63469'/>
<id>urn:sha1:02afc7ad45bd6cfc9fd51fdbc132455371b63469</id>
<content type='text'>
Get rid of some obsolete gc-related documentation and macros that were
missed in commit 5b7c9a8ff828 ("net: remove dst gc related code").

CC: Wei Wang &lt;weiwan@google.com&gt;
Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Acked-by: Wei Wang &lt;weiwan@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>geneve, vxlan: Don't set exceptions if skb-&gt;len &lt; mtu</title>
<updated>2018-10-18T04:51:13Z</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2018-10-12T21:53:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6b4f92af3d59e882d3ba04c44a815266890d188f'/>
<id>urn:sha1:6b4f92af3d59e882d3ba04c44a815266890d188f</id>
<content type='text'>
We shouldn't abuse exceptions: if the destination MTU is already higher
than what we're transmitting, no exception should be created.

Fixes: 52a589d51f10 ("geneve: update skb dst pmtu on tx path")
Fixes: a93bf0ff4490 ("vxlan: update skb dst pmtu on tx path")
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xfrm: Remove xfrmi interface ID from flowi</title>
<updated>2018-07-20T08:14:41Z</updated>
<author>
<name>Benedict Wong</name>
<email>benedictwong@google.com</email>
</author>
<published>2018-07-19T17:50:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bc56b33404599edc412b91933d74b36873e8ea25'/>
<id>urn:sha1:bc56b33404599edc412b91933d74b36873e8ea25</id>
<content type='text'>
In order to remove performance impact of having the extra u32 in every
single flowi, this change removes the flowi_xfrm struct, prefering to
take the if_id as a method parameter where needed.

In the inbound direction, if_id is only needed during the
__xfrm_check_policy() function, and the if_id can be determined at that
point based on the skb. As such, xfrmi_decode_session() is only called
with the skb in __xfrm_check_policy().

In the outbound direction, the only place where if_id is needed is the
xfrm_lookup() call in xfrmi_xmit2(). With this change, the if_id is
directly passed into the xfrm_lookup_with_ifid() call. All existing
callers can still call xfrm_lookup(), which uses a default if_id of 0.

This change does not change any behavior of XFRMIs except for improving
overall system performance via flowi size reduction.

This change has been tested against the Android Kernel Networking Tests:

https://android.googlesource.com/kernel/tests/+/master/net/test

Signed-off-by: Benedict Wong &lt;benedictwong@google.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>net: core: dst: Add kernel-doc for 'net' parameter</title>
<updated>2018-03-05T17:52:45Z</updated>
<author>
<name>Jonathan Neuschäfer</name>
<email>j.neuschaefer@gmx.net</email>
</author>
<published>2018-03-04T02:29:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8eb1a8590f5ca114fabf16ebb26a4bce0255ace9'/>
<id>urn:sha1:8eb1a8590f5ca114fabf16ebb26a4bce0255ace9</id>
<content type='text'>
This fixes the following kernel-doc warning:

./include/net/dst.h:366: warning: Function parameter or member 'net' not described in 'skb_tunnel_rx'

Fixes: ea23192e8e57 ("tunnels: harmonize cleanup done on skb on rx path")
Signed-off-by: Jonathan Neuschäfer &lt;j.neuschaefer@gmx.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2018-01-29T15:15:51Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2018-01-29T15:14:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3e3ab9ccca5b50b11bd4d16c2048b667343354bd'/>
<id>urn:sha1:3e3ab9ccca5b50b11bd4d16c2048b667343354bd</id>
<content type='text'>
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: don't call update_pmtu unconditionally</title>
<updated>2018-01-25T21:27:34Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2018-01-25T18:03:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f15ca723c1ebe6c1a06bc95fda6b62cd87b44559'/>
<id>urn:sha1:f15ca723c1ebe6c1a06bc95fda6b62cd87b44559</id>
<content type='text'>
Some dst_ops (e.g. md_dst_ops)) doesn't set this handler. It may result to:
"BUG: unable to handle kernel NULL pointer dereference at           (null)"

Let's add a helper to check if update_pmtu is available before calling it.

Fixes: 52a589d51f10 ("geneve: update skb dst pmtu on tx path")
Fixes: a93bf0ff4490 ("vxlan: update skb dst pmtu on tx path")
CC: Roman Kapl &lt;code@rkapl.cz&gt;
CC: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Remove dst-&gt;next</title>
<updated>2017-11-30T14:54:27Z</updated>
<author>
<name>David Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2017-11-28T20:41:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7149f813d12d92ba9abcf49026f7cebc3d55c426'/>
<id>urn:sha1:7149f813d12d92ba9abcf49026f7cebc3d55c426</id>
<content type='text'>
There are no more users.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
</content>
</entry>
<entry>
<title>net: Rearrange dst_entry layout to avoid useless padding.</title>
<updated>2017-11-30T14:54:27Z</updated>
<author>
<name>David Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2017-11-28T20:40:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8b207e7374c244484d6cb0f0e80ae400ce0ec0cf'/>
<id>urn:sha1:8b207e7374c244484d6cb0f0e80ae400ce0ec0cf</id>
<content type='text'>
We have padding to try and align the refcount on a separate cache
line.  But after several simplifications the padding has increased
substantially.

So now it's easy to change the layout to get rid of the padding
entirely.

We group the write-heavy __refcnt and __use with less often used
items such as the rcu_head and the error code.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
</content>
</entry>
<entry>
<title>xfrm: Move dst-&gt;path into struct xfrm_dst</title>
<updated>2017-11-30T14:54:26Z</updated>
<author>
<name>David Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2017-11-28T20:40:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0f6c480f23f49b53644b383c5554e579498347f3'/>
<id>urn:sha1:0f6c480f23f49b53644b383c5554e579498347f3</id>
<content type='text'>
The first member of an IPSEC route bundle chain sets it's dst-&gt;path to
the underlying ipv4/ipv6 route that carries the bundle.

Stated another way, if one were to follow the xfrm_dst-&gt;child chain of
the bundle, the final non-NULL pointer would be the path and point to
either an ipv4 or an ipv6 route.

This is largely used to make sure that PMTU events propagate down to
the correct ipv4 or ipv6 route.

When we don't have the top of an IPSEC bundle 'dst-&gt;path == dst'.

Move it down into xfrm_dst and key off of dst-&gt;xfrm.

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