-
Notifications
You must be signed in to change notification settings - Fork 603
i#7046 memory dump: add missing pstate value to aarch64 user_regs_struct. #7257
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: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -285,6 +285,7 @@ mcontext_to_user_regs(DR_PARAM_IN priv_mcontext_t *mcontext, | |
| regs->regs[30] = mcontext->r30; | ||
| regs->sp = mcontext->sp; | ||
| regs->pc = (uint64_t)mcontext->pc; | ||
| regs->pstate = mcontext->nzcv; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copy a review comment from #7255:
The user_regs_struct for aarch64 has the following fields: struct user_regs_struct pstate is the only one missing. To test whether this function copies all the field is straight forward but I have not been able to think of a way to test it functionally.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At least explain how you tested in the PR description: how do you know nzcv is enough for pstate (see below)? Did you generate a core dump from the kernel at the same point in the same app and compare the fields manually? That sounds like something that should be done. That could conceivably be turned into an automated test but it could be tricky to get core dumps enabled in a test VM. At least describe your manual testing.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't the aarch64 term "pstate" include a bunch of other things and not just the NZCV flags? Are you sure this |
||
| #else | ||
| # error Unsupported architecture | ||
| #endif | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.