Skip to content

Commit

Permalink
bpf, libbpf: Fix ___bpf_kretprobe_args1(x) macro definition
Browse files Browse the repository at this point in the history
Use PT_REGS_RC instead of PT_REGS_RET to get ret correctly.

Fixes: df8ff35 ("libbpf: Merge selftests' bpf_trace_helpers.h into libbpf's bpf_tracing.h")
Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200315083252.22274-1-ethercflow@gmail.com
  • Loading branch information
ethercflow authored and borkmann committed Mar 17, 2020
1 parent fd27b18 commit 483d7a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/lib/bpf/bpf_tracing.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ ____##name(struct pt_regs *ctx, ##args)

#define ___bpf_kretprobe_args0() ctx
#define ___bpf_kretprobe_args1(x) \
___bpf_kretprobe_args0(), (void *)PT_REGS_RET(ctx)
___bpf_kretprobe_args0(), (void *)PT_REGS_RC(ctx)
#define ___bpf_kretprobe_args(args...) \
___bpf_apply(___bpf_kretprobe_args, ___bpf_narg(args))(args)

Expand Down

0 comments on commit 483d7a3

Please sign in to comment.