Skip to content
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

Add support for arm64e ABI (when possible) #4490

Open
steven-johnson opened this issue Dec 27, 2019 · 6 comments
Open

Add support for arm64e ABI (when possible) #4490

steven-johnson opened this issue Dec 27, 2019 · 6 comments

Comments

@steven-johnson
Copy link
Contributor

See http://lists.llvm.org/pipermail/llvm-dev/2019-October/136091.html

arm64e is a specific ABI for pointer authentication in C, C++, 
Objective-C, and Swift.  It is used on iOS 12+ on systems that provide 
ARMv8.3, as well as several other Apple OSes.  This ABI is not yet 
considered “stable” for third-party use because some of the details 
are still evolving

This will likely be necessary in order to work with versions of Xcode (etc) that enable the pointer-authentication features for newer (A12+) chips.

Note that ARMv8.3a support is somewhat orthogonal to this; arm64e presumes/requires ARM8.3a to be available, but the reverse it not necessarily the case, AFAIK.

@steven-johnson
Copy link
Contributor Author

See also #4487

@rjmccall
Copy link

Yes, if you support emitting code for iOS (AOT, I guess, given iOS platform restrictions), you will need to support emitting code for pointer authentication. If you don't need to generate any indirect calls, that should be very easy — just a small amount of driver setup. Otherwise, it might be more complex.

@steven-johnson
Copy link
Contributor Author

Adding @abadams @alexreinking -- we have a request internal to Google about supporting this (I'm rather surprised it hasn't come up before now, in hindsight). My guess is that if LLVM supports it directly (which I'd hope to be the case by now) then this should be fairly straightforward; if not.... well, not?

@abadams
Copy link
Member

abadams commented Jun 26, 2024

I think it hasn't come up because Apple backed off on requiring it. I don't know how complex it would be to add. It might just work, but it's also possible there could be LLVM IR passes we have to do over the runtime modules, because target-agnostic bitcode isn't enough.

@rjmccall
Copy link

The iOS JIT entitlement requires arm64e. Users could also potentially want to run your code in an arm64e process on macOS for security reasons. It's not urgent If you don't have users actually asking for these things, of course.

@steven-johnson
Copy link
Contributor Author

As of July 2024, the support for arm64e in upstream LLVM doesn't appear to match that in recent XCode versions, so it's not really useful. This will likely need to wait for Apple to upstream their fixes from their private branch into the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants