10c77668dSChuck Lever /* SPDX-License-Identifier: GPL-2.0 */ 20c77668dSChuck Lever /* 30c77668dSChuck Lever * Copyright (c) 2018 Oracle. All rights reserved. 40c77668dSChuck Lever * 50c77668dSChuck Lever * Trace point definitions for the "rpcgss" subsystem. 60c77668dSChuck Lever */ 70c77668dSChuck Lever 80c77668dSChuck Lever #undef TRACE_SYSTEM 90c77668dSChuck Lever #define TRACE_SYSTEM rpcgss 100c77668dSChuck Lever 110c77668dSChuck Lever #if !defined(_TRACE_RPCRDMA_H) || defined(TRACE_HEADER_MULTI_READ) 120c77668dSChuck Lever #define _TRACE_RPCGSS_H 130c77668dSChuck Lever 140c77668dSChuck Lever #include <linux/tracepoint.h> 150c77668dSChuck Lever 160c77668dSChuck Lever /** 170c77668dSChuck Lever ** GSS-API related trace events 180c77668dSChuck Lever **/ 190c77668dSChuck Lever 20*74fb8fecSChuck Lever TRACE_DEFINE_ENUM(RPC_GSS_SVC_NONE); 21*74fb8fecSChuck Lever TRACE_DEFINE_ENUM(RPC_GSS_SVC_INTEGRITY); 22*74fb8fecSChuck Lever TRACE_DEFINE_ENUM(RPC_GSS_SVC_PRIVACY); 23*74fb8fecSChuck Lever 24*74fb8fecSChuck Lever #define show_gss_service(x) \ 25*74fb8fecSChuck Lever __print_symbolic(x, \ 26*74fb8fecSChuck Lever { RPC_GSS_SVC_NONE, "none" }, \ 27*74fb8fecSChuck Lever { RPC_GSS_SVC_INTEGRITY, "integrity" }, \ 28*74fb8fecSChuck Lever { RPC_GSS_SVC_PRIVACY, "privacy" }) 29*74fb8fecSChuck Lever 300c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_BAD_MECH); 310c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_BAD_NAME); 320c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_BAD_NAMETYPE); 330c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_BAD_BINDINGS); 340c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_BAD_STATUS); 350c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_BAD_SIG); 360c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_NO_CRED); 370c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_NO_CONTEXT); 380c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_DEFECTIVE_TOKEN); 390c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_DEFECTIVE_CREDENTIAL); 400c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_CREDENTIALS_EXPIRED); 410c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_CONTEXT_EXPIRED); 420c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_FAILURE); 430c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_BAD_QOP); 440c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_UNAUTHORIZED); 450c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_UNAVAILABLE); 460c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_DUPLICATE_ELEMENT); 470c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_NAME_NOT_MN); 480c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_CONTINUE_NEEDED); 490c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_DUPLICATE_TOKEN); 500c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_OLD_TOKEN); 510c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_UNSEQ_TOKEN); 520c77668dSChuck Lever TRACE_DEFINE_ENUM(GSS_S_GAP_TOKEN); 530c77668dSChuck Lever 540c77668dSChuck Lever #define show_gss_status(x) \ 550c77668dSChuck Lever __print_flags(x, "|", \ 560c77668dSChuck Lever { GSS_S_BAD_MECH, "GSS_S_BAD_MECH" }, \ 570c77668dSChuck Lever { GSS_S_BAD_NAME, "GSS_S_BAD_NAME" }, \ 580c77668dSChuck Lever { GSS_S_BAD_NAMETYPE, "GSS_S_BAD_NAMETYPE" }, \ 590c77668dSChuck Lever { GSS_S_BAD_BINDINGS, "GSS_S_BAD_BINDINGS" }, \ 600c77668dSChuck Lever { GSS_S_BAD_STATUS, "GSS_S_BAD_STATUS" }, \ 610c77668dSChuck Lever { GSS_S_BAD_SIG, "GSS_S_BAD_SIG" }, \ 620c77668dSChuck Lever { GSS_S_NO_CRED, "GSS_S_NO_CRED" }, \ 630c77668dSChuck Lever { GSS_S_NO_CONTEXT, "GSS_S_NO_CONTEXT" }, \ 640c77668dSChuck Lever { GSS_S_DEFECTIVE_TOKEN, "GSS_S_DEFECTIVE_TOKEN" }, \ 650c77668dSChuck Lever { GSS_S_DEFECTIVE_CREDENTIAL, "GSS_S_DEFECTIVE_CREDENTIAL" }, \ 660c77668dSChuck Lever { GSS_S_CREDENTIALS_EXPIRED, "GSS_S_CREDENTIALS_EXPIRED" }, \ 670c77668dSChuck Lever { GSS_S_CONTEXT_EXPIRED, "GSS_S_CONTEXT_EXPIRED" }, \ 680c77668dSChuck Lever { GSS_S_FAILURE, "GSS_S_FAILURE" }, \ 690c77668dSChuck Lever { GSS_S_BAD_QOP, "GSS_S_BAD_QOP" }, \ 700c77668dSChuck Lever { GSS_S_UNAUTHORIZED, "GSS_S_UNAUTHORIZED" }, \ 710c77668dSChuck Lever { GSS_S_UNAVAILABLE, "GSS_S_UNAVAILABLE" }, \ 720c77668dSChuck Lever { GSS_S_DUPLICATE_ELEMENT, "GSS_S_DUPLICATE_ELEMENT" }, \ 730c77668dSChuck Lever { GSS_S_NAME_NOT_MN, "GSS_S_NAME_NOT_MN" }, \ 740c77668dSChuck Lever { GSS_S_CONTINUE_NEEDED, "GSS_S_CONTINUE_NEEDED" }, \ 750c77668dSChuck Lever { GSS_S_DUPLICATE_TOKEN, "GSS_S_DUPLICATE_TOKEN" }, \ 760c77668dSChuck Lever { GSS_S_OLD_TOKEN, "GSS_S_OLD_TOKEN" }, \ 770c77668dSChuck Lever { GSS_S_UNSEQ_TOKEN, "GSS_S_UNSEQ_TOKEN" }, \ 780c77668dSChuck Lever { GSS_S_GAP_TOKEN, "GSS_S_GAP_TOKEN" }) 790c77668dSChuck Lever 800c77668dSChuck Lever 810c77668dSChuck Lever DECLARE_EVENT_CLASS(rpcgss_gssapi_event, 820c77668dSChuck Lever TP_PROTO( 830c77668dSChuck Lever const struct rpc_task *task, 840c77668dSChuck Lever u32 maj_stat 850c77668dSChuck Lever ), 860c77668dSChuck Lever 870c77668dSChuck Lever TP_ARGS(task, maj_stat), 880c77668dSChuck Lever 890c77668dSChuck Lever TP_STRUCT__entry( 900c77668dSChuck Lever __field(unsigned int, task_id) 910c77668dSChuck Lever __field(unsigned int, client_id) 920c77668dSChuck Lever __field(u32, maj_stat) 930c77668dSChuck Lever 940c77668dSChuck Lever ), 950c77668dSChuck Lever 960c77668dSChuck Lever TP_fast_assign( 970c77668dSChuck Lever __entry->task_id = task->tk_pid; 980c77668dSChuck Lever __entry->client_id = task->tk_client->cl_clid; 990c77668dSChuck Lever __entry->maj_stat = maj_stat; 1000c77668dSChuck Lever ), 1010c77668dSChuck Lever 1020c77668dSChuck Lever TP_printk("task:%u@%u maj_stat=%s", 1030c77668dSChuck Lever __entry->task_id, __entry->client_id, 1040c77668dSChuck Lever __entry->maj_stat == 0 ? 1050c77668dSChuck Lever "GSS_S_COMPLETE" : show_gss_status(__entry->maj_stat)) 1060c77668dSChuck Lever ); 1070c77668dSChuck Lever 1080c77668dSChuck Lever #define DEFINE_GSSAPI_EVENT(name) \ 1090c77668dSChuck Lever DEFINE_EVENT(rpcgss_gssapi_event, rpcgss_##name, \ 1100c77668dSChuck Lever TP_PROTO( \ 1110c77668dSChuck Lever const struct rpc_task *task, \ 1120c77668dSChuck Lever u32 maj_stat \ 1130c77668dSChuck Lever ), \ 1140c77668dSChuck Lever TP_ARGS(task, maj_stat)) 1150c77668dSChuck Lever 1160c77668dSChuck Lever TRACE_EVENT(rpcgss_import_ctx, 1170c77668dSChuck Lever TP_PROTO( 1180c77668dSChuck Lever int status 1190c77668dSChuck Lever ), 1200c77668dSChuck Lever 1210c77668dSChuck Lever TP_ARGS(status), 1220c77668dSChuck Lever 1230c77668dSChuck Lever TP_STRUCT__entry( 1240c77668dSChuck Lever __field(int, status) 1250c77668dSChuck Lever ), 1260c77668dSChuck Lever 1270c77668dSChuck Lever TP_fast_assign( 1280c77668dSChuck Lever __entry->status = status; 1290c77668dSChuck Lever ), 1300c77668dSChuck Lever 1310c77668dSChuck Lever TP_printk("status=%d", __entry->status) 1320c77668dSChuck Lever ); 1330c77668dSChuck Lever 1340c77668dSChuck Lever DEFINE_GSSAPI_EVENT(get_mic); 1350c77668dSChuck Lever DEFINE_GSSAPI_EVENT(verify_mic); 1360c77668dSChuck Lever DEFINE_GSSAPI_EVENT(wrap); 1370c77668dSChuck Lever DEFINE_GSSAPI_EVENT(unwrap); 1380c77668dSChuck Lever 139*74fb8fecSChuck Lever DECLARE_EVENT_CLASS(rpcgss_ctx_class, 140*74fb8fecSChuck Lever TP_PROTO( 141*74fb8fecSChuck Lever const struct gss_cred *gc 142*74fb8fecSChuck Lever ), 143*74fb8fecSChuck Lever 144*74fb8fecSChuck Lever TP_ARGS(gc), 145*74fb8fecSChuck Lever 146*74fb8fecSChuck Lever TP_STRUCT__entry( 147*74fb8fecSChuck Lever __field(const void *, cred) 148*74fb8fecSChuck Lever __field(unsigned long, service) 149*74fb8fecSChuck Lever __string(principal, gc->gc_principal) 150*74fb8fecSChuck Lever ), 151*74fb8fecSChuck Lever 152*74fb8fecSChuck Lever TP_fast_assign( 153*74fb8fecSChuck Lever __entry->cred = gc; 154*74fb8fecSChuck Lever __entry->service = gc->gc_service; 155*74fb8fecSChuck Lever __assign_str(principal, gc->gc_principal) 156*74fb8fecSChuck Lever ), 157*74fb8fecSChuck Lever 158*74fb8fecSChuck Lever TP_printk("cred=%p service=%s principal='%s'", 159*74fb8fecSChuck Lever __entry->cred, show_gss_service(__entry->service), 160*74fb8fecSChuck Lever __get_str(principal)) 161*74fb8fecSChuck Lever ); 162*74fb8fecSChuck Lever 163*74fb8fecSChuck Lever #define DEFINE_CTX_EVENT(name) \ 164*74fb8fecSChuck Lever DEFINE_EVENT(rpcgss_ctx_class, rpcgss_ctx_##name, \ 165*74fb8fecSChuck Lever TP_PROTO( \ 166*74fb8fecSChuck Lever const struct gss_cred *gc \ 167*74fb8fecSChuck Lever ), \ 168*74fb8fecSChuck Lever TP_ARGS(gc)) 169*74fb8fecSChuck Lever 170*74fb8fecSChuck Lever DEFINE_CTX_EVENT(init); 171*74fb8fecSChuck Lever DEFINE_CTX_EVENT(destroy); 172*74fb8fecSChuck Lever 17328155524SChuck Lever TRACE_EVENT(rpcgss_svc_accept_upcall, 174ff27e9f7SChuck Lever TP_PROTO( 175ff27e9f7SChuck Lever __be32 xid, 176ff27e9f7SChuck Lever u32 major_status, 177ff27e9f7SChuck Lever u32 minor_status 178ff27e9f7SChuck Lever ), 179ff27e9f7SChuck Lever 180ff27e9f7SChuck Lever TP_ARGS(xid, major_status, minor_status), 181ff27e9f7SChuck Lever 182ff27e9f7SChuck Lever TP_STRUCT__entry( 183ff27e9f7SChuck Lever __field(u32, xid) 184ff27e9f7SChuck Lever __field(u32, minor_status) 185ff27e9f7SChuck Lever __field(unsigned long, major_status) 186ff27e9f7SChuck Lever ), 187ff27e9f7SChuck Lever 188ff27e9f7SChuck Lever TP_fast_assign( 189ff27e9f7SChuck Lever __entry->xid = be32_to_cpu(xid); 190ff27e9f7SChuck Lever __entry->minor_status = minor_status; 191ff27e9f7SChuck Lever __entry->major_status = major_status; 192ff27e9f7SChuck Lever ), 193ff27e9f7SChuck Lever 194ff27e9f7SChuck Lever TP_printk("xid=0x%08x major_status=%s (0x%08lx) minor_status=%u", 195ff27e9f7SChuck Lever __entry->xid, __entry->major_status == 0 ? "GSS_S_COMPLETE" : 196ff27e9f7SChuck Lever show_gss_status(__entry->major_status), 197ff27e9f7SChuck Lever __entry->major_status, __entry->minor_status 198ff27e9f7SChuck Lever ) 199ff27e9f7SChuck Lever ); 200ff27e9f7SChuck Lever 20128155524SChuck Lever TRACE_EVENT(rpcgss_svc_accept, 20228155524SChuck Lever TP_PROTO( 20328155524SChuck Lever __be32 xid, 20428155524SChuck Lever size_t len 20528155524SChuck Lever ), 20628155524SChuck Lever 20728155524SChuck Lever TP_ARGS(xid, len), 20828155524SChuck Lever 20928155524SChuck Lever TP_STRUCT__entry( 21028155524SChuck Lever __field(u32, xid) 21128155524SChuck Lever __field(size_t, len) 21228155524SChuck Lever ), 21328155524SChuck Lever 21428155524SChuck Lever TP_fast_assign( 21528155524SChuck Lever __entry->xid = be32_to_cpu(xid); 21628155524SChuck Lever __entry->len = len; 21728155524SChuck Lever ), 21828155524SChuck Lever 21928155524SChuck Lever TP_printk("xid=0x%08x len=%zu", 22028155524SChuck Lever __entry->xid, __entry->len 22128155524SChuck Lever ) 22228155524SChuck Lever ); 22328155524SChuck Lever 2240c77668dSChuck Lever 2250c77668dSChuck Lever /** 2260c77668dSChuck Lever ** GSS auth unwrap failures 2270c77668dSChuck Lever **/ 2280c77668dSChuck Lever 2290c77668dSChuck Lever TRACE_EVENT(rpcgss_unwrap_failed, 2300c77668dSChuck Lever TP_PROTO( 2310c77668dSChuck Lever const struct rpc_task *task 2320c77668dSChuck Lever ), 2330c77668dSChuck Lever 2340c77668dSChuck Lever TP_ARGS(task), 2350c77668dSChuck Lever 2360c77668dSChuck Lever TP_STRUCT__entry( 2370c77668dSChuck Lever __field(unsigned int, task_id) 2380c77668dSChuck Lever __field(unsigned int, client_id) 2390c77668dSChuck Lever ), 2400c77668dSChuck Lever 2410c77668dSChuck Lever TP_fast_assign( 2420c77668dSChuck Lever __entry->task_id = task->tk_pid; 2430c77668dSChuck Lever __entry->client_id = task->tk_client->cl_clid; 2440c77668dSChuck Lever ), 2450c77668dSChuck Lever 2460c77668dSChuck Lever TP_printk("task:%u@%u", __entry->task_id, __entry->client_id) 2470c77668dSChuck Lever ); 2480c77668dSChuck Lever 2490c77668dSChuck Lever TRACE_EVENT(rpcgss_bad_seqno, 2500c77668dSChuck Lever TP_PROTO( 2510c77668dSChuck Lever const struct rpc_task *task, 2520c77668dSChuck Lever u32 expected, 2530c77668dSChuck Lever u32 received 2540c77668dSChuck Lever ), 2550c77668dSChuck Lever 2560c77668dSChuck Lever TP_ARGS(task, expected, received), 2570c77668dSChuck Lever 2580c77668dSChuck Lever TP_STRUCT__entry( 2590c77668dSChuck Lever __field(unsigned int, task_id) 2600c77668dSChuck Lever __field(unsigned int, client_id) 2610c77668dSChuck Lever __field(u32, expected) 2620c77668dSChuck Lever __field(u32, received) 2630c77668dSChuck Lever ), 2640c77668dSChuck Lever 2650c77668dSChuck Lever TP_fast_assign( 2660c77668dSChuck Lever __entry->task_id = task->tk_pid; 2670c77668dSChuck Lever __entry->client_id = task->tk_client->cl_clid; 2680c77668dSChuck Lever __entry->expected = expected; 2690c77668dSChuck Lever __entry->received = received; 2700c77668dSChuck Lever ), 2710c77668dSChuck Lever 2720c77668dSChuck Lever TP_printk("task:%u@%u expected seqno %u, received seqno %u", 2730c77668dSChuck Lever __entry->task_id, __entry->client_id, 2740c77668dSChuck Lever __entry->expected, __entry->received) 2750c77668dSChuck Lever ); 2760c77668dSChuck Lever 2770c77668dSChuck Lever TRACE_EVENT(rpcgss_seqno, 2780c77668dSChuck Lever TP_PROTO( 2790c77668dSChuck Lever const struct rpc_task *task 2800c77668dSChuck Lever ), 2810c77668dSChuck Lever 2820c77668dSChuck Lever TP_ARGS(task), 2830c77668dSChuck Lever 2840c77668dSChuck Lever TP_STRUCT__entry( 2850c77668dSChuck Lever __field(unsigned int, task_id) 2860c77668dSChuck Lever __field(unsigned int, client_id) 2870c77668dSChuck Lever __field(u32, xid) 2880c77668dSChuck Lever __field(u32, seqno) 2890c77668dSChuck Lever ), 2900c77668dSChuck Lever 2910c77668dSChuck Lever TP_fast_assign( 2920c77668dSChuck Lever const struct rpc_rqst *rqst = task->tk_rqstp; 2930c77668dSChuck Lever 2940c77668dSChuck Lever __entry->task_id = task->tk_pid; 2950c77668dSChuck Lever __entry->client_id = task->tk_client->cl_clid; 2960c77668dSChuck Lever __entry->xid = be32_to_cpu(rqst->rq_xid); 2970c77668dSChuck Lever __entry->seqno = rqst->rq_seqno; 2980c77668dSChuck Lever ), 2990c77668dSChuck Lever 3000c77668dSChuck Lever TP_printk("task:%u@%u xid=0x%08x seqno=%u", 3010c77668dSChuck Lever __entry->task_id, __entry->client_id, 3020c77668dSChuck Lever __entry->xid, __entry->seqno) 3030c77668dSChuck Lever ); 3040c77668dSChuck Lever 3050c77668dSChuck Lever TRACE_EVENT(rpcgss_need_reencode, 3060c77668dSChuck Lever TP_PROTO( 3070c77668dSChuck Lever const struct rpc_task *task, 3080c77668dSChuck Lever u32 seq_xmit, 3090c77668dSChuck Lever bool ret 3100c77668dSChuck Lever ), 3110c77668dSChuck Lever 3120c77668dSChuck Lever TP_ARGS(task, seq_xmit, ret), 3130c77668dSChuck Lever 3140c77668dSChuck Lever TP_STRUCT__entry( 3150c77668dSChuck Lever __field(unsigned int, task_id) 3160c77668dSChuck Lever __field(unsigned int, client_id) 3170c77668dSChuck Lever __field(u32, xid) 3180c77668dSChuck Lever __field(u32, seq_xmit) 3190c77668dSChuck Lever __field(u32, seqno) 3200c77668dSChuck Lever __field(bool, ret) 3210c77668dSChuck Lever ), 3220c77668dSChuck Lever 3230c77668dSChuck Lever TP_fast_assign( 3240c77668dSChuck Lever __entry->task_id = task->tk_pid; 3250c77668dSChuck Lever __entry->client_id = task->tk_client->cl_clid; 3260c77668dSChuck Lever __entry->xid = be32_to_cpu(task->tk_rqstp->rq_xid); 3270c77668dSChuck Lever __entry->seq_xmit = seq_xmit; 3280c77668dSChuck Lever __entry->seqno = task->tk_rqstp->rq_seqno; 3290c77668dSChuck Lever __entry->ret = ret; 3300c77668dSChuck Lever ), 3310c77668dSChuck Lever 3320c77668dSChuck Lever TP_printk("task:%u@%u xid=0x%08x rq_seqno=%u seq_xmit=%u reencode %sneeded", 3330c77668dSChuck Lever __entry->task_id, __entry->client_id, 3340c77668dSChuck Lever __entry->xid, __entry->seqno, __entry->seq_xmit, 3350c77668dSChuck Lever __entry->ret ? "" : "un") 3360c77668dSChuck Lever ); 3370c77668dSChuck Lever 33853bc19f1SChuck Lever TRACE_EVENT(rpcgss_update_slack, 33953bc19f1SChuck Lever TP_PROTO( 34053bc19f1SChuck Lever const struct rpc_task *task, 34153bc19f1SChuck Lever const struct rpc_auth *auth 34253bc19f1SChuck Lever ), 34353bc19f1SChuck Lever 34453bc19f1SChuck Lever TP_ARGS(task, auth), 34553bc19f1SChuck Lever 34653bc19f1SChuck Lever TP_STRUCT__entry( 34753bc19f1SChuck Lever __field(unsigned int, task_id) 34853bc19f1SChuck Lever __field(unsigned int, client_id) 34953bc19f1SChuck Lever __field(u32, xid) 35053bc19f1SChuck Lever __field(const void *, auth) 35153bc19f1SChuck Lever __field(unsigned int, rslack) 35253bc19f1SChuck Lever __field(unsigned int, ralign) 35353bc19f1SChuck Lever __field(unsigned int, verfsize) 35453bc19f1SChuck Lever ), 35553bc19f1SChuck Lever 35653bc19f1SChuck Lever TP_fast_assign( 35753bc19f1SChuck Lever __entry->task_id = task->tk_pid; 35853bc19f1SChuck Lever __entry->client_id = task->tk_client->cl_clid; 35953bc19f1SChuck Lever __entry->xid = be32_to_cpu(task->tk_rqstp->rq_xid); 36053bc19f1SChuck Lever __entry->auth = auth; 36153bc19f1SChuck Lever __entry->rslack = auth->au_rslack; 36253bc19f1SChuck Lever __entry->ralign = auth->au_ralign; 36353bc19f1SChuck Lever __entry->verfsize = auth->au_verfsize; 36453bc19f1SChuck Lever ), 36553bc19f1SChuck Lever 36653bc19f1SChuck Lever TP_printk("task:%u@%u xid=0x%08x auth=%p rslack=%u ralign=%u verfsize=%u\n", 36753bc19f1SChuck Lever __entry->task_id, __entry->client_id, __entry->xid, 36853bc19f1SChuck Lever __entry->auth, __entry->rslack, __entry->ralign, 36953bc19f1SChuck Lever __entry->verfsize) 37053bc19f1SChuck Lever ); 37153bc19f1SChuck Lever 37228155524SChuck Lever DECLARE_EVENT_CLASS(rpcgss_svc_seqno_class, 37328155524SChuck Lever TP_PROTO( 37428155524SChuck Lever __be32 xid, 37528155524SChuck Lever u32 seqno 37628155524SChuck Lever ), 37728155524SChuck Lever 37828155524SChuck Lever TP_ARGS(xid, seqno), 37928155524SChuck Lever 38028155524SChuck Lever TP_STRUCT__entry( 38128155524SChuck Lever __field(u32, xid) 38228155524SChuck Lever __field(u32, seqno) 38328155524SChuck Lever ), 38428155524SChuck Lever 38528155524SChuck Lever TP_fast_assign( 38628155524SChuck Lever __entry->xid = be32_to_cpu(xid); 38728155524SChuck Lever __entry->seqno = seqno; 38828155524SChuck Lever ), 38928155524SChuck Lever 39028155524SChuck Lever TP_printk("xid=0x%08x seqno=%u, request discarded", 39128155524SChuck Lever __entry->xid, __entry->seqno) 39228155524SChuck Lever ); 39328155524SChuck Lever 39428155524SChuck Lever #define DEFINE_SVC_SEQNO_EVENT(name) \ 39528155524SChuck Lever DEFINE_EVENT(rpcgss_svc_seqno_class, rpcgss_svc_##name, \ 39628155524SChuck Lever TP_PROTO( \ 39728155524SChuck Lever __be32 xid, \ 39828155524SChuck Lever u32 seqno \ 39928155524SChuck Lever ), \ 40028155524SChuck Lever TP_ARGS(xid, seqno)) 40128155524SChuck Lever 40228155524SChuck Lever DEFINE_SVC_SEQNO_EVENT(large_seqno); 40328155524SChuck Lever DEFINE_SVC_SEQNO_EVENT(old_seqno); 40428155524SChuck Lever 40528155524SChuck Lever 4060c77668dSChuck Lever /** 4070c77668dSChuck Lever ** gssd upcall related trace events 4080c77668dSChuck Lever **/ 4090c77668dSChuck Lever 4100c77668dSChuck Lever TRACE_EVENT(rpcgss_upcall_msg, 4110c77668dSChuck Lever TP_PROTO( 4120c77668dSChuck Lever const char *buf 4130c77668dSChuck Lever ), 4140c77668dSChuck Lever 4150c77668dSChuck Lever TP_ARGS(buf), 4160c77668dSChuck Lever 4170c77668dSChuck Lever TP_STRUCT__entry( 4180c77668dSChuck Lever __string(msg, buf) 4190c77668dSChuck Lever ), 4200c77668dSChuck Lever 4210c77668dSChuck Lever TP_fast_assign( 4220c77668dSChuck Lever __assign_str(msg, buf) 4230c77668dSChuck Lever ), 4240c77668dSChuck Lever 4250c77668dSChuck Lever TP_printk("msg='%s'", __get_str(msg)) 4260c77668dSChuck Lever ); 4270c77668dSChuck Lever 4280c77668dSChuck Lever TRACE_EVENT(rpcgss_upcall_result, 4290c77668dSChuck Lever TP_PROTO( 4300c77668dSChuck Lever u32 uid, 4310c77668dSChuck Lever int result 4320c77668dSChuck Lever ), 4330c77668dSChuck Lever 4340c77668dSChuck Lever TP_ARGS(uid, result), 4350c77668dSChuck Lever 4360c77668dSChuck Lever TP_STRUCT__entry( 4370c77668dSChuck Lever __field(u32, uid) 4380c77668dSChuck Lever __field(int, result) 4390c77668dSChuck Lever 4400c77668dSChuck Lever ), 4410c77668dSChuck Lever 4420c77668dSChuck Lever TP_fast_assign( 4430c77668dSChuck Lever __entry->uid = uid; 4440c77668dSChuck Lever __entry->result = result; 4450c77668dSChuck Lever ), 4460c77668dSChuck Lever 4470c77668dSChuck Lever TP_printk("for uid %u, result=%d", __entry->uid, __entry->result) 4480c77668dSChuck Lever ); 4490c77668dSChuck Lever 4500c77668dSChuck Lever TRACE_EVENT(rpcgss_context, 4510c77668dSChuck Lever TP_PROTO( 452*74fb8fecSChuck Lever u32 window_size, 4530c77668dSChuck Lever unsigned long expiry, 4540c77668dSChuck Lever unsigned long now, 4550c77668dSChuck Lever unsigned int timeout, 4560c77668dSChuck Lever unsigned int len, 4570c77668dSChuck Lever const u8 *data 4580c77668dSChuck Lever ), 4590c77668dSChuck Lever 460*74fb8fecSChuck Lever TP_ARGS(window_size, expiry, now, timeout, len, data), 4610c77668dSChuck Lever 4620c77668dSChuck Lever TP_STRUCT__entry( 4630c77668dSChuck Lever __field(unsigned long, expiry) 4640c77668dSChuck Lever __field(unsigned long, now) 4650c77668dSChuck Lever __field(unsigned int, timeout) 466*74fb8fecSChuck Lever __field(u32, window_size) 4670c77668dSChuck Lever __field(int, len) 4680c77668dSChuck Lever __string(acceptor, data) 4690c77668dSChuck Lever ), 4700c77668dSChuck Lever 4710c77668dSChuck Lever TP_fast_assign( 4720c77668dSChuck Lever __entry->expiry = expiry; 4730c77668dSChuck Lever __entry->now = now; 4740c77668dSChuck Lever __entry->timeout = timeout; 475*74fb8fecSChuck Lever __entry->window_size = window_size; 4760c77668dSChuck Lever __entry->len = len; 4770c77668dSChuck Lever strncpy(__get_str(acceptor), data, len); 4780c77668dSChuck Lever ), 4790c77668dSChuck Lever 480*74fb8fecSChuck Lever TP_printk("win_size=%u expiry=%lu now=%lu timeout=%u acceptor=%.*s", 481*74fb8fecSChuck Lever __entry->window_size, __entry->expiry, __entry->now, 482*74fb8fecSChuck Lever __entry->timeout, __entry->len, __get_str(acceptor)) 4830c77668dSChuck Lever ); 4840c77668dSChuck Lever 4850c77668dSChuck Lever 4860c77668dSChuck Lever /** 4870c77668dSChuck Lever ** Miscellaneous events 4880c77668dSChuck Lever */ 4890c77668dSChuck Lever 4900c77668dSChuck Lever TRACE_DEFINE_ENUM(RPC_AUTH_GSS_KRB5); 4910c77668dSChuck Lever TRACE_DEFINE_ENUM(RPC_AUTH_GSS_KRB5I); 4920c77668dSChuck Lever TRACE_DEFINE_ENUM(RPC_AUTH_GSS_KRB5P); 4930c77668dSChuck Lever 4940c77668dSChuck Lever #define show_pseudoflavor(x) \ 4950c77668dSChuck Lever __print_symbolic(x, \ 4960c77668dSChuck Lever { RPC_AUTH_GSS_KRB5, "RPC_AUTH_GSS_KRB5" }, \ 4970c77668dSChuck Lever { RPC_AUTH_GSS_KRB5I, "RPC_AUTH_GSS_KRB5I" }, \ 4980c77668dSChuck Lever { RPC_AUTH_GSS_KRB5P, "RPC_AUTH_GSS_KRB5P" }) 4990c77668dSChuck Lever 5000c77668dSChuck Lever 5010c77668dSChuck Lever TRACE_EVENT(rpcgss_createauth, 5020c77668dSChuck Lever TP_PROTO( 5030c77668dSChuck Lever unsigned int flavor, 5040c77668dSChuck Lever int error 5050c77668dSChuck Lever ), 5060c77668dSChuck Lever 5070c77668dSChuck Lever TP_ARGS(flavor, error), 5080c77668dSChuck Lever 5090c77668dSChuck Lever TP_STRUCT__entry( 5100c77668dSChuck Lever __field(unsigned int, flavor) 5110c77668dSChuck Lever __field(int, error) 5120c77668dSChuck Lever 5130c77668dSChuck Lever ), 5140c77668dSChuck Lever 5150c77668dSChuck Lever TP_fast_assign( 5160c77668dSChuck Lever __entry->flavor = flavor; 5170c77668dSChuck Lever __entry->error = error; 5180c77668dSChuck Lever ), 5190c77668dSChuck Lever 5200c77668dSChuck Lever TP_printk("flavor=%s error=%d", 5210c77668dSChuck Lever show_pseudoflavor(__entry->flavor), __entry->error) 5220c77668dSChuck Lever ); 5230c77668dSChuck Lever 524ff27e9f7SChuck Lever TRACE_EVENT(rpcgss_oid_to_mech, 525ff27e9f7SChuck Lever TP_PROTO( 526ff27e9f7SChuck Lever const char *oid 527ff27e9f7SChuck Lever ), 528ff27e9f7SChuck Lever 529ff27e9f7SChuck Lever TP_ARGS(oid), 530ff27e9f7SChuck Lever 531ff27e9f7SChuck Lever TP_STRUCT__entry( 532ff27e9f7SChuck Lever __string(oid, oid) 533ff27e9f7SChuck Lever ), 534ff27e9f7SChuck Lever 535ff27e9f7SChuck Lever TP_fast_assign( 536ff27e9f7SChuck Lever __assign_str(oid, oid); 537ff27e9f7SChuck Lever ), 538ff27e9f7SChuck Lever 539ff27e9f7SChuck Lever TP_printk("mech for oid %s was not found", __get_str(oid)) 540ff27e9f7SChuck Lever ); 5410c77668dSChuck Lever 5420c77668dSChuck Lever #endif /* _TRACE_RPCGSS_H */ 5430c77668dSChuck Lever 5440c77668dSChuck Lever #include <trace/define_trace.h> 545