<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/net/xfrm, branch v6.13</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://git.kobert.dev/pm24.git/atom/net/xfrm?h=v6.13</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom/net/xfrm?h=v6.13'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2024-11-18T11:52:49Z</updated>
<entry>
<title>Merge tag 'ipsec-next-2024-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next</title>
<updated>2024-11-18T11:52:49Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2024-11-18T11:52:49Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=296a681def3e105f8535c8b3cb0f37f22f710e62'/>
<id>urn:sha1:296a681def3e105f8535c8b3cb0f37f22f710e62</id>
<content type='text'>
Steffen Klassert says:

====================

ipsec-next-11-15

1) Add support for RFC 9611 per cpu xfrm state handling.

2) Add inbound and outbound xfrm state caches to speed up
   state lookups.

3) Convert xfrm to dscp_t. From Guillaume Nault.

4) Fix error handling in build_aevent.
   From Everest K.C.

5) Replace strncpy with strscpy_pad in copy_to_user_auth.
   From Daniel Yang.

6) Fix an uninitialized symbol during acquire state insertion.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xfrm: Fix acquire state insertion.</title>
<updated>2024-11-15T06:25:14Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2024-11-14T11:06:56Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=a35672819f8d85e2ae38b80d40b923e3ef81e4ea'/>
<id>urn:sha1:a35672819f8d85e2ae38b80d40b923e3ef81e4ea</id>
<content type='text'>
A recent commit jumped over the dst hash computation and
left the symbol uninitialized. Fix this by explicitly
computing the dst hash before it is used.

Fixes: 0045e3d80613 ("xfrm: Cache used outbound xfrm states at the policy.")
Reported-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>xfrm: replace deprecated strncpy with strscpy_pad</title>
<updated>2024-11-14T10:38:37Z</updated>
<author>
<name>Daniel Yang</name>
<email>danielyangkang@gmail.com</email>
</author>
<published>2024-11-13T09:20:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=9e1a6db68e3ccc5c20fd2d6243285d1cc7215fe4'/>
<id>urn:sha1:9e1a6db68e3ccc5c20fd2d6243285d1cc7215fe4</id>
<content type='text'>
The function strncpy is deprecated since it does not guarantee the
destination buffer is NULL terminated. Recommended replacement is
strscpy. The padded version was used to remain consistent with the other
strscpy_pad usage in the modified function.

Signed-off-by: Daniel Yang &lt;danielyangkang@gmail.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>xfrm: Add error handling when nla_put_u32() returns an error</title>
<updated>2024-11-14T07:23:15Z</updated>
<author>
<name>Everest K.C</name>
<email>everestkc@everestkc.com.np</email>
</author>
<published>2024-11-12T23:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=9d287e70c51f1c141ac588add261ed2efdd6fc6b'/>
<id>urn:sha1:9d287e70c51f1c141ac588add261ed2efdd6fc6b</id>
<content type='text'>
Error handling is missing when call to nla_put_u32() fails.
Handle the error when the call to nla_put_u32() returns an error.

The error was reported by Coverity Scan.
Report:
CID 1601525: (#1 of 1): Unused value (UNUSED_VALUE)
returned_value: Assigning value from nla_put_u32(skb, XFRMA_SA_PCPU, x-&gt;pcpu_num)
to err here, but that stored value is overwritten before it can be used

Fixes: 1ddf9916ac09 ("xfrm: Add support for per cpu xfrm state handling.")
Signed-off-by: Everest K.C. &lt;everestkc@everestkc.com.np&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Reviewed-by: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>net: convert to nla_get_*_default()</title>
<updated>2024-11-11T18:32:06Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2024-11-08T10:41:45Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=a885a6b2d37eaaae08323583bdb1928c8a2935fc'/>
<id>urn:sha1:a885a6b2d37eaaae08323583bdb1928c8a2935fc</id>
<content type='text'>
Most of the original conversion is from the spatch below,
but I edited some and left out other instances that were
either buggy after conversion (where default values don't
fit into the type) or just looked strange.

    @@
    expression attr, def;
    expression val;
    identifier fn =~ "^nla_get_.*";
    fresh identifier dfn = fn ## "_default";
    @@
    (
    -if (attr)
    -  val = fn(attr);
    -else
    -  val = def;
    +val = dfn(attr, def);
    |
    -if (!attr)
    -  val = def;
    -else
    -  val = fn(attr);
    +val = dfn(attr, def);
    |
    -if (!attr)
    -  return def;
    -return fn(attr);
    +return dfn(attr, def);
    |
    -attr ? fn(attr) : def
    +dfn(attr, def)
    |
    -!attr ? def : fn(attr)
    +dfn(attr, def)
    )

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Reviewed-by: Toke Høiland-Jørgensen &lt;toke@kernel.org&gt;
Link: https://patch.msgid.link/20241108114145.0580b8684e7f.I740beeaa2f70ebfc19bfca1045a24d6151992790@changeid
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>xfrm: Convert struct xfrm_dst_lookup_params -&gt; tos to dscp_t.</title>
<updated>2024-11-06T11:42:51Z</updated>
<author>
<name>Guillaume Nault</name>
<email>gnault@redhat.com</email>
</author>
<published>2024-10-31T15:52:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=e57dfaa4b0a72f6a231a8eedb95d260045bbd8db'/>
<id>urn:sha1:e57dfaa4b0a72f6a231a8eedb95d260045bbd8db</id>
<content type='text'>
Add type annotation to the "tos" field of struct xfrm_dst_lookup_params,
to ensure that the ECN bits aren't mistakenly taken into account when
doing route lookups. Rename that field (tos -&gt; dscp) to make that
change explicit.

Signed-off-by: Guillaume Nault &lt;gnault@redhat.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>xfrm: Convert xfrm_dst_lookup() to dscp_t.</title>
<updated>2024-11-06T11:42:42Z</updated>
<author>
<name>Guillaume Nault</name>
<email>gnault@redhat.com</email>
</author>
<published>2024-10-31T15:52:49Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=3021a2a3403df0fe0b79af15071e5f6ee25461a4'/>
<id>urn:sha1:3021a2a3403df0fe0b79af15071e5f6ee25461a4</id>
<content type='text'>
Pass a dscp_t variable to xfrm_dst_lookup(), instead of an int, to
prevent accidental setting of ECN bits in -&gt;flowi4_tos.

Only xfrm_bundle_create() actually calls xfrm_dst_lookup(). Since it
already has a dscp_t variable to pass as parameter, we only need to
remove the inet_dscp_to_dsfield() conversion.

Signed-off-by: Guillaume Nault &lt;gnault@redhat.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>xfrm: Convert xfrm_bundle_create() to dscp_t.</title>
<updated>2024-11-06T11:42:34Z</updated>
<author>
<name>Guillaume Nault</name>
<email>gnault@redhat.com</email>
</author>
<published>2024-10-31T15:52:43Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=01f61cbfc8b2cf89fe960ea3c1c67bba089dbdc5'/>
<id>urn:sha1:01f61cbfc8b2cf89fe960ea3c1c67bba089dbdc5</id>
<content type='text'>
Use a dscp_t variable to store the result of xfrm_get_dscp().
This prepares for the future conversion of xfrm_dst_lookup().

Signed-off-by: Guillaume Nault &lt;gnault@redhat.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>xfrm: Convert xfrm_get_tos() to dscp_t.</title>
<updated>2024-11-06T11:42:16Z</updated>
<author>
<name>Guillaume Nault</name>
<email>gnault@redhat.com</email>
</author>
<published>2024-10-31T15:52:36Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=766f532089afd202a537f44c09a88ab9912f07d7'/>
<id>urn:sha1:766f532089afd202a537f44c09a88ab9912f07d7</id>
<content type='text'>
Return a dscp_t variable to prepare for the future conversion of
xfrm_bundle_create() to dscp_t.

While there, rename the function "xfrm_get_dscp", to align its name
with the new return type.

Signed-off-by: Guillaume Nault &lt;gnault@redhat.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>xfrm: Restrict percpu SA attribute to specific netlink message types</title>
<updated>2024-10-29T10:56:24Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2024-10-23T10:53:45Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=83dfce38c49f3242c7edf5baab5c79c9ec360ecc'/>
<id>urn:sha1:83dfce38c49f3242c7edf5baab5c79c9ec360ecc</id>
<content type='text'>
Reject the usage of XFRMA_SA_PCPU in xfrm netlink messages when
it's not applicable.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Tested-by: Antony Antony &lt;antony.antony@secunet.com&gt;
Tested-by: Tobias Brunner &lt;tobias@strongswan.org&gt;
</content>
</entry>
</feed>
