lkml.org 
[lkml]   [2020]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] bpf: Fix ___bpf_kretprobe_args1(x) macro definition.
On Sun, Mar 15, 2020 at 1:33 AM Wenbo Zhang <ethercflow@gmail.com> wrote:
>
> Use PT_REGS_RC instead of PT_REGS_RET to get ret currectly.
>
> Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
> ---

Thanks!

Fixes: df8ff35311c8 ("libbpf: Merge selftests' bpf_trace_helpers.h
into libbpf's bpf_tracing.h")
Acked-by: Andrii Nakryiko <andriin@fb.com>

> tools/lib/bpf/bpf_tracing.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
> index b0c9ae5c73b5..f3f3c3fb98cb 100644
> --- a/tools/lib/bpf/bpf_tracing.h
> +++ b/tools/lib/bpf/bpf_tracing.h
> @@ -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)
>
> --
> 2.17.1
>

\
 
 \ /
  Last update: 2020-03-15 18:24    [W:0.051 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site