<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net/sunrpc/addr.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-02-28T21:18:18+00:00</updated>
<entry>
<title>net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr()</title>
<updated>2024-02-28T21:18:18+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2023-10-24T21:58:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d6f4de70f73a106986ee315d7d512539f2f3303a'/>
<id>urn:sha1:d6f4de70f73a106986ee315d7d512539f2f3303a</id>
<content type='text'>
The intent is to check if the strings' are truncated or not. So, &gt;= should
be used instead of &gt;, because strlcat() and snprintf() return the length of
the output, excluding the trailing NULL.

Fixes: a02d69261134 ("SUNRPC: Provide functions for managing universal addresses")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>nfsd: don't alloc under spinlock in rpc_parse_scope_id</title>
<updated>2021-09-21T21:51:47+00:00</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2021-09-14T16:30:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9b6e27d01adcec58e046c624874f8a124e8b07ec'/>
<id>urn:sha1:9b6e27d01adcec58e046c624874f8a124e8b07ec</id>
<content type='text'>
Dan Carpenter says:

  The patch d20c11d86d8f: "nfsd: Protect session creation and client
  confirm using client_lock" from Jul 30, 2014, leads to the following
  Smatch static checker warning:

        net/sunrpc/addr.c:178 rpc_parse_scope_id()
        warn: sleeping in atomic context

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Fixes: d20c11d86d8f ("nfsd: Protect session creation and client...")
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: sunrpc: interpret the return value of kstrtou32 correctly</title>
<updated>2021-01-10T18:32:51+00:00</updated>
<author>
<name>j.nixdorf@avm.de</name>
<email>j.nixdorf@avm.de</email>
</author>
<published>2021-01-05T14:17:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=86b53fbf08f48d353a86a06aef537e78e82ba721'/>
<id>urn:sha1:86b53fbf08f48d353a86a06aef537e78e82ba721</id>
<content type='text'>
A return value of 0 means success. This is documented in lib/kstrtox.c.

This was found by trying to mount an NFS share from a link-local IPv6
address with the interface specified by its index:

  mount("[fe80::1%1]:/srv/nfs", "/mnt", "nfs", 0, "nolock,addr=fe80::1%1")

Before this commit this failed with EINVAL and also caused the following
message in dmesg:

  [...] NFS: bad IP address specified: addr=fe80::1%1

The syscall using the same address based on the interface name instead
of its index succeeds.

Credits for this patch go to my colleague Christian Speich, who traced
the origin of this bug to this line of code.

Signed-off-by: Johannes Nixdorf &lt;j.nixdorf@avm.de&gt;
Fixes: 00cfaa943ec3 ("replace strict_strto calls")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>net: sunrpc: Fix off-by-one issues in 'rpc_ntop6'</title>
<updated>2020-05-27T14:08:26+00:00</updated>
<author>
<name>Fedor Tokarev</name>
<email>ftokarev@gmail.com</email>
</author>
<published>2020-03-28T11:56:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=118917d696dc59fd3e1741012c2f9db2294bed6f'/>
<id>urn:sha1:118917d696dc59fd3e1741012c2f9db2294bed6f</id>
<content type='text'>
Fix off-by-one issues in 'rpc_ntop6':
 - 'snprintf' returns the number of characters which would have been
   written if enough space had been available, excluding the terminating
   null byte. Thus, a return value of 'sizeof(scopebuf)' means that the
   last character was dropped.
 - 'strcat' adds a terminating null byte to the string, thus if len ==
   buflen, the null byte is written past the end of the buffer.

Signed-off-by: Fedor Tokarev &lt;ftokarev@gmail.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Use kmemdup_nul() in rpc_parse_scope_id()</title>
<updated>2020-02-03T21:35:07+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trondmy@gmail.com</email>
</author>
<published>2020-02-02T22:57:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ccbddbe3e67591a02ddd20078d1241bd8fe79f3'/>
<id>urn:sha1:7ccbddbe3e67591a02ddd20078d1241bd8fe79f3</id>
<content type='text'>
Using kmemdup_nul() is more efficient when the length is known.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>treewide: Add SPDX license identifier for missed files</title>
<updated>2019-05-21T08:50:45+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-19T12:08:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=457c89965399115e5cd8bf38f9c597293405703d'/>
<id>urn:sha1:457c89965399115e5cd8bf38f9c597293405703d</id>
<content type='text'>
Add SPDX license identifiers to all files which:

 - Have no license information of any form

 - Have EXPORT_.*_SYMBOL_GPL inside which was used in the
   initial scan/conversion to ignore the file

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>replace strict_strto calls</title>
<updated>2014-07-12T22:45:49+00:00</updated>
<author>
<name>Daniel Walter</name>
<email>dwalter@google.com</email>
</author>
<published>2014-06-21T12:06:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=00cfaa943ec30abbc7109b0b918e0b6a0eef07dc'/>
<id>urn:sha1:00cfaa943ec30abbc7109b0b918e0b6a0eef07dc</id>
<content type='text'>
Replace obsolete strict_strto calls with appropriate kstrto calls

Signed-off-by: Daniel Walter &lt;dwalter@google.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: move address copy/cmp/convert routines and prototypes from clnt.h to addr.h</title>
<updated>2013-02-05T14:41:14+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@redhat.com</email>
</author>
<published>2013-02-04T17:50:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5976687a2b3d1969f02aba16b80ad3ed79be6ad3'/>
<id>urn:sha1:5976687a2b3d1969f02aba16b80ad3ed79be6ad3</id>
<content type='text'>
These routines are used by server and client code, so having them in a
separate header would be best.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Acked-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: parametrize rpc_uaddr2sockaddr() by network context</title>
<updated>2012-02-01T00:28:12+00:00</updated>
<author>
<name>Stanislav Kinsbursky</name>
<email>skinsbursky@parallels.com</email>
</author>
<published>2012-01-13T09:09:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f2ac4dc911fdbc9b98a6a48b40efc45aa9161775'/>
<id>urn:sha1:f2ac4dc911fdbc9b98a6a48b40efc45aa9161775</id>
<content type='text'>
Parametrize rpc_uaddr2sockaddr() by network context and thus force it's callers to pass
in network context instead of using hard-coded "init_net".

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: parametrize rpc_pton() by network context</title>
<updated>2012-02-01T00:28:12+00:00</updated>
<author>
<name>Stanislav Kinsbursky</name>
<email>skinsbursky@parallels.com</email>
</author>
<published>2012-01-13T09:09:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=90100b1766c914c820baa78b5be6845fae1159b8'/>
<id>urn:sha1:90100b1766c914c820baa78b5be6845fae1159b8</id>
<content type='text'>
Parametrize rpc_pton() by network context and thus force it's callers to pass
in network context instead of using hard-coded "init_net".

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
</feed>
