Revision tags: v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17 |
|
#
184416d4 |
| 15-Mar-2022 |
Dan Carpenter <dan.carpenter@oracle.com> |
NFSD: prevent underflow in nfssvc_decode_writeargs()
Smatch complains:
fs/nfsd/nfsxdr.c:341 nfssvc_decode_writeargs() warn: no lower bound on 'args->len'
Change the type to unsigned to prevent t
NFSD: prevent underflow in nfssvc_decode_writeargs()
Smatch complains:
fs/nfsd/nfsxdr.c:341 nfssvc_decode_writeargs() warn: no lower bound on 'args->len'
Change the type to unsigned to prevent this issue.
Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
show more ...
|
Revision tags: v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17 |
|
#
184416d4 |
| 15-Mar-2022 |
Dan Carpenter <dan.carpenter@oracle.com> |
NFSD: prevent underflow in nfssvc_decode_writeargs()
Smatch complains:
fs/nfsd/nfsxdr.c:341 nfssvc_decode_writeargs() warn: no lower bound on 'args->len'
Change the type to unsigned to prevent t
NFSD: prevent underflow in nfssvc_decode_writeargs()
Smatch complains:
fs/nfsd/nfsxdr.c:341 nfssvc_decode_writeargs() warn: no lower bound on 'args->len'
Change the type to unsigned to prevent this issue.
Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
show more ...
|
Revision tags: v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7, v5.15-rc6 |
|
#
130e2054 |
| 13-Oct-2021 |
Chuck Lever <chuck.lever@oracle.com> |
SUNRPC: Change return value type of .pc_encode
Returning an undecorated integer is an age-old trope, but it's not clear (even to previous experts in this code) that the only valid return values are
SUNRPC: Change return value type of .pc_encode
Returning an undecorated integer is an age-old trope, but it's not clear (even to previous experts in this code) that the only valid return values are 1 and 0. These functions do not return a negative errno, rpc_stat value, or a positive length.
Document there are only two valid return values by having .pc_encode return only true or false.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
show more ...
|
#
fda49441 |
| 13-Oct-2021 |
Chuck Lever <chuck.lever@oracle.com> |
SUNRPC: Replace the "__be32 *p" parameter to .pc_encode
The passed-in value of the "__be32 *p" parameter is now unused in every server-side XDR encoder, and can be removed.
Note also that there is
SUNRPC: Replace the "__be32 *p" parameter to .pc_encode
The passed-in value of the "__be32 *p" parameter is now unused in every server-side XDR encoder, and can be removed.
Note also that there is a line in each encoder that sets up a local pointer to a struct xdr_stream. Passing that pointer from the dispatcher instead saves one line per encoder function.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
show more ...
|
#
c44b31c2 |
| 12-Oct-2021 |
Chuck Lever <chuck.lever@oracle.com> |
SUNRPC: Change return value type of .pc_decode
Returning an undecorated integer is an age-old trope, but it's not clear (even to previous experts in this code) that the only valid return values are
SUNRPC: Change return value type of .pc_decode
Returning an undecorated integer is an age-old trope, but it's not clear (even to previous experts in this code) that the only valid return values are 1 and 0. These functions do not return a negative errno, rpc_stat value, or a positive length.
Document there are only two valid return values by having .pc_decode return only true or false.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
show more ...
|
#
16c66364 |
| 12-Oct-2021 |
Chuck Lever <chuck.lever@oracle.com> |
SUNRPC: Replace the "__be32 *p" parameter to .pc_decode
The passed-in value of the "__be32 *p" parameter is now unused in every server-side XDR decoder, and can be removed.
Note also that there is
SUNRPC: Replace the "__be32 *p" parameter to .pc_decode
The passed-in value of the "__be32 *p" parameter is now unused in every server-side XDR decoder, and can be removed.
Note also that there is a line in each decoder that sets up a local pointer to a struct xdr_stream. Passing that pointer from the dispatcher instead saves one line per decoder function.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
show more ...
|
Revision tags: v5.15-rc5, v5.15-rc4 |
|
#
dae9a6ca |
| 30-Sep-2021 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Have legacy NFSD WRITE decoders use xdr_stream_subsegment()
Refactor.
Now that the NFSv2 and NFSv3 XDR decoders have been converted to use xdr_streams, the WRITE decoder functions can use xdr
NFSD: Have legacy NFSD WRITE decoders use xdr_stream_subsegment()
Refactor.
Now that the NFSv2 and NFSv3 XDR decoders have been converted to use xdr_streams, the WRITE decoder functions can use xdr_stream_subsegment() to extract the WRITE payload into its own xdr_buf, just as the NFSv4 WRITE XDR decoder currently does.
That makes it possible to pass the first kvec, pages array + length, page_base, and total payload length via a single function parameter.
The payload's page_base is not yet assigned or used, but will be in subsequent patches.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
show more ...
|
Revision tags: v5.15-rc3, v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7, v5.14-rc6, v5.14-rc5, v5.14-rc4, v5.14-rc3, v5.14-rc2, v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1, v5.12, v5.12-rc8, v5.12-rc7, v5.12-rc6, v5.12-rc5, v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1-dontuse, v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4, v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10, v5.10-rc7, v5.10-rc6, v5.10-rc5, v5.10-rc4 |
|
#
83d0b845 |
| 15-Nov-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Clean up after updating NFSv2 ACL encoders
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
f8cba473 |
| 18-Nov-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Update the NFSv2 GETACL result encoder to use struct xdr_stream
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
8a2cf9f5 |
| 15-Nov-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Remove unused NFSv2 directory entry encoders
Clean up.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
f5dcccd6 |
| 14-Nov-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Update the NFSv2 READDIR entry encoder to use struct xdr_stream
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
Revision tags: v5.10-rc3, v5.10-rc2, v5.10-rc1 |
|
#
94c8f8c6 |
| 23-Oct-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Update the NFSv2 READDIR result encoder to use struct xdr_stream
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
d5253200 |
| 13-Nov-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Add a helper that encodes NFSv3 directory offset cookies
Refactor: Add helper function similar to nfs3svc_encode_cookie3().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
a6f8d9dc |
| 23-Oct-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Update the NFSv2 READ result encoder to use struct xdr_stream
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
d9014b0f |
| 23-Oct-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Update the NFSv2 READLINK result encoder to use struct xdr_stream
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
92b54a4f |
| 23-Oct-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Update the NFSv2 attrstat encoder to use struct xdr_stream
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
a887eaed |
| 23-Oct-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Update the NFSv2 stat encoder to use struct xdr_stream
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
baadce65 |
| 19-Oct-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Clean up after updating NFSv2 ACL decoders
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
635a45d3 |
| 17-Nov-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Update the NFSv2 GETACL argument decoder to use struct xdr_stream
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
788cd46e |
| 13-Nov-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Add helper to set up the pages where the dirlist is encoded
Add a helper similar to nfsd3_init_dirlist_pages().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
1fcbd1c9 |
| 21-Oct-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Update the NFSv2 READLINK argument decoder to use struct xdr_stream
If the code that sets up the sink buffer for nfsd_readlink() is moved adjacent to the nfsd_readlink() call site that uses it
NFSD: Update the NFSv2 READLINK argument decoder to use struct xdr_stream
If the code that sets up the sink buffer for nfsd_readlink() is moved adjacent to the nfsd_readlink() call site that uses it, then the only argument is a file handle, and the fhandle decoder can be used instead.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
show more ...
|
#
8c293ef9 |
| 21-Oct-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Update the NFSv2 READ argument decoder to use struct xdr_stream
The code that sets up rq_vec is refactored so that it is now adjacent to the nfsd_read() call site where it is used.
Signed-off
NFSD: Update the NFSv2 READ argument decoder to use struct xdr_stream
The code that sets up rq_vec is refactored so that it is now adjacent to the nfsd_read() call site where it is used.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
show more ...
|
#
ebcd8e8b |
| 21-Oct-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Update the NFSv2 GETATTR argument decoder to use struct xdr_stream
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
#
788f7183 |
| 05-Nov-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Add common helpers to decode void args and encode void results
Start off the conversion to xdr_stream by de-duplicating the functions that decode void arguments and encode void results.
Signe
NFSD: Add common helpers to decode void args and encode void results
Start off the conversion to xdr_stream by de-duplicating the functions that decode void arguments and encode void results.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
show more ...
|
Revision tags: v5.9, v5.9-rc8 |
|
#
cc028a10 |
| 02-Oct-2020 |
Chuck Lever <chuck.lever@oracle.com> |
NFSD: Hoist status code encoding into XDR encoder functions
The original intent was presumably to reduce code duplication. The trade-off was:
- No support for an NFSD proc function returning a non-
NFSD: Hoist status code encoding into XDR encoder functions
The original intent was presumably to reduce code duplication. The trade-off was:
- No support for an NFSD proc function returning a non-success RPC accept_stat value. - No support for void NFS replies to non-NULL procedures. - Everyone pays for the deduplication with a few extra conditional branches in a hot path.
In addition, nfsd_dispatch() leaves *statp uninitialized in the success path, unlike svc_generic_dispatch().
Address all of these problems by moving the logic for encoding the NFS status code into the NFS XDR encoders themselves. Then update the NFS .pc_func methods to return an RPC accept_stat value.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
show more ...
|