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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 include/trace/events/sunrpc.h |    1 +
 net/sunrpc/svcauth.c          |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

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);
 





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux