linux/net/sunrpc/auth_gss
Arnd Bergmann f559935e7c nfs: use time64_t internally
The timestamps for the cache are all in boottime seconds, so they
don't overflow 32-bit values, but the use of time_t is deprecated
because it generally does overflow when used with wall-clock time.

There are multiple possible ways of avoiding it:

- leave time_t, which is safe here, but forces others to
  look into this code to determine that it is over and over.

- use a more generic type, like 'int' or 'long', which is known
  to be sufficient here but loses the documentation of referring
  to timestamps

- use ktime_t everywhere, and convert into seconds in the few
  places where we want realtime-seconds. The conversion is
  sometimes expensive, but not more so than the conversion we
  do today.

- use time64_t to clarify that this code is safe. Nothing would
  change for 64-bit architectures, but it is slightly less
  efficient on 32-bit architectures.

Without a clear winner of the three approaches above, this picks
the last one, favouring readability over a small performance
loss on 32-bit architectures.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2019-12-18 18:07:32 +01:00
..
auth_gss.c SUNRPC: Rename xdr_buf_read_netobj to xdr_buf_read_mic 2019-09-20 15:15:24 -04:00
gss_generic_token.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_crypto.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08: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 2019-12-18 18:07:32 +01:00
gss_krb5_seal.c sunrpc: convert to time64_t for expiry 2019-12-18 18:07:32 +01: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 2019-12-18 18:07:32 +01:00
gss_krb5_wrap.c sunrpc: convert to time64_t for expiry 2019-12-18 18:07:32 +01:00
gss_mech_switch.c sunrpc: convert to time64_t for expiry 2019-12-18 18:07:32 +01: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 nfs: use time64_t internally 2019-12-18 18:07:32 +01:00
trace.c SUNRPC: Introduce trace points in rpc_auth_gss.ko 2019-02-14 09:20:40 -05:00