<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/net/xfrm.h, branch v5.8.17</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.8.17</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.8.17'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-10-14T09:55:51+00:00</updated>
<entry>
<title>xfrm: clone XFRMA_REPLAY_ESN_VAL in xfrm_do_migrate</title>
<updated>2020-10-14T09:55:51+00:00</updated>
<author>
<name>Antony Antony</name>
<email>antony.antony@secunet.com</email>
</author>
<published>2020-09-04T06:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3ab37554e6ce52f2ed330872d4949775efbebaf2'/>
<id>urn:sha1:3ab37554e6ce52f2ed330872d4949775efbebaf2</id>
<content type='text'>
[ Upstream commit 91a46c6d1b4fcbfa4773df9421b8ad3e58088101 ]

XFRMA_REPLAY_ESN_VAL was not cloned completely from the old to the new.
Migrate this attribute during XFRMA_MSG_MIGRATE

v1-&gt;v2:
 - move curleft cloning to a separate patch

Fixes: af2f464e326e ("xfrm: Assign esn pointers when cloning a state")
Signed-off-by: Antony Antony &lt;antony.antony@secunet.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfrm: Fix crash when the hold queue is used.</title>
<updated>2020-07-21T06:33:56+00:00</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2020-07-17T08:34:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=101dde4207f1daa1fda57d714814a03835dccc3f'/>
<id>urn:sha1:101dde4207f1daa1fda57d714814a03835dccc3f</id>
<content type='text'>
The commits "xfrm: Move dst-&gt;path into struct xfrm_dst"
and "net: Create and use new helper xfrm_dst_child()."
changed xfrm bundle handling under the assumption
that xdst-&gt;path and dst-&gt;child are not a NULL pointer
only if dst-&gt;xfrm is not a NULL pointer. That is true
with one exception. If the xfrm hold queue is used
to wait until a SA is installed by the key manager,
we create a dummy bundle without a valid dst-&gt;xfrm
pointer. The current xfrm bundle handling crashes
in that case. Fix this by extending the NULL check
of dst-&gt;xfrm with a test of the DST_XFRM_QUEUE flag.

Fixes: 0f6c480f23f4 ("xfrm: Move dst-&gt;path into struct xfrm_dst")
Fixes: b92cf4aab8e6 ("net: Create and use new helper xfrm_dst_child().")
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>xfrm: policy: match with both mark and mask on user interfaces</title>
<updated>2020-06-24T07:13:13+00:00</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2020-06-22T08:40:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f47e8ab6ab796b5380f74866fa5287aca4dcc58'/>
<id>urn:sha1:4f47e8ab6ab796b5380f74866fa5287aca4dcc58</id>
<content type='text'>
In commit ed17b8d377ea ("xfrm: fix a warning in xfrm_policy_insert_list"),
it would take 'priority' to make a policy unique, and allow duplicated
policies with different 'priority' to be added, which is not expected
by userland, as Tobias reported in strongswan.

To fix this duplicated policies issue, and also fix the issue in
commit ed17b8d377ea ("xfrm: fix a warning in xfrm_policy_insert_list"),
when doing add/del/get/update on user interfaces, this patch is to change
to look up a policy with both mark and mask by doing:

  mark.v == pol-&gt;mark.v &amp;&amp; mark.m == pol-&gt;mark.m

and leave the check:

  (mark &amp; pol-&gt;mark.m) == pol-&gt;mark.v

for tx/rx path only.

As the userland expects an exact mark and mask match to manage policies.

v1-&gt;v2:
  - make xfrm_policy_mark_match inline and fix the changelog as
    Tobias suggested.

Fixes: 295fae568885 ("xfrm: Allow user space manipulation of SPD mark")
Fixes: ed17b8d377ea ("xfrm: fix a warning in xfrm_policy_insert_list")
Reported-by: Tobias Brunner &lt;tobias@strongswan.org&gt;
Tested-by: Tobias Brunner &lt;tobias@strongswan.org&gt;
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>xfrm: Fix double ESP trailer insertion in IPsec crypto offload.</title>
<updated>2020-06-04T08:45:14+00:00</updated>
<author>
<name>Huy Nguyen</name>
<email>huyn@mellanox.com</email>
</author>
<published>2020-06-01T21:39:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94579ac3f6d0820adc83b5dc5358ead0158101e9'/>
<id>urn:sha1:94579ac3f6d0820adc83b5dc5358ead0158101e9</id>
<content type='text'>
During IPsec performance testing, we see bad ICMP checksum. The error packet
has duplicated ESP trailer due to double validate_xmit_xfrm calls. The first call
is from ip_output, but the packet cannot be sent because
netif_xmit_frozen_or_stopped is true and the packet gets dev_requeue_skb. The second
call is from NET_TX softirq. However after the first call, the packet already
has the ESP trailer.

