-
Notifications
You must be signed in to change notification settings - Fork 7
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
Implement for aarch64 #13
Conversation
This PR is based on <#7> by [Aaron Dewes](mailto:aaron.dewes@protonmail.com).
Ping @AaronDewes. |
Hi, I somehow didn't see this when you posted it - my bad! I can take a closer look this week but I'm still not sure what the best way to achieve multi-arch support is. If we separate arm and x86 entirely, the issue is duplication of work and having to add syscalls in all places when a new one is added, and the possibility of missing ones. I don't think Aaron's solution of just copying all the code wholesale is correct, but I'm wondering if it's closer than just smushing everything all together in one place. |
I wonder if the best way to do this would be to wrap the syscalls that are different on different arches internally and just have it "expand" to the correct syscall somehow. e.g. something that would take "OurSysno::eventfd" and return both "eventfd" and "eventfd2" on amd64 but only eventfd2 on arm64. That's essentially what's happening in this PR, but the issue is that if a user wants to implement their own RuleSet, they have to also support all architectures themselves. I think if someone wants to use extrasafe on arm, this PR is probably the best intermediate solution, but I'm not sure that I want to accept it without being able to have it run in CI. It looks like we'd have to set up our own arm github runner because github hasn't made arm runners available yet actions/runner-images#5631 |
It's not possible to run the code on another platform than amd64, but you can cross compile it for an ARM target: |
Why do you say this? Presumably I could create an Azure or AWS arm instance and run the code there. What else would prevent it from running? |
It was kinda implied that I meant with the standard actions github gives you. I only meant to answer that it was maybe not important to run the code on another platform, and simply compiling it might be enough. |
I think it's fine to leave this open until github supports ARM or we set up a separate arm runner for this repo. I don't think it would be that much work but I'm not sure. Also, I didn't say it earlier but thank you for working on this in the first place! |
It is possible with QEMU (but that is slow). |
I wonder if it would be possible to do faster using a firecracker VM - I took a quick look and it seems like it will at least run aarch64 guests. |
This PR is based on #7 by Aaron Dewes.
I did not test the PR, because I don't have any aarch64 machines. It compiles, though.