-
Notifications
You must be signed in to change notification settings - Fork 11
Add support for ARM #28
Comments
Hi. I thought to several approaches to deal with harcoded syscall numbers:
#include <linux/kallsyms.h>
#include <linux/ftrace.h>
// ...
unsigned long addr;
char str[KSYM_SYMBOL_LEN];
addr = arch_syscall_addr(id);
kallsyms_lookup(addr, NULL, NULL, NULL, str);
if (!strcmp(str + 3, "faccessat"))
return 0;
char *architecture = bpf_get_cpu_architecture()
if ((!strcmp(architecture, "x86_64") && id == 149) || (!strcmp(architecture, "aarch64) && id == 48 || ...)
return 0;
#include <linux/unistd.h>
if (id == __NR_faccessat)
return 0; First solution seems to be the best one, sadly we cannot call any kernel function from BPF code for the moment. Let me know what you think about these different solutions. Best regards. |
At the moment, this gadget cannot work on arm64 for several reasons [1]. Signed-off-by: Francis Laniel <[email protected]> [1] kinvolk/traceloop#28
At the moment, this gadget cannot work on arm64 for several reasons [1]. Signed-off-by: Francis Laniel <[email protected]> [1] kinvolk/traceloop#28
At the moment, this gadget cannot work on arm64 for several reasons [1]. Signed-off-by: Francis Laniel <[email protected]> [1] kinvolk/traceloop#28
At the moment, this gadget cannot work on arm64 for several reasons [1]. Signed-off-by: Francis Laniel <[email protected]> [1] kinvolk/traceloop#28
At the moment, this gadget cannot work on arm64 for several reasons [1]. Signed-off-by: Francis Laniel <[email protected]> [1] kinvolk/traceloop#28
At the moment, this gadget cannot work on arm64 for several reasons [1]. Signed-off-by: Francis Laniel <[email protected]> [1] kinvolk/traceloop#28
At the moment, this gadget cannot work on arm64 for several reasons [1]. Signed-off-by: Francis Laniel <[email protected]> [1] kinvolk/traceloop#28
At the moment, this gadget cannot work on arm64 for several reasons [1]. Signed-off-by: Francis Laniel <[email protected]> [1] kinvolk/traceloop#28
At the moment, this gadget cannot work on arm64 for several reasons [1]. Signed-off-by: Francis Laniel <[email protected]> [1] kinvolk/traceloop#28
At the moment, this gadget cannot work on arm64 for several reasons [1]. Signed-off-by: Francis Laniel <[email protected]> [1] kinvolk/traceloop#28
At the moment, this gadget cannot work on arm64 for several reasons [1]. Signed-off-by: Francis Laniel <[email protected]> [1] kinvolk/traceloop#28
I'm currently working on being able to build on aarch64 with make and docker. |
So, I tried porting it and saw a bunch of compiling errors due to ASM. My patches are here I'm seeing the same things as this issue iovisor/bcc#1202 but bcc was fixed by adding bpfasmparser to the Cmake LLVM libraries: iovisor/bcc@7abe63a I did some research and couldn't find a way to add this bpfasmparser to our Clang flags. However, I do see bpfasmparser on |
traceloop currently only works on x86_64.
Non-exhaustive list of tasks:
syscall_table.go
) needs to be per-architecturestraceback-guess-bpf.c
hard code some syscall numbersif errNo >= -4095 && errNo <= -1
inevent.go
)The text was updated successfully, but these errors were encountered: