Commit d03539d5 authored by David Howells's avatar David Howells Committed by Jakub Kicinski
Browse files

rxrpc: Display security params in the afs_cb_call tracepoint



Make the afs_cb_call tracepoint display some security parameters to make
debugging easier.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
Link: https://patch.msgid.link/20250411095303.2316168-12-dhowells@redhat.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b794dc17
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1178,6 +1178,7 @@ API Function Reference
======================

.. kernel-doc:: net/rxrpc/af_rxrpc.c
.. kernel-doc:: net/rxrpc/call_object.c
.. kernel-doc:: net/rxrpc/key.c
.. kernel-doc:: net/rxrpc/oob.c
.. kernel-doc:: net/rxrpc/peer_object.c
+2 −0
Original line number Diff line number Diff line
@@ -176,8 +176,10 @@ struct afs_call {
	bool			intr;		/* T if interruptible */
	bool			unmarshalling_error; /* T if an unmarshalling error occurred */
	bool			responded;	/* Got a response from the call (may be abort) */
	u8			security_ix;	/* Security class */
	u16			service_id;	/* Actual service ID (after upgrade) */
	unsigned int		debug_id;	/* Trace ID */
	u32			enctype;	/* Security encoding type */
	u32			operation_ID;	/* operation ID for an incoming call */
	u32			count;		/* count for use in unmarshalling */
	union {					/* place to extract temporary data */
+4 −0
Original line number Diff line number Diff line
@@ -813,6 +813,10 @@ static int afs_deliver_cm_op_id(struct afs_call *call)
	if (!afs_cm_incoming_call(call))
		return -ENOTSUPP;

	call->security_ix = rxrpc_kernel_query_call_security(call->rxcall,
							     &call->service_id,
							     &call->enctype);

	trace_afs_cb_call(call);
	call->work.func = call->type->work;

+2 −0
Original line number Diff line number Diff line
@@ -112,5 +112,7 @@ int rxkad_kernel_respond_to_challenge(struct sk_buff *challenge);
u32 rxgk_kernel_query_challenge(struct sk_buff *challenge);
int rxgk_kernel_respond_to_challenge(struct sk_buff *challenge,
				     struct krb5_buffer *appdata);
u8 rxrpc_kernel_query_call_security(struct rxrpc_call *call,
				    u16 *_service_id, u32 *_enctype);

#endif /* _NET_RXRPC_H */
+9 −2
Original line number Diff line number Diff line
@@ -663,19 +663,26 @@ TRACE_EVENT(afs_cb_call,
		    __field(unsigned int,		call)
		    __field(u32,			op)
		    __field(u16,			service_id)
		    __field(u8,				security_ix)
		    __field(u32,			enctype)
			     ),

	    TP_fast_assign(
		    __entry->call	= call->debug_id;
		    __entry->op		= call->operation_ID;
		    __entry->service_id	= call->service_id;
		    __entry->security_ix = call->security_ix;
		    __entry->enctype	= call->enctype;
			   ),

	    TP_printk("c=%08x %s",
	    TP_printk("c=%08x %s sv=%u sx=%u en=%u",
		      __entry->call,
		      __entry->service_id == 2501 ?
		      __print_symbolic(__entry->op, yfs_cm_operations) :
		      __print_symbolic(__entry->op, afs_cm_operations))
		      __print_symbolic(__entry->op, afs_cm_operations),
		      __entry->service_id,
		      __entry->security_ix,
		      __entry->enctype)
	    );

TRACE_EVENT(afs_call,
Loading