lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <750ba8afbaacdc88aee7a03f8e4cf76da87fbbd9.camel@kernel.org>
Date: Sat, 03 May 2025 16:30:07 -0400
From: Jeff Layton <jlayton@...nel.org>
To: cel@...nel.org, NeilBrown <neil@...wn.name>, Olga Kornievskaia	
 <okorniev@...hat.com>, Dai Ngo <dai.ngo@...cle.com>, Tom Talpey
 <tom@...pey.com>,  Trond Myklebust <trond.myklebust@...merspace.com>, Anna
 Schumaker <anna@...nel.org>
Cc: sargun@...gun.me, linux-nfs@...r.kernel.org,
 linux-kernel@...r.kernel.org,  Chuck Lever <chuck.lever@...cle.com>
Subject: Re: [PATCH v4 02/18] NFSD: Add a Call equivalent to the
 NFSD_TRACE_PROC_RES macros

On Sat, 2025-05-03 at 15:59 -0400, cel@...nel.org wrote:
> From: Chuck Lever <chuck.lever@...cle.com>
> 
> Introduce tracing helpers that can be used before the procedure
> status code is known. These macros are similar to the
> SVC_RQST_ENDPOINT helpers, but they can be modified to include
> NFS-specific fields if that is needed later.
> 
> Signed-off-by: Chuck Lever <chuck.lever@...cle.com>
> ---
>  fs/nfsd/trace.h | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h
> index f67ab3d1b506..fc373c4d5fdd 100644
> --- a/fs/nfsd/trace.h
> +++ b/fs/nfsd/trace.h
> @@ -18,6 +18,23 @@
>  #include "nfsfh.h"
>  #include "xdr4.h"
>  
> +#define NFSD_TRACE_PROC_CALL_FIELDS(r) \
> +		__field(unsigned int, netns_ino) \
> +		__field(u32, xid) \
> +		__sockaddr(server, (r)->rq_xprt->xpt_locallen) \
> +		__sockaddr(client, (r)->rq_xprt->xpt_remotelen)
> +
> +#define NFSD_TRACE_PROC_CALL_ASSIGNMENTS(r) \
> +		do { \
> +			struct svc_xprt *xprt = (r)->rq_xprt; \
> +			__entry->netns_ino = SVC_NET(r)->ns.inum; \
> +			__entry->xid = be32_to_cpu((r)->rq_xid); \
> +			__assign_sockaddr(server, &xprt->xpt_local, \
> +					  xprt->xpt_locallen); \
> +			__assign_sockaddr(client, &xprt->xpt_remote, \
> +					  xprt->xpt_remotelen); \
> +		} while (0)
> +
>  #define NFSD_TRACE_PROC_RES_FIELDS(r) \
>  		__field(unsigned int, netns_ino) \
>  		__field(u32, xid) \

Reviewed-by: Jeff Layton <jlayton@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