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

[Investigation] Verify if binary is built with SCS reserved register. #77

Closed
appujee opened this issue Mar 16, 2023 · 2 comments
Closed
Assignees

Comments

@appujee
Copy link
Collaborator

appujee commented Mar 16, 2023

One requirement for reserving x18 as a platform register for ShadowCallStack is that all the binaries should be compiled with -ffixed-x18.

@samitolvanen mentioned that binary validator can check for usage of x18.

Maybe this is not needed but I'm creating a task in case this comes up later and we can refer back. If there are other usages of having a binary validator, maybe this could be worth having one?

An example from when a binary validator would(did?) have helped Apple when Cyclone had a bug handling zcz instructions.

From: https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20171218/511205.html

Author: tnorthover
Date: Mon Dec 18 02:36:00 2017
New Revision: 320965

URL: http://llvm.org/viewvc/llvm-project?rev=320965&view=rev
Log:
AArch64: work around how Cyclone handles "movi.2d vD, #0".

For Cylone, the instruction "movi.2d vD, #0" is executed incorrectly in some rare
circumstances. Work around the issue conservatively by avoiding the instruction entirely.

This patch changes CodeGen so that problematic instructions are never
generated, and the AsmParser so that an equivalent instruction is used (with a
warning).

@appujee appujee changed the title [Investigation] Verify if binary is built with x18 reserved register. [Investigation] Verify if binary is built with SCS reserved register. Mar 29, 2023
@appujee appujee self-assigned this Mar 29, 2023
@appujee
Copy link
Collaborator Author

appujee commented Mar 29, 2023

The object file will have a tag so this is not needed

@appujee appujee closed this as completed Mar 29, 2023
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

1 participant