linux_dsm_epyc7002/net/sunrpc/auth_gss
Chuck Lever 0a8e7b7d08 SUNRPC: Revert 241b1f419f ("SUNRPC: Remove xdr_buf_trim()")
I've noticed that when krb5i or krb5p security is in use,
retransmitted requests are missing the server's duplicate reply
cache. The computed checksum on the retransmitted request does not
match the cached checksum, resulting in the server performing the
retransmitted request again instead of returning the cached reply.

The assumptions made when removing xdr_buf_trim() were not correct.
In the send paths, the upper layer has already set the segment
lengths correctly, and shorting the buffer's content is simply a
matter of reducing buf->len.

xdr_buf_trim() is the right answer in the receive/unwrap path on
both the client and the server. The buffer segment lengths have to
be shortened one-by-one.

On the server side in particular, head.iov_len needs to be updated
correctly to enable nfsd_cache_csum() to work correctly. The simple
buf->len computation doesn't do that, and that results in
checksumming stale data in the buffer.

The problem isn't noticed until there's significant instability of
the RPC transport. At that point, the reliability of retransmit
detection on the server becomes crucial.

Fixes: 241b1f419f ("SUNRPC: Remove xdr_buf_trim()")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2020-04-27 10:58:30 -04:00
..
auth_gss.c SUNRPC: Fix GSS privacy computation of auth->au_ralign 2020-04-27 10:58:30 -04:00
gss_generic_token.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_crypto.c SUNRPC: Add "@len" parameter to gss_unwrap() 2020-04-27 10:58:30 -04:00
gss_krb5_keys.c sunrpc: Use kzfree rather than its implementation. 2019-09-05 12:06:04 +02:00
gss_krb5_mech.c sunrpc: convert to time64_t for expiry 2020-01-15 10:54:30 -05:00
gss_krb5_seal.c sunrpc: convert to time64_t for expiry 2020-01-15 10:54:30 -05:00
gss_krb5_seqnum.c sunrpc: fix 4 more call sites that were using stack memory with a scatterlist 2019-02-15 14:56:51 -05:00
gss_krb5_unseal.c sunrpc: convert to time64_t for expiry 2020-01-15 10:54:30 -05:00
gss_krb5_wrap.c SUNRPC: Revert 241b1f419f ("SUNRPC: Remove xdr_buf_trim()") 2020-04-27 10:58:30 -04:00
gss_mech_switch.c SUNRPC: Add "@len" parameter to gss_unwrap() 2020-04-27 10:58:30 -04:00
gss_rpc_upcall.c SUNRPC: Add SPDX IDs to some net/sunrpc/auth_gss/ files 2019-02-14 09:54:37 -05:00
gss_rpc_upcall.h SUNRPC: Add SPDX IDs to some net/sunrpc/auth_gss/ files 2019-02-14 09:54:37 -05:00
gss_rpc_xdr.c SUNRPC: Add SPDX IDs to some net/sunrpc/auth_gss/ files 2019-02-14 09:54:37 -05:00
gss_rpc_xdr.h SUNRPC: Add SPDX IDs to some net/sunrpc/auth_gss/ files 2019-02-14 09:54:37 -05:00
Makefile SUNRPC: Introduce trace points in rpc_auth_gss.ko 2019-02-14 09:20:40 -05:00
svcauth_gss.c SUNRPC: Revert 241b1f419f ("SUNRPC: Remove xdr_buf_trim()") 2020-04-27 10:58:30 -04:00
trace.c SUNRPC: Introduce trace points in rpc_auth_gss.ko 2019-02-14 09:20:40 -05:00