diff options
| author | Andrii Nakryiko <[email protected]> | 2023-01-20 20:09:03 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2023-01-23 19:53:00 +0000 |
| commit | ff00f9cbd2ddee60cd1542e58631638a5996b05f (patch) | |
| tree | fad40b34450731e4debc8104bfe1f95d78fc71e8 /tools/lib/bpf/bpf_tracing.h | |
| parent | libbpf: Define x86-64 syscall regs spec in bpf_tracing.h (diff) | |
| download | kernel-ff00f9cbd2ddee60cd1542e58631638a5996b05f.tar.gz kernel-ff00f9cbd2ddee60cd1542e58631638a5996b05f.zip | |
libbpf: Define i386 syscall regs spec in bpf_tracing.h
Define explicit table of registers used for syscall argument passing.
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/bpf_tracing.h')
| -rw-r--r-- | tools/lib/bpf/bpf_tracing.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h index 5fd498821c29..4d04c63fda27 100644 --- a/tools/lib/bpf/bpf_tracing.h +++ b/tools/lib/bpf/bpf_tracing.h @@ -115,6 +115,14 @@ #define __PT_PARM1_REG eax #define __PT_PARM2_REG edx #define __PT_PARM3_REG ecx +/* i386 syscall ABI is very different, refer to syscall(2) manpage */ +#define __PT_PARM1_SYSCALL_REG ebx +#define __PT_PARM2_SYSCALL_REG ecx +#define __PT_PARM3_SYSCALL_REG edx +#define __PT_PARM4_SYSCALL_REG esi +#define __PT_PARM5_SYSCALL_REG edi +#define __PT_PARM6_SYSCALL_REG ebp + #define __PT_RET_REG esp #define __PT_FP_REG ebp #define __PT_RC_REG eax |
