-
Notifications
You must be signed in to change notification settings - Fork 566
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
Add AArch64 support for restartable sequences #4316
Comments
Rseq requries a Linux kernel version 4.18+. Both the TX1 and Jenkins are too old. I have an internal machine I am currently testing on, but for regression tests it would be best if the Jenkins machine actually had rseq support (the test will still gracefully pass by just doing nothing if rseq is not there). @AssadHashmi would it be possible to upgrade the Jenkins kernel to 4.18+ for rseq support? |
@derekbruening we will shortly be migrating the existing Jenkins to a newer machine: an Ampere Altra! |
Thanks, sounds good. |
Ports the linux.rseq test and its extensive inline assembly to AArch64. We use compiler-acquired C variable addresses prior to the assembly sequences for simplicity. This should be fine as there are plenty of GPR's and DR handles inputs. Tested natively and with forthcoming DR rseq mangling changes; separated to keep diffs smaller. These tests will be enabled in the PR that adds DR handling. Issue: #4316
Ports the linux.rseq test and its extensive inline assembly to AArch64. We use compiler-acquired C variable addresses prior to the assembly sequences for simplicity. This should be fine as there are plenty of GPR's and DR handles inputs. Tested natively and with forthcoming DR rseq mangling changes; separated to keep diffs smaller. These tests will be enabled in the PR that adds DR handling. Issue: #4316
Ports rseq mangling to AArch64. This requires implementing patch_mov_immed_arch() (done by leveraging existing raw encoding code from exit stub support) and spilling extra scratch registers in multiple places. Expands translation support to cover the new mangling. This includes adding proper recognition of an mcontext base load, which was incorrectly identified as an indirect branch target load on x86. Ports the heuristic for finding the app's rseq TLS offset on attach (when we did not see an rseq syscall) for AArch64 to look forward instead of backward as on x86 where negative segment offsets are used. Enables the rseq tests for AArch64. Updates the rseq docs to state that AArch64 is supported. One final step is to support stores with writeback, which are seen in real rseq sequences. That will be done separately. This completes porting the x86 support to AArch64. Issue: #4316
Ports rseq mangling to AArch64. This requires implementing patch_mov_immed_arch() (done by leveraging existing raw encoding code from exit stub support) and spilling extra scratch registers in multiple places. Expands translation support to cover the new mangling. This includes adding proper recognition of an mcontext base load, which was incorrectly identified as an indirect branch target load on x86. Ports the heuristic for finding the app's rseq TLS offset on attach (when we did not see an rseq syscall) for AArch64 to look forward instead of backward as on x86 where negative segment offsets are used. Enables the rseq tests for AArch64. Tested all 6 rseq tests manually on a machine with a newer kernel. The Jenkins machine is too old and does not have rseq. 3 rseq tests do run on QEMU so those are enabled but until Jenkins is upgraded we will not have perfect regression tests. Updates the rseq docs to state that AArch64 is supported. One final step is to support stores with writeback, which are seen in real rseq sequences. That will be done separately. This completes porting the x86 support to AArch64. Issue: #4316
I enabled 3 linux.rseq* tests under QEMU because they pass there, but on inspection QEMU is returning ENOSYS for rseq: so they are not testing full functionality. |
Adds nop-ing of writeback stores inside rseq regions by replacing them with adds to preserve the GPR changes but throw away the memory changes. Updates the documentation. Adds a test case. Fixes #4316
Adds nop-ing of writeback stores inside rseq regions by replacing them with adds to preserve the GPR changes but throw away the memory changes. Updates the documentation. Adds a test case. Fixes #4316
Adds translation of the save of input registers to rseq sequences. This fixes a hang on detach in the api.ir test on AArch64, which we remove from the flaky list here. Manually tested by running api.rseq 200x on the Jenkins machine. Previously the test failed every single time there. Issue: #4923, #4316, #4669 Fixes #4923
Adds translation of the save of input registers to rseq sequences. This fixes a hang on detach in the api.ir test on AArch64, which we remove from the flaky list here. Manually tested by running api.rseq 200x on the Jenkins machine. Previously the test failed every single time there. Issue: #4923, #4316, #4669 Fixes #4923
This covers adding AArch64 support to bring it into parity with x86 for restartable sequence ("rseq") handling which was added as part of #2350.
The text was updated successfully, but these errors were encountered: