<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/vxlan, branch v6.1.87</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.87</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.87'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-10-10T20:00:42+00:00</updated>
<entry>
<title>neighbour: annotate lockless accesses to n-&gt;nud_state</title>
<updated>2023-10-10T20:00:42+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2023-03-13T20:17:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0526933c10058c69a5a85faaa3825116e68fd465'/>
<id>urn:sha1:0526933c10058c69a5a85faaa3825116e68fd465</id>
<content type='text'>
[ Upstream commit b071af523579df7341cabf0f16fc661125e9a13f ]

We have many lockless accesses to n-&gt;nud_state.

Before adding another one in the following patch,
add annotations to readers and writers.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Reviewed-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Stable-dep-of: 5baa0433a15e ("neighbour: fix data-races around n-&gt;output")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers: vxlan: vnifilter: free percpu vni stats on error path</title>
<updated>2023-08-16T16:27:27+00:00</updated>
<author>
<name>Fedor Pchelkin</name>
<email>pchelkin@ispras.ru</email>
</author>
<published>2023-08-04T15:53:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bcbc48b12092b07c9e1c7fcc03a0ceebbfa77bb5'/>
<id>urn:sha1:bcbc48b12092b07c9e1c7fcc03a0ceebbfa77bb5</id>
<content type='text'>
commit b1c936e9af5dd08636d568736fc6075ed9d1d529 upstream.

In case rhashtable_lookup_insert_fast() fails inside vxlan_vni_add(), the
allocated percpu vni stats are not freed on the error path.

Introduce vxlan_vni_free() which would work as a nice wrapper to free
vxlan_vni_node resources properly.

Found by Linux Verification Center (linuxtesting.org).

Fixes: 4095e0e1328a ("drivers: vxlan: vnifilter: per vni stats")
Suggested-by: Ido Schimmel &lt;idosch@idosch.org&gt;
Signed-off-by: Fedor Pchelkin &lt;pchelkin@ispras.ru&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>vxlan: fix GRO with VXLAN-GPE</title>
<updated>2023-08-03T08:23:59+00:00</updated>
<author>
<name>Jiri Benc</name>
<email>jbenc@redhat.com</email>
</author>
<published>2023-07-21T14:30:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69534f5ab78449dc568b3beb2f0c06f6c6438cb1'/>
<id>urn:sha1:69534f5ab78449dc568b3beb2f0c06f6c6438cb1</id>
<content type='text'>
[ Upstream commit b0b672c4d0957e5897685667fc848132b8bd2d71 ]

In VXLAN-GPE, there may not be an Ethernet header following the VXLAN
header. But in GRO, the vxlan driver calls eth_gro_receive
unconditionally, which means the following header is incorrectly parsed
as Ethernet.

Introduce GPE specific GRO handling.

For better performance, do not check for GPE during GRO but rather
install a different set of functions at setup time.

Fixes: e1e5314de08ba ("vxlan: implement GPE")
Reported-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Jiri Benc &lt;jbenc@redhat.com&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>vxlan: generalize vxlan_parse_gpe_hdr and remove unused args</title>
<updated>2023-08-03T08:23:59+00:00</updated>
<author>
<name>Jiri Benc</name>
<email>jbenc@redhat.com</email>
</author>
<published>2023-07-21T14:30:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e22b434ff4a5ed1c16faee2be42f1b88650a2eb'/>
<id>urn:sha1:9e22b434ff4a5ed1c16faee2be42f1b88650a2eb</id>
<content type='text'>
[ Upstream commit 17a0a64448b568442a101de09575f81ffdc45d15 ]

The vxlan_parse_gpe_hdr function extracts the next protocol value from
the GPE header and marks GPE bits as parsed.

In order to be used in the next patch, split the function into protocol
extraction and bit marking. The bit marking is meaningful only in
vxlan_rcv; move it directly there.

Rename the function to vxlan_parse_gpe_proto to reflect what it now
does. Remove unused arguments skb and vxflags. Move the function earlier
in the file to allow it to be called from more places in the next patch.

Signed-off-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Stable-dep-of: b0b672c4d095 ("vxlan: fix GRO with VXLAN-GPE")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>vxlan: calculate correct header length for GPE</title>
<updated>2023-08-03T08:23:59+00:00</updated>
<author>
<name>Jiri Benc</name>
<email>jbenc@redhat.com</email>
</author>
<published>2023-07-20T09:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ddc6ab3834bc7dff3eccc20ff536b5260f159b1c'/>
<id>urn:sha1:ddc6ab3834bc7dff3eccc20ff536b5260f159b1c</id>
<content type='text'>
[ Upstream commit 94d166c5318c6edd1e079df8552233443e909c33 ]

VXLAN-GPE does not add an extra inner Ethernet header. Take that into
account when calculating header length.

This causes problems in skb_tunnel_check_pmtu, where incorrect PMTU is
cached.

In the collect_md mode (which is the only mode that VXLAN-GPE
supports), there's no magic auto-setting of the tunnel interface MTU.
It can't be, since the destination and thus the underlying interface
may be different for each packet.

So, the administrator is responsible for setting the correct tunnel
interface MTU. Apparently, the administrators are capable enough to
calculate that the maximum MTU for VXLAN-GPE is (their_lower_MTU - 36).
They set the tunnel interface MTU to 1464. If you run a TCP stream over
such interface, it's then segmented according to the MTU 1464, i.e.
producing 1514 bytes frames. Which is okay, this still fits the lower
MTU.

However, skb_tunnel_check_pmtu (called from vxlan_xmit_one) uses 50 as
the header size and thus incorrectly calculates the frame size to be
1528. This leads to ICMP too big message being generated (locally),
PMTU of 1450 to be cached and the TCP stream to be resegmented.

The fix is to use the correct actual header size, especially for
skb_tunnel_check_pmtu calculation.

Fixes: e1e5314de08ba ("vxlan: implement GPE")
Signed-off-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&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>vxlan: Fix memory leaks in error path</title>
<updated>2023-01-12T11:02:25+00:00</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@nvidia.com</email>
</author>
<published>2023-01-02T06:55:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5896f55810680391a32652ca2b91245a05c11e22'/>
<id>urn:sha1:5896f55810680391a32652ca2b91245a05c11e22</id>
<content type='text'>
[ Upstream commit 06bf62944144a92d83dd14fd1378d2a288259561 ]

The memory allocated by vxlan_vnigroup_init() is not freed in the error
path, leading to memory leaks [1]. Fix by calling
vxlan_vnigroup_uninit() in the error path.

The leaks can be reproduced by annotating gro_cells_init() with
ALLOW_ERROR_INJECTION() and then running:

 # echo "100" &gt; /sys/kernel/debug/fail_function/probability
 # echo "1" &gt; /sys/kernel/debug/fail_function/times
 # echo "gro_cells_init" &gt; /sys/kernel/debug/fail_function/inject
 # printf %#x -12 &gt; /sys/kernel/debug/fail_function/gro_cells_init/retval
 # ip link add name vxlan0 type vxlan dstport 4789 external vnifilter
 RTNETLINK answers: Cannot allocate memory

[1]
unreferenced object 0xffff88810db84a00 (size 512):
  comm "ip", pid 330, jiffies 4295010045 (age 66.016s)
  hex dump (first 32 bytes):
    f8 d5 76 0e 81 88 ff ff 01 00 00 00 00 00 00 02  ..v.............
    03 00 04 00 48 00 00 00 00 00 00 01 04 00 01 00  ....H...........
  backtrace:
    [&lt;ffffffff81a3097a&gt;] kmalloc_trace+0x2a/0x60
    [&lt;ffffffff82f049fc&gt;] vxlan_vnigroup_init+0x4c/0x160
    [&lt;ffffffff82ecd69e&gt;] vxlan_init+0x1ae/0x280
    [&lt;ffffffff836858ca&gt;] register_netdevice+0x57a/0x16d0
    [&lt;ffffffff82ef67b7&gt;] __vxlan_dev_create+0x7c7/0xa50
    [&lt;ffffffff82ef6ce6&gt;] vxlan_newlink+0xd6/0x130
    [&lt;ffffffff836d02ab&gt;] __rtnl_newlink+0x112b/0x18a0
    [&lt;ffffffff836d0a8c&gt;] rtnl_newlink+0x6c/0xa0
    [&lt;ffffffff836c0ddf&gt;] rtnetlink_rcv_msg+0x43f/0xd40
    [&lt;ffffffff83908ce0&gt;] netlink_rcv_skb+0x170/0x440
    [&lt;ffffffff839066af&gt;] netlink_unicast+0x53f/0x810
    [&lt;ffffffff839072d8&gt;] netlink_sendmsg+0x958/0xe70
    [&lt;ffffffff835c319f&gt;] ____sys_sendmsg+0x78f/0xa90
    [&lt;ffffffff835cd6da&gt;] ___sys_sendmsg+0x13a/0x1e0
    [&lt;ffffffff835cd94c&gt;] __sys_sendmsg+0x11c/0x1f0
    [&lt;ffffffff8424da78&gt;] do_syscall_64+0x38/0x80
unreferenced object 0xffff88810e76d5f8 (size 192):
  comm "ip", pid 330, jiffies 4295010045 (age 66.016s)
  hex dump (first 32 bytes):
    04 00 00 00 00 00 00 00 db e1 4f e7 00 00 00 00  ..........O.....
    08 d6 76 0e 81 88 ff ff 08 d6 76 0e 81 88 ff ff  ..v.......v.....
  backtrace:
    [&lt;ffffffff81a3162e&gt;] __kmalloc_node+0x4e/0x90
    [&lt;ffffffff81a0e166&gt;] kvmalloc_node+0xa6/0x1f0
    [&lt;ffffffff8276e1a3&gt;] bucket_table_alloc.isra.0+0x83/0x460
    [&lt;ffffffff8276f18b&gt;] rhashtable_init+0x43b/0x7c0
    [&lt;ffffffff82f04a1c&gt;] vxlan_vnigroup_init+0x6c/0x160
    [&lt;ffffffff82ecd69e&gt;] vxlan_init+0x1ae/0x280
    [&lt;ffffffff836858ca&gt;] register_netdevice+0x57a/0x16d0
    [&lt;ffffffff82ef67b7&gt;] __vxlan_dev_create+0x7c7/0xa50
    [&lt;ffffffff82ef6ce6&gt;] vxlan_newlink+0xd6/0x130
    [&lt;ffffffff836d02ab&gt;] __rtnl_newlink+0x112b/0x18a0
    [&lt;ffffffff836d0a8c&gt;] rtnl_newlink+0x6c/0xa0
    [&lt;ffffffff836c0ddf&gt;] rtnetlink_rcv_msg+0x43f/0xd40
    [&lt;ffffffff83908ce0&gt;] netlink_rcv_skb+0x170/0x440
    [&lt;ffffffff839066af&gt;] netlink_unicast+0x53f/0x810
    [&lt;ffffffff839072d8&gt;] netlink_sendmsg+0x958/0xe70
    [&lt;ffffffff835c319f&gt;] ____sys_sendmsg+0x78f/0xa90

Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Reviewed-by: Nikolay Aleksandrov &lt;razor@blackwall.org&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>net: move from strlcpy with unused retval to strscpy</title>
<updated>2022-08-31T21:11:07+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2022-08-30T20:14:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fb3ceec187e8bca474340e361a18163a2e79c0a2'/>
<id>urn:sha1:fb3ceec187e8bca474340e361a18163a2e79c0a2</id>
<content type='text'>
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Acked-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt; # for CAN
Link: https://lore.kernel.org/r/20220830201457.7984-1-wsa+renesas@sang-engineering.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: gro: skb_gro_header helper function</title>
<updated>2022-08-25T08:33:21+00:00</updated>
<author>
<name>Richard Gobert</name>
<email>richardbgobert@gmail.com</email>
</author>
<published>2022-08-23T07:10:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35ffb66547295c72650978f9c28e670e014d0957'/>
<id>urn:sha1:35ffb66547295c72650978f9c28e670e014d0957</id>
<content type='text'>
Introduce a simple helper function to replace a common pattern.
When accessing the GRO header, we fetch the pointer from frag0,
then test its validity and fetch it from the skb when necessary.

This leads to the pattern
skb_gro_header_fast -&gt; skb_gro_header_hard -&gt; skb_gro_header_slow
recurring many times throughout GRO code.

This patch replaces these patterns with a single inlined function
call, improving code readability.

Signed-off-by: Richard Gobert &lt;richardbgobert@gmail.com&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Link: https://lore.kernel.org/r/20220823071034.GA56142@debian
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>vxlan: do not use RT_TOS for IPv6 flowlabel</title>
<updated>2022-08-10T05:19:20+00:00</updated>
<author>
<name>Matthias May</name>
<email>matthias.may@westermo.com</email>
</author>
<published>2022-08-05T19:19:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e488d4f5d6e4cd1e728ba4ddbdcd7ef5f4d13a21'/>
<id>urn:sha1:e488d4f5d6e4cd1e728ba4ddbdcd7ef5f4d13a21</id>
<content type='text'>
According to Guillaume Nault RT_TOS should never be used for IPv6.

Quote:
RT_TOS() is an old macro used to interprete IPv4 TOS as described in
the obsolete RFC 1349. It's conceptually wrong to use it even in IPv4
code, although, given the current state of the code, most of the
existing calls have no consequence.

But using RT_TOS() in IPv6 code is always a bug: IPv6 never had a "TOS"
field to be interpreted the RFC 1349 way. There's no historical
compatibility to worry about.

Fixes: 1400615d64cf ("vxlan: allow setting ipv6 traffic class")
Acked-by: Guillaume Nault &lt;gnault@redhat.com&gt;
Signed-off-by: Matthias May &lt;matthias.may@westermo.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>vxlan: Use ip_tunnel_key flow flags in route lookups</title>
<updated>2022-07-26T10:43:16+00:00</updated>
<author>
<name>Paul Chaignon</name>
<email>paul@isovalent.com</email>
</author>
<published>2022-07-25T14:31:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7e2fb8bc7ef6c7a63ca95751b90162dece0b3f4c'/>
<id>urn:sha1:7e2fb8bc7ef6c7a63ca95751b90162dece0b3f4c</id>
<content type='text'>
Use the new ip_tunnel_key field with the flow flags in the IPv4 route
lookups for the encapsulated packet. This will be used by the
bpf_skb_set_tunnel_key helper in a subsequent commit.

Signed-off-by: Paul Chaignon &lt;paul@isovalent.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Reviewed-by: Nikolay Aleksandrov &lt;razor@blackwall.org&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Link: https://lore.kernel.org/bpf/1ffc95c3d60182fd5ec0cf6602083f8f68afe98f.1658759380.git.paul@isovalent.com
</content>
</entry>
</feed>
