New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to add arm64 support #151
Conversation
Thanks a lot! |
@ShawnZhong @Officeyutong By the way, is it possible to make a GitHub Action for testing bpftime on arm64? |
Many of features existing rely on x86, e.g user space syscall trace. We need a new syscall trace trampoline on arm64. |
Running tests itself is relatively easier |
That's fine. At least we can get the uprobe and runtime work. We can get this PR work first, and then consider others(syscall trace, CI, syscall trace should be easier on arm) Is there any other features rely on x86? |
It seems that Arm-based hosted runners are still in public beta as of January 2024: https://github.blog/changelog/2023-10-30-accelerate-your-ci-cd-with-arm-based-hosted-runners-in-github-actions/ One option is to use self-hosted runners, which requires some setup (and cost money)
My least favorable option is to run inside QEMU. |
// a result provided by bpftime. So if we want to get things from kernel, we must | ||
// manually execute `syscall` from libc | ||
inline void* libc_handle = dlopen(LIBC_SO, RTLD_LAZY); | ||
inline auto libc_syscall = reinterpret_cast<decltype(&::syscall)>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems there is some problem with the tailcall tests. Is it from here? The tailcall can use the prog_array to exec some eBPF programs in kernel.
Thanks a lot! |
Calling original syscall at prog array implementation was bound to x86, needs updating |
// a result provided by bpftime. So if we want to get things from kernel, we must | ||
// manually execute `syscall` from libc | ||
static void* libc_handle = dlopen(LIBC_SO, RTLD_LAZY); | ||
static auto libc_syscall = reinterpret_cast<decltype(&::syscall)>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need pay attention to all global variable initializations, since attaching might be executed before the initialization of global variables
Description
Fixes # (issue)
Type of change
How Has This Been Tested?
Test Configuration:
Checklist