-
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
i#5431: Support glibc's rseq support #5711
Conversation
On AArch64 with glibc 2.35 (not in our CI), the
But I see the same failure without this change and glibc's rseq disabled. So it's probably unrelated. |
Please file an issue on this: never seen this before. |
run arm tests |
1 similar comment
run arm tests |
|
run arm tests |
Please cite an existing issue or file a new one, as with any test failure. |
Wasn't sure before if it's my PR that's causing it. But I ran it without these changes on the Jenkins machine and they still time out. Maybe it's related to the Jenkins machine update. |
|
Run arm tests |
Fixes issues with DR's rseq handling in glibc 2.35+.
Glibc 2.35 added support for the Linux rseq feature. See
https://lwn.net/Articles/883104/ for details. TLDR; glibc registers
its own struct rseq at init time, and stores its offset from the
thread pointer in __rseq_offset. The glibc-registered struct rseq is
present in the struct pthread. If glibc's rseq support isn't
available, either due to some issue or because the user disabled
it by exporting GLIBC_TUNABLES=glibc.pthread.rseq=0, it will
set __rseq_size to zero.
Improves the heuristic to find the registered struct rseq. For the
glibc-support case: on AArch64, it is at a -ve offset from app lib
seg base, whereas on x86 it's at a +ve offset. On both AArch64
and x86, the offset is of the opposite sign than what it would be
if the app registered the struct rseq manually in its static TLS
(which happens for older glibc and when glibc's rseq support
is disabled).
Detects whether the glibc rseq support is enabled by looking at
the sign of the struct rseq offset.
Removes the drrun
-disable_rseq
workaround added by #5695.Adjusts the linux.rseq test to get the struct rseq registered by
glibc, when it's available. Also fixes some issues in the test.
Adds the Ubuntu_22 tag to rseq tests so that they are enabled.
Our Ubuntu-20 CI tests the case without rseq support in glibc,
where the app registers the struct rseq. This also helps test the
case where the app is not using glibc.
Also, our Ubuntu-22 CI tests the case with Glibc rseq support.
Manually tested the disabled rseq support case on glibc 2.35,
but not adding a CI version of it.
Fixes #5431