rpcgss.h (53bc19f17f21738735706fabcae3070f16c833db) rpcgss.h (74fb8fecee99f61415dcb6e22dbc24f42988a1d3)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (c) 2018 Oracle. All rights reserved.
4 *
5 * Trace point definitions for the "rpcgss" subsystem.
6 */
7
8#undef TRACE_SYSTEM
9#define TRACE_SYSTEM rpcgss
10
11#if !defined(_TRACE_RPCRDMA_H) || defined(TRACE_HEADER_MULTI_READ)
12#define _TRACE_RPCGSS_H
13
14#include <linux/tracepoint.h>
15
16/**
17 ** GSS-API related trace events
18 **/
19
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (c) 2018 Oracle. All rights reserved.
4 *
5 * Trace point definitions for the "rpcgss" subsystem.
6 */
7
8#undef TRACE_SYSTEM
9#define TRACE_SYSTEM rpcgss
10
11#if !defined(_TRACE_RPCRDMA_H) || defined(TRACE_HEADER_MULTI_READ)
12#define _TRACE_RPCGSS_H
13
14#include <linux/tracepoint.h>
15
16/**
17 ** GSS-API related trace events
18 **/
19
20TRACE_DEFINE_ENUM(RPC_GSS_SVC_NONE);
21TRACE_DEFINE_ENUM(RPC_GSS_SVC_INTEGRITY);
22TRACE_DEFINE_ENUM(RPC_GSS_SVC_PRIVACY);
23
24#define show_gss_service(x) \
25 __print_symbolic(x, \
26 { RPC_GSS_SVC_NONE, "none" }, \
27 { RPC_GSS_SVC_INTEGRITY, "integrity" }, \
28 { RPC_GSS_SVC_PRIVACY, "privacy" })
29
20TRACE_DEFINE_ENUM(GSS_S_BAD_MECH);
21TRACE_DEFINE_ENUM(GSS_S_BAD_NAME);
22TRACE_DEFINE_ENUM(GSS_S_BAD_NAMETYPE);
23TRACE_DEFINE_ENUM(GSS_S_BAD_BINDINGS);
24TRACE_DEFINE_ENUM(GSS_S_BAD_STATUS);
25TRACE_DEFINE_ENUM(GSS_S_BAD_SIG);
26TRACE_DEFINE_ENUM(GSS_S_NO_CRED);
27TRACE_DEFINE_ENUM(GSS_S_NO_CONTEXT);

--- 93 unchanged lines hidden (view full) ---

121 TP_printk("status=%d", __entry->status)
122);
123
124DEFINE_GSSAPI_EVENT(get_mic);
125DEFINE_GSSAPI_EVENT(verify_mic);
126DEFINE_GSSAPI_EVENT(wrap);
127DEFINE_GSSAPI_EVENT(unwrap);
128
30TRACE_DEFINE_ENUM(GSS_S_BAD_MECH);
31TRACE_DEFINE_ENUM(GSS_S_BAD_NAME);
32TRACE_DEFINE_ENUM(GSS_S_BAD_NAMETYPE);
33TRACE_DEFINE_ENUM(GSS_S_BAD_BINDINGS);
34TRACE_DEFINE_ENUM(GSS_S_BAD_STATUS);
35TRACE_DEFINE_ENUM(GSS_S_BAD_SIG);
36TRACE_DEFINE_ENUM(GSS_S_NO_CRED);
37TRACE_DEFINE_ENUM(GSS_S_NO_CONTEXT);

--- 93 unchanged lines hidden (view full) ---

131 TP_printk("status=%d", __entry->status)
132);
133
134DEFINE_GSSAPI_EVENT(get_mic);
135DEFINE_GSSAPI_EVENT(verify_mic);
136DEFINE_GSSAPI_EVENT(wrap);
137DEFINE_GSSAPI_EVENT(unwrap);
138
139DECLARE_EVENT_CLASS(rpcgss_ctx_class,
140 TP_PROTO(
141 const struct gss_cred *gc
142 ),
143
144 TP_ARGS(gc),
145
146 TP_STRUCT__entry(
147 __field(const void *, cred)
148 __field(unsigned long, service)
149 __string(principal, gc->gc_principal)
150 ),
151
152 TP_fast_assign(
153 __entry->cred = gc;
154 __entry->service = gc->gc_service;
155 __assign_str(principal, gc->gc_principal)
156 ),
157
158 TP_printk("cred=%p service=%s principal='%s'",
159 __entry->cred, show_gss_service(__entry->service),
160 __get_str(principal))
161);
162
163#define DEFINE_CTX_EVENT(name) \
164 DEFINE_EVENT(rpcgss_ctx_class, rpcgss_ctx_##name, \
165 TP_PROTO( \
166 const struct gss_cred *gc \
167 ), \
168 TP_ARGS(gc))
169
170DEFINE_CTX_EVENT(init);
171DEFINE_CTX_EVENT(destroy);
172
129TRACE_EVENT(rpcgss_svc_accept_upcall,
130 TP_PROTO(
131 __be32 xid,
132 u32 major_status,
133 u32 minor_status
134 ),
135
136 TP_ARGS(xid, major_status, minor_status),

--- 263 unchanged lines hidden (view full) ---

400 __entry->result = result;
401 ),
402
403 TP_printk("for uid %u, result=%d", __entry->uid, __entry->result)
404);
405
406TRACE_EVENT(rpcgss_context,
407 TP_PROTO(
173TRACE_EVENT(rpcgss_svc_accept_upcall,
174 TP_PROTO(
175 __be32 xid,
176 u32 major_status,
177 u32 minor_status
178 ),
179
180 TP_ARGS(xid, major_status, minor_status),

--- 263 unchanged lines hidden (view full) ---

444 __entry->result = result;
445 ),
446
447 TP_printk("for uid %u, result=%d", __entry->uid, __entry->result)
448);
449
450TRACE_EVENT(rpcgss_context,
451 TP_PROTO(
452 u32 window_size,
408 unsigned long expiry,
409 unsigned long now,
410 unsigned int timeout,
411 unsigned int len,
412 const u8 *data
413 ),
414
453 unsigned long expiry,
454 unsigned long now,
455 unsigned int timeout,
456 unsigned int len,
457 const u8 *data
458 ),
459
415 TP_ARGS(expiry, now, timeout, len, data),
460 TP_ARGS(window_size, expiry, now, timeout, len, data),
416
417 TP_STRUCT__entry(
418 __field(unsigned long, expiry)
419 __field(unsigned long, now)
420 __field(unsigned int, timeout)
461
462 TP_STRUCT__entry(
463 __field(unsigned long, expiry)
464 __field(unsigned long, now)
465 __field(unsigned int, timeout)
466 __field(u32, window_size)
421 __field(int, len)
422 __string(acceptor, data)
423 ),
424
425 TP_fast_assign(
426 __entry->expiry = expiry;
427 __entry->now = now;
428 __entry->timeout = timeout;
467 __field(int, len)
468 __string(acceptor, data)
469 ),
470
471 TP_fast_assign(
472 __entry->expiry = expiry;
473 __entry->now = now;
474 __entry->timeout = timeout;
475 __entry->window_size = window_size;
429 __entry->len = len;
430 strncpy(__get_str(acceptor), data, len);
431 ),
432
476 __entry->len = len;
477 strncpy(__get_str(acceptor), data, len);
478 ),
479
433 TP_printk("gc_expiry=%lu now=%lu timeout=%u acceptor=%.*s",
434 __entry->expiry, __entry->now, __entry->timeout,
435 __entry->len, __get_str(acceptor))
480 TP_printk("win_size=%u expiry=%lu now=%lu timeout=%u acceptor=%.*s",
481 __entry->window_size, __entry->expiry, __entry->now,
482 __entry->timeout, __entry->len, __get_str(acceptor))
436);
437
438
439/**
440 ** Miscellaneous events
441 */
442
443TRACE_DEFINE_ENUM(RPC_AUTH_GSS_KRB5);

--- 54 unchanged lines hidden ---
483);
484
485
486/**
487 ** Miscellaneous events
488 */
489
490TRACE_DEFINE_ENUM(RPC_AUTH_GSS_KRB5);

--- 54 unchanged lines hidden ---