public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] linux: Add #include <sys/rseq.h> to sched_getcpu.c (bug 31479)
@ 2024-03-13 13:08 Florian Weimer
  2024-03-13 14:39 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2024-03-13 13:08 UTC (permalink / raw)
  To: libc-alpha

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(+)

diff --git a/sysdeps/unix/sysv/linux/sched_getcpu.c b/sysdeps/unix/sysv/linux/sched_getcpu.c
index dfb884568d..7a7915f87b 100644
--- a/sysdeps/unix/sysv/linux/sched_getcpu.c
+++ b/sysdeps/unix/sysv/linux/sched_getcpu.c
@@ -19,6 +19,7 @@
 #include <sched.h>
 #include <sysdep.h>
 #include <sysdep-vdso.h>
+#include <sys/rseq.h>
 
 static int
 vsyscall_sched_getcpu (void)

base-commit: 2173173d57971d042c0ad4b281431ae127e9b5b8


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] linux: Add #include <sys/rseq.h> to sched_getcpu.c (bug 31479)
  2024-03-13 13:08 [PATCH v2] linux: Add #include <sys/rseq.h> to sched_getcpu.c (bug 31479) Florian Weimer
@ 2024-03-13 14:39 ` Andreas Schwab
  2024-03-13 17:58   ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2024-03-13 14:39 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

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, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] linux: Add #include <sys/rseq.h> to sched_getcpu.c (bug 31479)
  2024-03-13 14:39 ` Andreas Schwab
@ 2024-03-13 17:58   ` Florian Weimer
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2024-03-13 17:58 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-alpha

* 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-13 17:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-13 13:08 [PATCH v2] linux: Add #include <sys/rseq.h> to sched_getcpu.c (bug 31479) Florian Weimer
2024-03-13 14:39 ` Andreas Schwab
2024-03-13 17:58   ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).