-
Notifications
You must be signed in to change notification settings - Fork 697
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
link,kprobe: add arch prefixes for portable syscall wrapper support #304
Conversation
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.
Thanks for making the PR :) Please see my comments, I think changing the ELF builder is not necessary. It's nice that we have working tests on arm64, but we can't claim to support arm64 until we have a working CI.
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.
Thanks for the patch! We're seeing arm being used more and more frequently, but I think this needs some more work in order to become useful.
- Please remove all merge commits.
git fetch origin && git rebase origin/master
is the way to keep your branch up-to-date with changes that have landed on master. - I don't feel like the additions to
CONTRIBUTING.md
are necessary. If we want to provide llvm builder images going forward,testdata/docker
should output images for both arm64 and x86, which will automatically be picked on hosts/dev machines of those respective architectures. link.K(ret)probe
should handle__x64_
syscall fn prefixes transparently, but implementing this might be annoying given the difference between tracefs and PMU, see other comment on the code itself. Please reach out through Cilium Slack (#libbpf-go
) if you need more input.
Marking this as draft in the mean time.
d15407a
to
00b8c66
Compare
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.
Please take a look at #304 (comment) which outlines a simpler API.
Add a basic developer support for ARM64, and possibly other non-x86 platforms. Make sure test are passing and the used syscalls are available on non-x86 hosts. Signed-off-by: Nikolay Nikolaev <nicknickolaev@gmail.com>
Signed-off-by: Nikolay Nikolaev <nicknickolaev@gmail.com>
Signed-off-by: Nikolay Nikolaev <nicknickolaev@gmail.com>
@nickolaev Thanks for the work! |
Adds basic developer support for ARM64, fixed the tests and added some instructions/notes.
Modify
kprobe
to be smart about syscall naming, depending on the platform.For example, it will take
sys_getpid
and turn it into__arm64_sys_getpid
when running on an ARM64 host.Fixes #266
Signed-off-by: Nikolay Nikolaev nicknickolaev@gmail.com