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 implement some GETREGSET functionality for x64 and aarch64 #1679

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gankra
Copy link

@Gankra Gankra commented Mar 16, 2022

The CFGs are kinda all over the place... I don't have a good sense for how fragmented the different env's are.

Note that this depends on rust-lang/libc#2719 for the definitions of user_fpsimd_struct

Comment on lines +289 to +291
// If we get the struct definition wrong for a platform, linux can just scribble all over
// our memory. In some sense it's "too late" because it could have written past the bounds
// of our `data` value, but it's better to try to crash now than keep the program going!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this comment is accurate. From what I understand reading the ptrace docs, it won't write past the end of our buffer since it knows that from the input iov_len. It sets the length of iov_len so that we can know if our buffer is too small or too large for the full set of registers. So, there shouldn't be any stack corruption here as far as I can tell (but this assertion is still great to have).

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