-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[RISC-V] Adjust trampoline code for branch control flow protection #141949
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
base: main
Are you sure you want to change the base?
Conversation
@llvm/pr-subscribers-backend-risc-v Author: Jesse Huang (jaidTw) ChangesIt is tricky to observe the trampoline code from the lit test file, because instructions are encoded and written onto the stack
|
There is a change to use software-guarded jump (t2) in the trampoline code, the new stack of the test is now
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
5782af0
to
c3de1c7
Compare
Is gcc going to make the same change? |
Yes, They plan to change it but might not landed yet. @kito-cheng should know more |
CI is failing on the new test, but I can't reproduce it locally yet |
Yes, the code sequence used in GCC was designed for our internal fixed-one label scheme, that's not work for func-sig based scheme, so the only way is using sw-guarded jump here I think. |
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. Thanks @jaidTw !
It is tricky to observe the trampoline code in the lit test file because instructions are encoded and written onto the stack. I don't have a better idea for doing it now. The stack of the test is organized as follow