<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/net/ipv4/esp4_offload.c, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-10-19T07:00:53Z</updated>
<entry>
<title>xfrm: replay: Fix ESN wrap around for GSO</title>
<updated>2022-10-19T07:00:53Z</updated>
<author>
<name>Christian Langrock</name>
<email>christian.langrock@secunet.com</email>
</author>
<published>2022-10-17T06:34:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4b549ccce941798703f159b227aa28c716aa78fa'/>
<id>urn:sha1:4b549ccce941798703f159b227aa28c716aa78fa</id>
<content type='text'>
When using GSO it can happen that the wrong seq_hi is used for the last
packets before the wrap around. This can lead to double usage of a
sequence number. To avoid this, we should serialize this last GSO
packet.

Fixes: d7dbefc45cf5 ("xfrm: Add xfrm_replay_overflow functions for offloading")
Co-developed-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: Christian Langrock &lt;christian.langrock@secunet.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>esp: choose the correct inner protocol for GSO on inter address family tunnels</title>
<updated>2022-08-29T08:20:58Z</updated>
<author>
<name>Sabrina Dubroca</name>
<email>sd@queasysnail.net</email>
</author>
<published>2022-08-25T15:16:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=26dbd66eab8080be51759e48280da04015221e22'/>
<id>urn:sha1:26dbd66eab8080be51759e48280da04015221e22</id>
<content type='text'>
Commit 23c7f8d7989e ("net: Fix esp GSO on inter address family
tunnels.") is incomplete. It passes to skb_eth_gso_segment the
protocol for the outer IP version, instead of the inner IP version, so
we end up calling inet_gso_segment on an inner IPv6 packet and
ipv6_gso_segment on an inner IPv4 packet and the packets are dropped.

This patch completes the fix by selecting the correct protocol based
on the inner mode's family.

Fixes: c35fe4106b92 ("xfrm: Add mode handlers for IPsec on layer 2")
Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>net: Fix esp GSO on inter address family tunnels.</title>
<updated>2022-03-07T12:14:04Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2022-03-07T12:11:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=23c7f8d7989e1646aac82f75761b7648c355cb8a'/>
<id>urn:sha1:23c7f8d7989e1646aac82f75761b7648c355cb8a</id>
<content type='text'>
The esp tunnel GSO handlers use skb_mac_gso_segment to
push the inner packet to the segmentation handlers.
However, skb_mac_gso_segment takes the Ethernet Protocol
ID from 'skb-&gt;protocol' which is wrong for inter address
family tunnels. We fix this by introducing a new
skb_eth_gso_segment function.

This function can be used if it is necessary to pass the
Ethernet Protocol ID directly to the segmentation handler.
First users of this function will be the esp4 and esp6
tunnel segmentation handlers.

Fixes: c35fe4106b92 ("xfrm: Add mode handlers for IPsec on layer 2")
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>esp: Fix BEET mode inter address family tunneling on GSO</title>
<updated>2022-03-07T12:14:03Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2022-03-07T12:11:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=053c8fdf2c930efdff5496960842bbb5c34ad43a'/>
<id>urn:sha1:053c8fdf2c930efdff5496960842bbb5c34ad43a</id>
<content type='text'>
The xfrm{4,6}_beet_gso_segment() functions did not correctly set the
SKB_GSO_IPXIP4 and SKB_GSO_IPXIP6 gso types for the address family
tunneling case. Fix this by setting these gso types.

Fixes: 384a46ea7bdc7 ("esp4: add gso_segment for esp4 beet mode")
Fixes: 7f9e40eb18a99 ("esp6: add gso_segment for esp6 beet mode")
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>net: move gro definitions to include/net/gro.h</title>
<updated>2021-11-16T13:16:54Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2021-11-15T17:05:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4721031c3559db8eae61df305f10c00099a7c1d0'/>
<id>urn:sha1:4721031c3559db8eae61df305f10c00099a7c1d0</id>
<content type='text'>
include/linux/netdevice.h became too big, move gro stuff
into include/net/gro.h

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xfrm: remove description from xfrm_type struct</title>
<updated>2021-06-09T07:38:52Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2021-06-05T10:54:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=152bca090243f2aebbf4c0a2aa723ab610e6f3c4'/>
<id>urn:sha1:152bca090243f2aebbf4c0a2aa723ab610e6f3c4</id>
<content type='text'>
Its set but never read. Reduces size of xfrm_type to 64 bytes on 64bit.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>esp: drop unneeded assignment in esp4_gro_receive()</title>
<updated>2021-05-14T11:44:39Z</updated>
<author>
<name>Yang Li</name>
<email>yang.lee@linux.alibaba.com</email>
</author>
<published>2021-04-25T10:14:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=335a2a1fcefc948927e8c15636d9dc5d983b8f50'/>
<id>urn:sha1:335a2a1fcefc948927e8c15636d9dc5d983b8f50</id>
<content type='text'>
Making '!=' operation with 0 directly after calling
the function xfrm_parse_spi() is more efficient,
assignment to err is redundant.

Eliminate the following clang_analyzer warning:
net/ipv4/esp4_offload.c:41:7: warning: Although the value stored to
'err' is used in the enclosing expression, the value is never actually
read from 'err'

No functional change, only more efficient.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>xfrm: Provide private skb extensions for segmented and hw offloaded ESP packets</title>
<updated>2021-03-29T07:14:12Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2021-03-26T08:44:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c7dbf4c08868d9db89b8bfe8f8245ca61b01ed2f'/>
<id>urn:sha1:c7dbf4c08868d9db89b8bfe8f8245ca61b01ed2f</id>
<content type='text'>
Commit 94579ac3f6d0 ("xfrm: Fix double ESP trailer insertion in IPsec
crypto offload.") added a XFRM_XMIT flag to avoid duplicate ESP trailer
insertion on HW offload. This flag is set on the secpath that is shared
amongst segments. This lead to a situation where some segments are
not transformed correctly when segmentation happens at layer 3.

Fix this by using private skb extensions for segmented and hw offloaded
ESP packets.

Fixes: 94579ac3f6d0 ("xfrm: Fix double ESP trailer insertion in IPsec crypto offload.")
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>esp: delete NETIF_F_SCTP_CRC bit from features for esp offload</title>
<updated>2021-03-22T06:43:31Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2021-03-19T07:35:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=154deab6a3ba47792936edf77f2f13a1cbc4351d'/>
<id>urn:sha1:154deab6a3ba47792936edf77f2f13a1cbc4351d</id>
<content type='text'>
Now in esp4/6_gso_segment(), before calling inner proto .gso_segment,
NETIF_F_CSUM_MASK bits are deleted, as HW won't be able to do the
csum for inner proto due to the packet encrypted already.

So the UDP/TCP packet has to do the checksum on its own .gso_segment.
But SCTP is using CRC checksum, and for that NETIF_F_SCTP_CRC should
be deleted to make SCTP do the csum in own .gso_segment as well.

In Xiumei's testing with SCTP over IPsec/veth, the packets are kept
dropping due to the wrong CRC checksum.

Reported-by: Xiumei Mu &lt;xmu@redhat.com&gt;
Fixes: 7862b4058b9f ("esp: Add gso handlers for esp4 and esp6")
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>net: Simplify the calculation of variables</title>
<updated>2021-01-27T10:49:55Z</updated>
<author>
<name>Jiapeng Zhong</name>
<email>abaci-bugfix@linux.alibaba.com</email>
</author>
<published>2021-01-25T06:41:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0c87b1ac604518a0d3f527080c6883d5c2402fb4'/>
<id>urn:sha1:0c87b1ac604518a0d3f527080c6883d5c2402fb4</id>
<content type='text'>
Fix the following coccicheck warnings:

 ./net/ipv4/esp4_offload.c:288:32-34: WARNING !A || A &amp;&amp; B is
equivalent to !A || B.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Zhong &lt;abaci-bugfix@linux.alibaba.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
</feed>
