linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bpf: Fix ___bpf_kretprobe_args1(x) macro definition.
@ 2020-03-15  8:32 Wenbo Zhang
  2020-03-15 17:23 ` Andrii Nakryiko
  2020-03-17 18:59 ` Daniel Borkmann
  0 siblings, 2 replies; 3+ messages in thread
From: Wenbo Zhang @ 2020-03-15  8:32 UTC (permalink / raw)
  To: ast, daniel; +Cc: netdev, bpf, linux-kernel, ethercflow

Use PT_REGS_RC instead of PT_REGS_RET to get ret currectly.

Signed-off-by: Wenbo Zhang <ethercflow@gmail.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] bpf: Fix ___bpf_kretprobe_args1(x) macro definition.
  2020-03-15  8:32 [PATCH] bpf: Fix ___bpf_kretprobe_args1(x) macro definition Wenbo Zhang
@ 2020-03-15 17:23 ` Andrii Nakryiko
  2020-03-17 18:59 ` Daniel Borkmann
  1 sibling, 0 replies; 3+ messages in thread
From: Andrii Nakryiko @ 2020-03-15 17:23 UTC (permalink / raw)
  To: Wenbo Zhang
  Cc: Alexei Starovoitov, Daniel Borkmann, Networking, bpf, open list

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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bpf: Fix ___bpf_kretprobe_args1(x) macro definition.
  2020-03-15  8:32 [PATCH] bpf: Fix ___bpf_kretprobe_args1(x) macro definition Wenbo Zhang
  2020-03-15 17:23 ` Andrii Nakryiko
@ 2020-03-17 18:59 ` Daniel Borkmann
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2020-03-17 18:59 UTC (permalink / raw)
  To: Wenbo Zhang, ast; +Cc: netdev, bpf, linux-kernel

On 3/15/20 9:32 AM, Wenbo Zhang wrote:
> Use PT_REGS_RC instead of PT_REGS_RET to get ret currectly.
> 
> Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>

Applied & fixed typo in commit message, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-17 18:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-15  8:32 [PATCH] bpf: Fix ___bpf_kretprobe_args1(x) macro definition Wenbo Zhang
2020-03-15 17:23 ` Andrii Nakryiko
2020-03-17 18:59 ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).