Lines Matching refs:ctx
285 #define BPF_KPROBE_READ_RET_IP(ip, ctx) ({ (ip) = (ctx)->link; })
288 #define BPF_KPROBE_READ_RET_IP(ip, ctx) ({ (ip) = PT_REGS_RET(ctx); })
291 #define BPF_KPROBE_READ_RET_IP(ip, ctx) \
292 ({ bpf_probe_read_kernel(&(ip), sizeof(ip), (void *)PT_REGS_RET(ctx)); })
293 #define BPF_KRETPROBE_READ_RET_IP(ip, ctx) \
295 (void *)(PT_REGS_FP(ctx) + sizeof(ip))); })
306 #define ___bpf_ctx_cast0() ctx
307 #define ___bpf_ctx_cast1(x) ___bpf_ctx_cast0(), (void *)ctx[0]
308 #define ___bpf_ctx_cast2(x, args...) ___bpf_ctx_cast1(args), (void *)ctx[1]
309 #define ___bpf_ctx_cast3(x, args...) ___bpf_ctx_cast2(args), (void *)ctx[2]
310 #define ___bpf_ctx_cast4(x, args...) ___bpf_ctx_cast3(args), (void *)ctx[3]
311 #define ___bpf_ctx_cast5(x, args...) ___bpf_ctx_cast4(args), (void *)ctx[4]
312 #define ___bpf_ctx_cast6(x, args...) ___bpf_ctx_cast5(args), (void *)ctx[5]
313 #define ___bpf_ctx_cast7(x, args...) ___bpf_ctx_cast6(args), (void *)ctx[6]
314 #define ___bpf_ctx_cast8(x, args...) ___bpf_ctx_cast7(args), (void *)ctx[7]
315 #define ___bpf_ctx_cast9(x, args...) ___bpf_ctx_cast8(args), (void *)ctx[8]
316 #define ___bpf_ctx_cast10(x, args...) ___bpf_ctx_cast9(args), (void *)ctx[9]
317 #define ___bpf_ctx_cast11(x, args...) ___bpf_ctx_cast10(args), (void *)ctx[10]
318 #define ___bpf_ctx_cast12(x, args...) ___bpf_ctx_cast11(args), (void *)ctx[11]
333 * Original raw context argument is preserved as well as 'ctx' argument.
338 name(unsigned long long *ctx); \
340 ____##name(unsigned long long *ctx, ##args); \
341 typeof(name(0)) name(unsigned long long *ctx) \
349 ____##name(unsigned long long *ctx, ##args)
353 #define ___bpf_kprobe_args0() ctx
355 ___bpf_kprobe_args0(), (void *)PT_REGS_PARM1(ctx)
357 ___bpf_kprobe_args1(args), (void *)PT_REGS_PARM2(ctx)
359 ___bpf_kprobe_args2(args), (void *)PT_REGS_PARM3(ctx)
361 ___bpf_kprobe_args3(args), (void *)PT_REGS_PARM4(ctx)
363 ___bpf_kprobe_args4(args), (void *)PT_REGS_PARM5(ctx)
374 * Original struct pt_regs* context is preserved as 'ctx' argument. This might
378 name(struct pt_regs *ctx); \
380 ____##name(struct pt_regs *ctx, ##args); \
381 typeof(name(0)) name(struct pt_regs *ctx) \
389 ____##name(struct pt_regs *ctx, ##args)
391 #define ___bpf_kretprobe_args0() ctx
393 ___bpf_kretprobe_args0(), (void *)PT_REGS_RC(ctx)
399 * return value (in addition to `struct pt_regs *ctx`), but no input
404 name(struct pt_regs *ctx); \
406 ____##name(struct pt_regs *ctx, ##args); \
407 typeof(name(0)) name(struct pt_regs *ctx) \
414 static __always_inline typeof(name(0)) ____##name(struct pt_regs *ctx, ##args)