Fix by marking the skb with XFRM_XMIT bit after the packet is handled by
validate_xmit_xfrm to avoid duplicate ESP trailer insertion.

Fixes: f6e27114a60a ("net: Add a xfrm validate function to validate_xmit_skb")
Signed-off-by: Huy Nguyen &lt;huyn@mellanox.com&gt;
Reviewed-by: Boris Pismenny &lt;borisp@mellanox.com&gt;
Reviewed-by: Raed Salem &lt;raeds@mellanox.com&gt;
Reviewed-by: Saeed Mahameed &lt;saeedm@mellanox.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>xfrm: remove output_finish indirection from xfrm_state_afinfo</title>
<updated>2020-05-06T07:40:08+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2020-05-04T08:06:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ab6096db2f16b3a6adbad252f1be171e649028d'/>
<id>urn:sha1:2ab6096db2f16b3a6adbad252f1be171e649028d</id>
<content type='text'>
There are only two implementaions, one for ipv4 and one for ipv6.

Both are almost identical, they clear skb-&gt;cb[], set the TRANSFORMED flag
in IP(6)CB and then call the common xfrm_output() function.

By placing the IPCB handling into the common function, we avoid the need
for the output_finish indirection as the output functions can simply
use xfrm_output().

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>xfrm: remove extract_output indirection from xfrm_state_afinfo</title>
<updated>2020-05-06T07:40:08+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2020-05-04T08:06:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f3075f48ddb2c4d076aeda36fa0939163e4b2816'/>
<id>urn:sha1:f3075f48ddb2c4d076aeda36fa0939163e4b2816</id>
<content type='text'>
Move this to xfrm_output.c.  This avoids the state-&gt;extract_output
indirection.

This patch also removes the duplicated __xfrm6_extract_header helper
added in an earlier patch, we can now use the one from xfrm_inout.h .

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>xfrm: place xfrm6_local_dontfrag in xfrm.h</title>
<updated>2020-05-06T07:40:08+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2020-05-04T08:06:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ede64dd2bfe2710549f1922a214959d966baaac3'/>
<id>urn:sha1:ede64dd2bfe2710549f1922a214959d966baaac3</id>
<content type='text'>
so next patch can re-use it from net/xfrm/xfrm_output.c without
causing a linker error when IPV6 is a module.

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>xfrm: expose local_rxpmtu via ipv6_stubs</title>
<updated>2020-05-06T07:40:08+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2020-05-04T08:06:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e50ddd8b8d5067796fc87cbbb25c71451ccb385'/>
<id>urn:sha1:3e50ddd8b8d5067796fc87cbbb25c71451ccb385</id>
<content type='text'>
We cannot call this function from the core kernel unless we would force
CONFIG_IPV6=y.

Therefore expose this via ipv6_stubs so we can call it from net/xfrm
in the followup patch.

Since the call is expected to be unlikely, no extra code for the IPV6=y
case is added and we will always eat the indirection cost.

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>xfrm: move xfrm4_extract_header to common helper</title>
<updated>2020-05-06T07:40:08+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2020-05-04T08:06:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=171916cbd53dec5c7b05efb56a201671d92effc1'/>
<id>urn:sha1:171916cbd53dec5c7b05efb56a201671d92effc1</id>
<content type='text'>
The function only initializes the XFRM CB in the skb.

After previous patch xfrm4_extract_header is only called from
net/xfrm/xfrm_{input,output}.c.

Because of IPV6=m linker errors the ipv6 equivalent
(xfrm6_extract_header) was already placed in xfrm_inout.h because
we can't call functions residing in a module from the core.

So do the same for the ipv4 helper and place it next to the ipv6 one.

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>xfrm: state: remove extract_input indirection from xfrm_state_afinfo</title>
<updated>2020-05-06T07:40:08+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2020-05-04T08:06:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a269fbfc4e9ffe48c1f8142e60a49b6f2e588c58'/>
<id>urn:sha1:a269fbfc4e9ffe48c1f8142e60a49b6f2e588c58</id>
<content type='text'>
In order to keep CONFIG_IPV6=m working, xfrm6_extract_header needs to be
duplicated.  It will be removed again in a followup change when the
remaining caller is moved to net/xfrm as well.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
</feed>
