<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/nfs/filelayout/filelayout.h, branch linux-7.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-10-02T16:48:53+00:00</updated>
<entry>
<title>nfs41: Annotate struct nfs4_file_layout_dsaddr with __counted_by</title>
<updated>2023-10-02T16:48:53+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2023-09-15T20:14:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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>nfs41: pnfs: filelayout: Replace one-element array with flexible-array member</title>
<updated>2022-01-06T19:00:20+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2021-08-10T23:31:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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>NFS store nfs4_deviceid in struct nfs4_filelayout_segment</title>
<updated>2017-03-28T15:21:52+00:00</updated>
<author>
<name>Andy Adamson</name>
<email>andros@netapp.com</email>
</author>
<published>2017-03-20T22:07:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=629dc8704b922f0c46f3025bd3486c2bc51eb7a6'/>
<id>urn:sha1:629dc8704b922f0c46f3025bd3486c2bc51eb7a6</id>
<content type='text'>
In preparation for moving the filelayout getdeviceinfo call from
filelayout_alloc_lseg called by pnfs_process_layout

Signed-off-by: Andy Adamson &lt;andros@netapp.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS cleanup struct nfs4_filelayout_segment</title>
<updated>2017-03-27T20:51:03+00:00</updated>
<author>
<name>Andy Adamson</name>
<email>andros@netapp.com</email>
</author>
<published>2017-03-20T22:07:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=551afbb85b3898e78068405d78708245999c19c0'/>
<id>urn:sha1:551afbb85b3898e78068405d78708245999c19c0</id>
<content type='text'>
Signed-off-by: Andy Adamson &lt;andros@netapp.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
</content>
</entry>
<entry>
<title>nfs41: move file layout macros to generic pnfs</title>
<updated>2015-02-03T19:06:33+00:00</updated>
<author>
<name>Peng Tao</name>
<email>tao.peng@primarydata.com</email>
</author>
<published>2014-05-30T10:15:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=39280a5ae8443dcc1ab3bb5ebc205aab0855b849'/>
<id>urn:sha1:39280a5ae8443dcc1ab3bb5ebc205aab0855b849</id>
<content type='text'>
They can be reused by flexfile layout as well.

Also add a code such that if read fails on one DS and
there are other DSes available to use, don't resend
through MDS but through pNFS so that client can read
from other DSes.

Reviewed-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Signed-off-by: Peng Tao &lt;tao.peng@primarydata.com&gt;
Signed-off-by: Tom Haynes &lt;Thomas.Haynes@primarydata.com&gt;
</content>
</entry>
<entry>
<title>nfs41: pull data server cache from file layout to generic pnfs</title>
<updated>2015-02-03T19:06:32+00:00</updated>
<author>
<name>Peng Tao</name>
<email>tao.peng@primarydata.com</email>
</author>
<published>2014-05-29T13:06:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=875ae0694be48f3e3bdddd435b79abf52b680299'/>
<id>urn:sha1:875ae0694be48f3e3bdddd435b79abf52b680299</id>
<content type='text'>
Also pull nfs4_pnfs_ds_addr and nfs4_pnfs_ds to generic pnfs.

They can all be reused by flexfile layout as well.

Reviewed-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Signed-off-by: Peng Tao &lt;tao.peng@primarydata.com&gt;
Signed-off-by: Tom Haynes &lt;Thomas.Haynes@primarydata.com&gt;
</content>
</entry>
<entry>
<title>pnfs: Prepare for flexfiles by pulling out common code</title>
<updated>2015-02-03T19:06:31+00:00</updated>
<author>
<name>Tom Haynes</name>
<email>loghyr@primarydata.com</email>
</author>
<published>2014-12-11T20:34:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f54bcf2ecee982da47c2baf8bd87fd9ad9984651'/>
<id>urn:sha1:f54bcf2ecee982da47c2baf8bd87fd9ad9984651</id>
<content type='text'>
The flexfilelayout driver will share some common code
with the filelayout driver. This set of changes refactors
that common code out to avoid any module depenencies.

Signed-off-by: Tom Haynes &lt;loghyr@primarydata.com&gt;
</content>
</entry>
<entry>
<title>pnfs: factor GETDEVICEINFO implementations</title>
<updated>2014-09-10T19:47:03+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2014-09-03T04:27:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=661373b13d0490ff410a2133d4a7a117f2dd037e'/>
<id>urn:sha1:661373b13d0490ff410a2133d4a7a117f2dd037e</id>
<content type='text'>
Add support to the common pNFS core to issue GETDEVICEINFO calls on
a device ID cache miss.  The code is taken from the well debugged
file layout implementation and calls out to the layoutdriver through
a new alloc_deviceid_node method.  The calling conventions for
nfs4_find_get_deviceid are changed so that all information needed to
send a GETDEVICEINFO request is passed to the common code.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>Push the file layout driver into a subdirectory</title>
<updated>2014-05-30T00:21:56+00:00</updated>
<author>
<name>Tom Haynes</name>
<email>Thomas.Haynes@primarydata.com</email>
</author>
<published>2014-05-12T21:35:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b5968725f46d9535e908689bd04bf676f71138bb'/>
<id>urn:sha1:b5968725f46d9535e908689bd04bf676f71138bb</id>
<content type='text'>
The object and block layouts already exist in their own
subdirectories. This patch completes the set!

Note that as a layout denotes nfs4 already, I stripped
that prefix out of the file names.

Signed-off-by: Tom Haynes &lt;Thomas.Haynes@primarydata.com&gt;
Acked-by: Jeff Layton &lt;jlayton@poochiereds.net&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
</feed>
