-
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
[pauthabi64][aaelf64] Move PAuth GOT relocs out of private space #300
Conversation
Apply change from the spec ARM-software/abi-aa#300
…ce (#118214) Apply change from the spec ARM-software/abi-aa#300
…ce (llvm#118214) Apply change from the spec ARM-software/abi-aa#300
I'm working on a rebase of this PR. |
In the initial draft relocations for signing GOT entries were defined in the private space reserved for experiments. It was not known if these relocations would be useful as if RELRO is supported the GOT does not need to be signed. There is now at least one user of the GOT signing relocations so we should move the relocations out of the private space and into the space reserved for the PAuthABI. This PR includes relocations added in ARM-software#295 Fixes: ARM-software#298
6b15b45
to
5ed7ee4
Compare
pauthabielf64/pauthabielf64.rst
Outdated
@@ -1117,80 +1120,80 @@ The GOT entries must be relocated by AUTH variant dynamic relocations. | |||
+-------------+----------------------------------------+----------------------------------------+--------------------------+ | |||
| ELF 64 Code | Name | Operation | Comment | | |||
+=============+========================================+========================================+==========================+ | |||
| 0x8110 | R\_AARCH64\_AUTH\_MOVW\_GOTOFF\_G0 | G(ENCD(GDAT(S))) - GOT | Set a MOV[NZ] immediate | | |||
| 0x245 | R\_AARCH64\_AUTH\_MOVW\_GOTOFF\_G0 | G(ENCD(GDAT(S))) - GOT | Set a MOV[NZ] immediate | |
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.
Very much a nit, but for the sanity of people that cross reference aaelf64 and pauthabielf64 documentation, it'd be nice if the ELF code in this doc wasn't written in hex.
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.
I originally wrote it in hex as LLVM (only implementation of PAuthABI defines relocation numbers in hex so this made it easier to cross-check the implementation. Just thinking if it is worth writing both? For example 0x245 (581)
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.
yea, sounds good to me.
Add a decimal representation of the relocation code alongside the relocation code for easier cross-reference with AAELF64. The PAuthABI uses hex for the relocation codes as the only implementation LLVM uses hex in the relocation definitions. This makes it easier to cross-reference. Adding the decimal in parentheses satisfies both forms of cross-reference.
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.
LGTM
In the initial draft relocations for signing GOT entries were
defined in the private space reserved for experiments. It was not
known if these relocations would be useful as if RELRO is supported
the GOT does not need to be signed. There is now at least one user
of the GOT signing relocations so we should move the relocations
out of the private space and into the space reserved for the
PAuthABI.
This PR includes relocations added in
#295
Fixes: #298