<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfs/filelayout, branch linux-6.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-10-02T16:48:53Z</updated>
<entry>
<title>nfs41: Annotate struct nfs4_file_layout_dsaddr with __counted_by</title>
<updated>2023-10-02T16:48:53Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2023-09-15T20:14:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0c64aac4916a2592bd174547b279a408368dd31'/>
<id>urn:sha1:c0c64aac4916a2592bd174547b279a408368dd31</id>
<content type='text'>
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct nfs4_file_layout_dsaddr.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Cc: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Cc: Anna Schumaker &lt;anna@kernel.org&gt;
Cc: "Gustavo A. R. Silva" &lt;gustavoars@kernel.org&gt;
Cc: linux-nfs@vger.kernel.org
Link: https://lore.kernel.org/r/20230915201427.never.771-kees@kernel.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pNFS/filelayout: treat GETDEVICEINFO errors as layout failure</title>
<updated>2023-02-15T16:07:54Z</updated>
<author>
<name>Olga Kornievskaia</name>
</author>
<published>2023-01-20T18:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=28d4411fc3b58d7ef2cd00060c068a5d90ee9700'/>
<id>urn:sha1:28d4411fc3b58d7ef2cd00060c068a5d90ee9700</id>
<content type='text'>
When GETDEVICEINFO call fails, return the layout and fall back to MDS.

Signed-off-by: Olga Kornievskaia &lt;kolga@netapp.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>pNFS/filelayout: Fix coalescing test for single DS</title>
<updated>2022-12-20T17:52:39Z</updated>
<author>
<name>Olga Kornievskaia</name>
</author>
<published>2022-12-20T17:31:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6b9d2fa0024e7e399c26facd0fb466b7396e2b9'/>
<id>urn:sha1:a6b9d2fa0024e7e399c26facd0fb466b7396e2b9</id>
<content type='text'>
When there is a single DS no striping constraints need to be placed on
the IO. When such constraint is applied then buffered reads don't
coalesce to the DS's rsize.

Signed-off-by: Olga Kornievskaia &lt;kolga@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>pNFS/files: Handle RDMA connection errors correctly</title>
<updated>2022-07-10T23:00:53Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2022-05-18T21:08:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=431794e67e238e6fd170499a14fd2abf0a16b5bd'/>
<id>urn:sha1:431794e67e238e6fd170499a14fd2abf0a16b5bd</id>
<content type='text'>
The RPC/RDMA driver will return -EPROTO and -ENODEV as connection errors
under certain circumstances. Make sure that we handle them correctly and
avoid cycling forever in a LAYOUTGET/LAYOUTRETURN loop.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>pNFS/files: Fall back to I/O through the MDS on non-fatal layout errors</title>
<updated>2022-05-17T16:53:33Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2022-05-14T14:08:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=126966ddedb60bb7bf9f3b341e26ca8ef1019efc'/>
<id>urn:sha1:126966ddedb60bb7bf9f3b341e26ca8ef1019efc</id>
<content type='text'>
Only report the error when the server is returning a fatal error, such
as ESTALE, EIO, etc...

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>pNFS/files: Ensure pNFS allocation modes are consistent with nfsiod</title>
<updated>2022-03-22T19:52:56Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2022-03-21T21:27:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a245832aaa9930f0ea91527cbd70521722b89313'/>
<id>urn:sha1:a245832aaa9930f0ea91527cbd70521722b89313</id>
<content type='text'>
Ensure that pNFS file commit allocations in rpciod/nfsiod callbacks can
fail in low memory mode, so that the threads don't block and loop
forever.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>nfs41: pnfs: filelayout: Replace one-element array with flexible-array member</title>
<updated>2022-01-06T19:00:20Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2021-08-10T23:31:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c72a826829ccfb38019187a3a5ba6d3584b7b7dc'/>
<id>urn:sha1:c72a826829ccfb38019187a3a5ba6d3584b7b7dc</id>
<content type='text'>
There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use “flexible array members”[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].

Refactor the code a bit according to the use of a flexible-array member
in struct nfs4_file_layout_dsaddr instead of a one-element array, and
use the struct_size() helper.

This helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines
on memcpy().

This issue was found with the help of Coccinelle and audited and fixed,
manually.

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/109
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Trace calls to .rpc_call_done</title>
<updated>2021-10-20T22:09:54Z</updated>
<author>
<name>Chuck Lever</name>
</author>
<published>2021-10-16T22:02:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b40887e10dcacc5e8ae3c1a99dcba20877c4831b'/>
<id>urn:sha1:b40887e10dcacc5e8ae3c1a99dcba20877c4831b</id>
<content type='text'>
Introduce a single tracepoint that can replace simple dprintk call
sites in upper layer "rpc_call_done" callbacks. Example:

   kworker/u24:2-1254  [001]   771.026677: rpc_stats_latency:    task:00000001@00000002 xid=0x16a6f3c0 rpcbindv2 GETPORT backlog=446 rtt=101 execute=555
   kworker/u24:2-1254  [001]   771.026677: rpc_task_call_done:   task:00000001@00000002 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpcb_getport_done
   kworker/u24:2-1254  [001]   771.026678: rpcb_setport:         task:00000001@00000002 status=0 port=20048

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>NFS: fix an incorrect limit in filelayout_decode_layout()</title>
<updated>2021-05-20T16:17:08Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2021-05-11T08:49:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=769b01ea68b6c49dc3cde6adf7e53927dacbd3a8'/>
<id>urn:sha1:769b01ea68b6c49dc3cde6adf7e53927dacbd3a8</id>
<content type='text'>
The "sizeof(struct nfs_fh)" is two bytes too large and could lead to
memory corruption.  It should be NFS_MAXFHSIZE because that's the size
of the -&gt;data[] buffer.

I reversed the size of the arguments to put the variable on the left.

Fixes: 16b374ca439f ("NFSv4.1: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Add xdr_set_scratch_page() and xdr_reset_scratch_buffer()</title>
<updated>2020-11-30T19:46:35Z</updated>
<author>
<name>Chuck Lever</name>
</author>
<published>2020-11-11T20:52:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ae4c3e8a64ace1b8d7de033b0751afe43024416'/>
<id>urn:sha1:0ae4c3e8a64ace1b8d7de033b0751afe43024416</id>
<content type='text'>
Clean up: De-duplicate some frequently-used code.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
</feed>
