-
Notifications
You must be signed in to change notification settings - Fork 194
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
[pauthabielf64] Fix typo in relocation name #255
Conversation
As pointed out in ARM-software#253 the R_AARCH64_AUTH_GOT_LO12_NC is meant to be the AUTH variant of R_AARCH64_LD64_GOT_LO12_NC. As there is also a R_AARCH64_LD32_GOT_LO12_NC relocation rename the relocation to R_AARCH64_LD64_AUTH_GOT_LO12_NC. These relocations are in the appendix as we are currently expecting the GOT to be RELRO and unsigned in most signing schemas.
Shall we use |
I've just noticed that |
I've updated to remove that relocation. I can't see anything it would be used for apart from calculating the address of a GOT slot, but user-code shouldn't be able to do that anyway and the compiler has other ways to do that if it needs to using the other relocations. |
Is it actually true that we shouldn't be able to do that? According to the spec, address of the GOT entry is used as a modifier when signing the contents of the entry. The example code for accessing signed GOT entry includes this calculation (see https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#default-signing-schema):
If |
Thanks for reminding me, a lot of the rationale has fallen out of my memory in the time that it was first wrote. I agree with you and this is how the AArch64 PAC PLTs are implemented in LLD, albeit with just the calculation and not the relocation. In this particular case there is no need to rename the relocation as the ABI only uses the LD64 and LD32 when there is a material difference in the relocation. The I'll update to put the relocation back in as was, and add a note below to match the relocation with the operator |
There is no equivalent for this relocation in the standard ABI it is used by runtime code to calculate the address of a GOT slot so it can be used as one of the inputs to an authenticate instruction. Add a note that this matches up with the :got_auth_lo12: operator for future reference. Part of ARM-software#253
f58056e
to
c8a6c5d
Compare
@smithp35 Thanks! Looks like there was some discrepancy in the particular implementation. Now everything fully matches. |
Thanks for the confirmation. Merging. |
As pointed out in #253 the R_AARCH64_AUTH_GOT_LO12_NC is meant to be the AUTH variant of R_AARCH64_LD64_GOT_LO12_NC. As there is also a
R_AARCH64_LD32_GOT_LO12_NC relocation rename the relocation to R_AARCH64_LD64_AUTH_GOT_LO12_NC.
These relocations are in the appendix as we are currently expecting the GOT to be RELRO and unsigned in most signing schemas.