diff mbox series

[v2,05/27] SUNRPC: Add svc_xdr_authenticate tracepoint

Message ID 160071187634.1468.12114939901512937472.stgit@klimt.1015granger.net (mailing list archive)
State New, archived
Headers show
Series NFSD operation monitoring tracepoints | expand

Commit Message

Chuck Lever Sept. 21, 2020, 6:11 p.m. UTC
Enable examination of the incoming RPC Call buffer _after_ it has
been unwrapped to help troubleshoot problems with the GSS unwrap
functions.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 include/trace/events/sunrpc.h |    1 +
 net/sunrpc/svcauth.c          |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
index 6afd39572dcd..aac12f45bfb0 100644
--- a/include/trace/events/sunrpc.h
+++ b/include/trace/events/sunrpc.h
@@ -1249,6 +1249,7 @@  DECLARE_EVENT_CLASS(svc_xdr_buf_class,
 
 DEFINE_SVCXDRBUF_EVENT(recvfrom);
 DEFINE_SVCXDRBUF_EVENT(sendto);
+DEFINE_SVCXDRBUF_EVENT(authenticate);
 
 /*
  * from include/linux/sunrpc/svc.h
diff --git a/net/sunrpc/svcauth.c b/net/sunrpc/svcauth.c
index 998b196b6176..593df315b111 100644
--- a/net/sunrpc/svcauth.c
+++ b/net/sunrpc/svcauth.c
@@ -63,6 +63,7 @@  svc_authenticate(struct svc_rqst *rqstp, __be32 *authp)
 {
 	rpc_authflavor_t	flavor;
 	struct auth_ops		*aops;
+	int			ret;
 
 	*authp = rpc_auth_ok;
 
@@ -80,7 +81,9 @@  svc_authenticate(struct svc_rqst *rqstp, __be32 *authp)
 	init_svc_cred(&rqstp->rq_cred);
 
 	rqstp->rq_authop = aops;
-	return aops->accept(rqstp, authp);
+	ret = aops->accept(rqstp, authp);
+	trace_svc_xdr_authenticate(rqstp, &rqstp->rq_arg);
+	return ret;
 }
 EXPORT_SYMBOL_GPL(svc_authenticate);