[v2] linux: Add #include <sys/rseq.h> to sched_getcpu.c (bug 31479)
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Testing passed
|
Commit Message
Originally, nptl/descr.h included <sys/rseq.h>, but we removed that
in commit 2c6b4b272e6b4d07303af25709051c3e96288f2d ("nptl:
Unconditionally use a 32-byte rseq area").
Fixes: 2c6b4b272e6b4d07303af25709051c3e96288f2d
Fixes: 1d350aa06091211863e41169729cee1bca39f72f
---
v2: Add bug reference.
sysdeps/unix/sysv/linux/sched_getcpu.c | 1 +
1 file changed, 1 insertion(+)
base-commit: 2173173d57971d042c0ad4b281431ae127e9b5b8
Comments
On Mär 13 2024, Florian Weimer wrote:
> Originally, nptl/descr.h included <sys/rseq.h>, but we removed that
> in commit 2c6b4b272e6b4d07303af25709051c3e96288f2d ("nptl:
> Unconditionally use a 32-byte rseq area").
Can't this use rseq_area unconditionally?
* Andreas Schwab:
> On Mär 13 2024, Florian Weimer wrote:
>
>> Originally, nptl/descr.h included <sys/rseq.h>, but we removed that
>> in commit 2c6b4b272e6b4d07303af25709051c3e96288f2d ("nptl:
>> Unconditionally use a 32-byte rseq area").
>
> Can't this use rseq_area unconditionally?
Interesting idea. It adds an extra branch for architectures which are
not rseq-enabled, but they likely lack vDSO acceleration as well and hit
the full system call every time, so it doesn't really matter.
I'll test and send a v3, although I don't think I've got access to any
!RSEQ_SIG architectures.
Thanks,
Florian
@@ -19,6 +19,7 @@
#include <sched.h>
#include <sysdep.h>
#include <sysdep-vdso.h>
+#include <sys/rseq.h>
static int
vsyscall_sched_getcpu (void)