* [PATCH v2] libbpf: Fix arm syscall regs spec in bpf_tracing.h
@ 2023-02-23 9:53 Puranjay Mohan
2023-02-27 19:59 ` Andrii Nakryiko
2023-02-27 20:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Puranjay Mohan @ 2023-02-23 9:53 UTC (permalink / raw)
To: puranjaymohan, ast, daniel, andrii, bpf, iii, quentin; +Cc: Puranjay Mohan
The syscall register definitions for ARM in bpf_tracing.h doesn't define
the fifth parameter for the syscalls. Because of this some KPROBES based
selftests fail to compile for ARM architecture.
Define the fifth parameter that is passed in the R5 register (uregs[4]).
Fixes: 3a95c42d65d5 ("libbpf: Define arm syscall regs spec in bpf_tracing.h")
Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
---
Changes in V1[1]->V2:
- Fix signed-off-by and send-from emails.
[1] https://lore.kernel.org/bpf/20230223094717.9746-1-puranjay12@gmail.com/T/#u
---
tools/lib/bpf/bpf_tracing.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
index 6db88f41fa0d..2cd888733b1c 100644
--- a/tools/lib/bpf/bpf_tracing.h
+++ b/tools/lib/bpf/bpf_tracing.h
@@ -204,6 +204,7 @@ struct pt_regs___s390 {
#define __PT_PARM2_SYSCALL_REG __PT_PARM2_REG
#define __PT_PARM3_SYSCALL_REG __PT_PARM3_REG
#define __PT_PARM4_SYSCALL_REG __PT_PARM4_REG
+#define __PT_PARM5_SYSCALL_REG uregs[4]
#define __PT_PARM6_SYSCALL_REG uregs[5]
#define __PT_PARM7_SYSCALL_REG uregs[6]
--
2.39.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] libbpf: Fix arm syscall regs spec in bpf_tracing.h
2023-02-23 9:53 [PATCH v2] libbpf: Fix arm syscall regs spec in bpf_tracing.h Puranjay Mohan
@ 2023-02-27 19:59 ` Andrii Nakryiko
2023-02-27 20:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Andrii Nakryiko @ 2023-02-27 19:59 UTC (permalink / raw)
To: Puranjay Mohan; +Cc: puranjaymohan, ast, daniel, andrii, bpf, iii, quentin
On Thu, Feb 23, 2023 at 1:53 AM Puranjay Mohan <puranjay12@gmail.com> wrote:
>
> The syscall register definitions for ARM in bpf_tracing.h doesn't define
> the fifth parameter for the syscalls. Because of this some KPROBES based
> selftests fail to compile for ARM architecture.
>
> Define the fifth parameter that is passed in the R5 register (uregs[4]).
>
> Fixes: 3a95c42d65d5 ("libbpf: Define arm syscall regs spec in bpf_tracing.h")
> Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
> ---
> Changes in V1[1]->V2:
> - Fix signed-off-by and send-from emails.
>
> [1] https://lore.kernel.org/bpf/20230223094717.9746-1-puranjay12@gmail.com/T/#u
> ---
> tools/lib/bpf/bpf_tracing.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
> index 6db88f41fa0d..2cd888733b1c 100644
> --- a/tools/lib/bpf/bpf_tracing.h
> +++ b/tools/lib/bpf/bpf_tracing.h
> @@ -204,6 +204,7 @@ struct pt_regs___s390 {
> #define __PT_PARM2_SYSCALL_REG __PT_PARM2_REG
> #define __PT_PARM3_SYSCALL_REG __PT_PARM3_REG
> #define __PT_PARM4_SYSCALL_REG __PT_PARM4_REG
> +#define __PT_PARM5_SYSCALL_REG uregs[4]
that's an "interesting" omission on my part, thanks for catching and fixing!
> #define __PT_PARM6_SYSCALL_REG uregs[5]
> #define __PT_PARM7_SYSCALL_REG uregs[6]
>
> --
> 2.39.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] libbpf: Fix arm syscall regs spec in bpf_tracing.h
2023-02-23 9:53 [PATCH v2] libbpf: Fix arm syscall regs spec in bpf_tracing.h Puranjay Mohan
2023-02-27 19:59 ` Andrii Nakryiko
@ 2023-02-27 20:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-27 20:00 UTC (permalink / raw)
To: Puranjay Mohan; +Cc: puranjaymohan, ast, daniel, andrii, bpf, iii, quentin
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Thu, 23 Feb 2023 09:53:46 +0000 you wrote:
> The syscall register definitions for ARM in bpf_tracing.h doesn't define
> the fifth parameter for the syscalls. Because of this some KPROBES based
> selftests fail to compile for ARM architecture.
>
> Define the fifth parameter that is passed in the R5 register (uregs[4]).
>
> Fixes: 3a95c42d65d5 ("libbpf: Define arm syscall regs spec in bpf_tracing.h")
> Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
>
> [...]
Here is the summary with links:
- [v2] libbpf: Fix arm syscall regs spec in bpf_tracing.h
https://git.kernel.org/bpf/bpf-next/c/06943ae67594
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-27 20:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-23 9:53 [PATCH v2] libbpf: Fix arm syscall regs spec in bpf_tracing.h Puranjay Mohan
2023-02-27 19:59 ` Andrii Nakryiko
2023-02-27 20:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox