mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
SUNRPC: Add a TCP-with-TLS RPC transport class
Use the new TLS handshake API to enable the SunRPC client code to request a TLS handshake. This implements support for RFC 9289, only on TCP sockets. Upper layers such as NFS use RPC-with-TLS to protect in-transit traffic. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
committed by
Trond Myklebust
parent
dea034b963
commit
75eb6af7ac
@@ -1525,6 +1525,50 @@ TRACE_EVENT(rpcb_unregister,
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
** RPC-over-TLS tracepoints
|
||||
**/
|
||||
|
||||
DECLARE_EVENT_CLASS(rpc_tls_class,
|
||||
TP_PROTO(
|
||||
const struct rpc_clnt *clnt,
|
||||
const struct rpc_xprt *xprt
|
||||
),
|
||||
|
||||
TP_ARGS(clnt, xprt),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned long, requested_policy)
|
||||
__field(u32, version)
|
||||
__string(servername, xprt->servername)
|
||||
__string(progname, clnt->cl_program->name)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->requested_policy = clnt->cl_xprtsec.policy;
|
||||
__entry->version = clnt->cl_vers;
|
||||
__assign_str(servername, xprt->servername);
|
||||
__assign_str(progname, clnt->cl_program->name)
|
||||
),
|
||||
|
||||
TP_printk("server=%s %sv%u requested_policy=%s",
|
||||
__get_str(servername), __get_str(progname), __entry->version,
|
||||
rpc_show_xprtsec_policy(__entry->requested_policy)
|
||||
)
|
||||
);
|
||||
|
||||
#define DEFINE_RPC_TLS_EVENT(name) \
|
||||
DEFINE_EVENT(rpc_tls_class, rpc_tls_##name, \
|
||||
TP_PROTO( \
|
||||
const struct rpc_clnt *clnt, \
|
||||
const struct rpc_xprt *xprt \
|
||||
), \
|
||||
TP_ARGS(clnt, xprt))
|
||||
|
||||
DEFINE_RPC_TLS_EVENT(unavailable);
|
||||
DEFINE_RPC_TLS_EVENT(not_started);
|
||||
|
||||
|
||||
/* Record an xdr_buf containing a fully-formed RPC message */
|
||||
DECLARE_EVENT_CLASS(svc_xdr_msg_class,
|
||||
TP_PROTO(
|
||||
|
Reference in New Issue
Block a user