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

i#4495: Preserve translated stolen register #4526

Merged
merged 2 commits into from
Nov 11, 2020

Conversation

derekbruening
Copy link
Contributor

Currently, a stolen register value that is translated by a client is
discarded both in a synchall and a synchronous signal. We fix both
paths here.

Adds a new test client.stolen-reg which tests both a synchronous fault
signal translation path as well as a synchall translation path via a
synchall flush. The test was confirmed to fail without either of the
fixes in place.

Ensures the new test passes on 32-bit ARM. This exercised the
translate_from_synchall_to_dispatch() path and found some ARM bugs:
the reset exit stub is A32 mode, so we need to change the mode for the
suspended sigcontext; yet thread_set_mcontext() did not support that.
That is all fixed now and verified.

Fixes #4495

Currently, a stolen register value that is translated by a client is
discarded both in a synchall and a synchronous signal.  We fix both
paths here.

Adds a new test client.stolen-reg which tests both a synchronous fault
signal translation path as well as a synchall translation path via a
synchall flush.  The test was confirmed to fail without either of the
fixes in place.

Ensures the new test passes on 32-bit ARM.  This exercised the
translate_from_synchall_to_dispatch() path and found some ARM bugs:
the reset exit stub is A32 mode, so we need to change the mode for the
suspended sigcontext; yet thread_set_mcontext() did not support that.
That is all fixed now and verified.

Fixes #4495
@derekbruening
Copy link
Contributor Author

Maybe the ARM mode fixes could be separated: but I'm not willing to make a separate test so they'd share this one.

@derekbruening
Copy link
Contributor Author

(Note that the appveyor failure is alloc-noreset == #4436)

suite/tests/client-interface/stolen-reg.c Outdated Show resolved Hide resolved
@derekbruening derekbruening merged commit c1be309 into master Nov 11, 2020
@derekbruening derekbruening deleted the i4495-stolen-reg-client-change branch November 11, 2020 20:58
gregcawthorne pushed a commit that referenced this pull request Nov 28, 2020
Currently, a stolen register value that is translated by a client is
discarded both in a synchall and a synchronous signal.  We fix both
paths here.

Adds a new test client.stolen-reg which tests both a synchronous fault
signal translation path as well as a synchall translation path via a
synchall flush.  The test was confirmed to fail without either of the
fixes in place.

Ensures the new test passes on 32-bit ARM.  This exercised the
translate_from_synchall_to_dispatch() path and found some ARM bugs:
the reset exit stub is A32 mode, so we need to change the mode for the
suspended sigcontext; yet thread_set_mcontext() did not support that.
That is all fixed now and verified.

Fixes #4495
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.

Translated stolen register app value lost on signal/synchall control transfer
2 participants