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

[WIP][CHERI-RISCV-V] Add option to zero ra/cra slot on return #450

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

arichardson
Copy link
Member

If -mllvm -zero-return-slot-after-restore is passed to clang, we will now
write zero to the (c)ra stack slot. This flag is experimental as it
currently makes some assumptions that may not necessarily always be true.

If -mllvm -zero-return-slot-after-restore is passed to clang, we will now
write zero to the (c)ra stack slot. This flag is experimental as it
currently makes some assumptions that may not necessarily always be true.
@arichardson arichardson requested a review from jrtc27 June 25, 2020 11:27
@brooksdavis brooksdavis linked an issue Jun 25, 2020 that may be closed by this pull request
@arichardson
Copy link
Member Author

This does not seem to work yet:

start_init: trying /sbin/init
pid 19 (sh), uid (0): Failed to open coredump file 'sh.core', error=30
pid 19 (sh), jid 0, uid 0: exited on signal 34
2020-06-25T12:46:32.321835+00:00  init 1 - - /bin/sh on /etc/rc terminated abnormally, going to single user mode
Enter full pathname of shell or RETURN for /bin/sh:

@arichardson arichardson marked this pull request as draft July 6, 2022 07:01
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

Successfully merging this pull request may close these issues.

clear CRA on return in clang/llvm
1 participant