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

Preserve callee saved registers. #78

Merged
merged 1 commit into from
May 14, 2024
Merged

Conversation

am009
Copy link
Contributor

@am009 am009 commented May 13, 2024

抽象解释分析的过程中,如果某个函数有一些很深的函数调用,结尾的时候callee saved registers有时不能正常恢复(好像是因为栈上存的栈指针会乱掉,而栈结尾恢复callee saved registers的时候用的是这个栈上存的栈指针)。如果在抽象解释,函数调用返回的时候,直接保留callee saved registers能够有效地提升分析精度。

我在ARM系列架构上发现的这个问题,因此目前支持了保留ARM和AArch64的调用约定的callee saved registers。而且ARM系列的调用约定AAPCS比较统一。X86暂未在这次PR实现支持,而且X86的调用约定好像没那么统一。

@MatthewShao MatthewShao merged commit 658b413 into KeenSecurityLab:main May 14, 2024
3 checks passed
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.

2 participants