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

ASSERT wrong isa mode on signal redirect and delivery on ARM: regression from kernel xfer event feature #4522

Closed
derekbruening opened this issue Nov 5, 2020 · 0 comments · Fixed by #4523
Assignees

Comments

@derekbruening
Copy link
Contributor

I'm porting the client.signal test to ARM and it hits this assert:

Redirected
Sending SIGUSR2
signal event 8 sig=12
kernel_xfer_event: type 9, sig 12
<Application /home/derek/dr/git/build_dbg_tests/suite/tests/bin/client.signal (1540).  Internal Error: DynamoRIO debug check failure: /home/derek/dr/git/src/core/dispatch.c:491 dr_get_isa_mode(dcontext) == FRAG_ISA_MODE(targetf->flags) IF_X64(|| (dr_get_isa_mode(dcontext) == DR_ISA_IA32 && !FRAG_IS_32(targetf->flags) && DYNAMO_OPTION(x86_to_x64)))

Looks like the kernel_xfer_event additional calls are re-calling
canonicalize_pc_target() which can't be called twice: the ISA mode is lost
then.

@derekbruening derekbruening self-assigned this Nov 5, 2020
derekbruening added a commit that referenced this issue Nov 5, 2020
On ARM, the kernel xfer event code added extra calls to
canonicalize_pc_target(), which can't be called twice: the ISA mode is
lost then.  We fix that here by refactoring the code to call just
once.

Tested on the client.signal test, which is ported and enabled in a
forthcoming PR for #4516.

Issue: #4516, #4522
Fixes #4522
derekbruening added a commit that referenced this issue Nov 5, 2020
Adds client thread support to AArchXX.
Implements dynamorio_clone for both ARM and AArch64 and adds necessary
TLS swapping, including handling initial tpidr* values pointing at
read-only memory.

Ports the client.signal test's assembly to a64 and arm.  Enables the
client.signal test on aarchxx.  The test covers the client thread support
here, as well as general client signal handling and manipulating.
Tested manually on arm with the #4522 fix.

Issue: #4474, #4516, #4522
Fixes #4516
derekbruening added a commit that referenced this issue Nov 5, 2020
On ARM, the kernel xfer event code added extra calls to
canonicalize_pc_target(), which can't be called twice: the ISA mode is
lost then.  We fix that here by refactoring the code to call just
once.

Tested on the client.signal test, which is ported and enabled in a
forthcoming PR for #4516.

Issue: #4516, #4522
Fixes #4522
derekbruening added a commit that referenced this issue Nov 5, 2020
Adds client thread support to AArchXX.
Implements dynamorio_clone for both ARM and AArch64 and adds necessary
TLS swapping, including handling initial tpidr* values pointing at
read-only memory.

Ports the client.signal test's assembly to a64 and arm.  Enables the
client.signal test on aarchxx.  The test covers the client thread support
here, as well as general client signal handling and manipulating.
Tested manually on arm with the #4522 fix.

Issue: #4474, #4516, #4522
Fixes #4516
gregcawthorne pushed a commit that referenced this issue Nov 28, 2020
On ARM, the kernel xfer event code added extra calls to
canonicalize_pc_target(), which can't be called twice: the ISA mode is
lost then.  We fix that here by refactoring the code to call just
once.

Tested on the client.signal test, which is ported and enabled in a
forthcoming PR for #4516.

Issue: #4516, #4522
Fixes #4522
gregcawthorne pushed a commit that referenced this issue Nov 28, 2020
Adds client thread support to AArchXX.
Implements dynamorio_clone for both ARM and AArch64 and adds necessary
TLS swapping, including handling initial tpidr* values pointing at
read-only memory.

Ports the client.signal test's assembly to a64 and arm.  Enables the
client.signal test on aarchxx.  The test covers the client thread support
here, as well as general client signal handling and manipulating.
Tested manually on arm with the #4522 fix.

Issue: #4474, #4516, #4522
Fixes #4516
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 a pull request may close this issue.

1 participant