#include <linux/types.h>
#include <linux/sched.h>
#include <linux/cred.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/hash.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/gss_api.h>
#include <linux/spinlock.h>
#include <trace/events/sunrpc.h>
#define RPC_CREDCACHE_DEFAULT_HASHBITS …
struct rpc_cred_cache { … };
static unsigned int auth_hashbits = …;
static const struct rpc_authops __rcu *auth_flavors[RPC_AUTH_MAXFLAVOR] = …;
static LIST_HEAD(cred_unused);
static unsigned long number_cred_unused;
static struct cred machine_cred = …;
const struct cred *rpc_machine_cred(void)
{ … }
EXPORT_SYMBOL_GPL(…);
#define MAX_HASHTABLE_BITS …
static int param_set_hashtbl_sz(const char *val, const struct kernel_param *kp)
{ … }
static int param_get_hashtbl_sz(char *buffer, const struct kernel_param *kp)
{ … }
#define param_check_hashtbl_sz(name, p) …
static const struct kernel_param_ops param_ops_hashtbl_sz = …;
module_param_named(auth_hashtable_size, auth_hashbits, hashtbl_sz, 0644);
MODULE_PARM_DESC(…) …;
static unsigned long auth_max_cred_cachesize = …;
module_param(auth_max_cred_cachesize, ulong, 0644);
MODULE_PARM_DESC(…) …;
static u32
pseudoflavor_to_flavor(u32 flavor) { … }
int
rpcauth_register(const struct rpc_authops *ops)
{ … }
EXPORT_SYMBOL_GPL(…);
int
rpcauth_unregister(const struct rpc_authops *ops)
{ … }
EXPORT_SYMBOL_GPL(…);
static const struct rpc_authops *
rpcauth_get_authops(rpc_authflavor_t flavor)
{ … }
static void
rpcauth_put_authops(const struct rpc_authops *ops)
{ … }
rpc_authflavor_t
rpcauth_get_pseudoflavor(rpc_authflavor_t flavor, struct rpcsec_gss_info *info)
{ … }
EXPORT_SYMBOL_GPL(…);
int
rpcauth_get_gssinfo(rpc_authflavor_t pseudoflavor, struct rpcsec_gss_info *info)
{ … }
EXPORT_SYMBOL_GPL(…);
struct rpc_auth *
rpcauth_create(const struct rpc_auth_create_args *args, struct rpc_clnt *clnt)
{ … }
EXPORT_SYMBOL_GPL(…);
void
rpcauth_release(struct rpc_auth *auth)
{ … }
static DEFINE_SPINLOCK(rpc_credcache_lock);
static bool
rpcauth_unhash_cred_locked(struct rpc_cred *cred)
{ … }
static bool
rpcauth_unhash_cred(struct rpc_cred *cred)
{ … }
int
rpcauth_init_credcache(struct rpc_auth *auth)
{ … }
EXPORT_SYMBOL_GPL(…);
char *
rpcauth_stringify_acceptor(struct rpc_cred *cred)
{ … }
EXPORT_SYMBOL_GPL(…);
static inline
void rpcauth_destroy_credlist(struct list_head *head)
{ … }
static void
rpcauth_lru_add_locked(struct rpc_cred *cred)
{ … }
static void
rpcauth_lru_add(struct rpc_cred *cred)
{ … }
static void
rpcauth_lru_remove_locked(struct rpc_cred *cred)
{ … }
static void
rpcauth_lru_remove(struct rpc_cred *cred)
{ … }
void
rpcauth_clear_credcache(struct rpc_cred_cache *cache)
{ … }
void
rpcauth_destroy_credcache(struct rpc_auth *auth)
{ … }
EXPORT_SYMBOL_GPL(…);
#define RPC_AUTH_EXPIRY_MORATORIUM …
static long
rpcauth_prune_expired(struct list_head *free, int nr_to_scan)
{ … }
static unsigned long
rpcauth_cache_do_shrink(int nr_to_scan)
{ … }
static unsigned long
rpcauth_cache_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
{ … }
static unsigned long
rpcauth_cache_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
{ … }
static void
rpcauth_cache_enforce_limit(void)
{ … }
struct rpc_cred *
rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred,
int flags, gfp_t gfp)
{ … }
EXPORT_SYMBOL_GPL(…);
struct rpc_cred *
rpcauth_lookupcred(struct rpc_auth *auth, int flags)
{ … }
EXPORT_SYMBOL_GPL(…);
void
rpcauth_init_cred(struct rpc_cred *cred, const struct auth_cred *acred,
struct rpc_auth *auth, const struct rpc_credops *ops)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct rpc_cred *
rpcauth_bind_root_cred(struct rpc_task *task, int lookupflags)
{ … }
static struct rpc_cred *
rpcauth_bind_machine_cred(struct rpc_task *task, int lookupflags)
{ … }
static struct rpc_cred *
rpcauth_bind_new_cred(struct rpc_task *task, int lookupflags)
{ … }
static int
rpcauth_bindcred(struct rpc_task *task, const struct cred *cred, int flags)
{ … }
void
put_rpccred(struct rpc_cred *cred)
{ … }
EXPORT_SYMBOL_GPL(…);
int rpcauth_marshcred(struct rpc_task *task, struct xdr_stream *xdr)
{ … }
int rpcauth_wrap_req_encode(struct rpc_task *task, struct xdr_stream *xdr)
{ … }
EXPORT_SYMBOL_GPL(…);
int rpcauth_wrap_req(struct rpc_task *task, struct xdr_stream *xdr)
{ … }
int
rpcauth_checkverf(struct rpc_task *task, struct xdr_stream *xdr)
{ … }
int
rpcauth_unwrap_resp_decode(struct rpc_task *task, struct xdr_stream *xdr)
{ … }
EXPORT_SYMBOL_GPL(…);
int
rpcauth_unwrap_resp(struct rpc_task *task, struct xdr_stream *xdr)
{ … }
bool
rpcauth_xmit_need_reencode(struct rpc_task *task)
{ … }
int
rpcauth_refreshcred(struct rpc_task *task)
{ … }
void
rpcauth_invalcred(struct rpc_task *task)
{ … }
int
rpcauth_uptodatecred(struct rpc_task *task)
{ … }
static struct shrinker *rpc_cred_shrinker;
int __init rpcauth_init_module(void)
{ … }
void rpcauth_remove_module(void)
{ … }