public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/31479] New: Missing #include <sys/rseq.h> in sched_getcpu.c may result in a loss of rseq acceleration
@ 2024-03-13 10:28 fweimer at redhat dot com
2024-03-13 10:28 ` [Bug libc/31479] " fweimer at redhat dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2024-03-13 10:28 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31479
Bug ID: 31479
Summary: Missing #include <sys/rseq.h> in sched_getcpu.c may
result in a loss of rseq acceleration
Product: glibc
Version: 2.35
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
This commit removed #include <sys/rseq.h> from nptl/descr.h:
commit 2c6b4b272e6b4d07303af25709051c3e96288f2d
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Jul 21 16:18:18 2023 +0200
nptl: Unconditionally use a 32-byte rseq area
If the kernel headers provide a larger struct rseq, we used that
size as the argument to the rseq system call. As a result,
rseq registration would fail on older kernels which only accept
size 32.
As a result, <sys/rseq.h> may or may not be implicitly included when
sysdeps/unix/sysv/linux/sched_getcpu.c is built. If <sys/rseq.h> is not
included, RSEQ_SIG is not defined, and we do not get rseq acceleration even if
supported on the architecture.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/31479] Missing #include <sys/rseq.h> in sched_getcpu.c may result in a loss of rseq acceleration
2024-03-13 10:28 [Bug libc/31479] New: Missing #include <sys/rseq.h> in sched_getcpu.c may result in a loss of rseq acceleration fweimer at redhat dot com
@ 2024-03-13 10:28 ` fweimer at redhat dot com
2024-03-13 12:24 ` fweimer at redhat dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2024-03-13 10:28 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31479
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
Status|NEW |ASSIGNED
Assignee|unassigned at sourceware dot org |fweimer at redhat dot com
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/31479] Missing #include <sys/rseq.h> in sched_getcpu.c may result in a loss of rseq acceleration
2024-03-13 10:28 [Bug libc/31479] New: Missing #include <sys/rseq.h> in sched_getcpu.c may result in a loss of rseq acceleration fweimer at redhat dot com
2024-03-13 10:28 ` [Bug libc/31479] " fweimer at redhat dot com
@ 2024-03-13 12:24 ` fweimer at redhat dot com
2024-03-18 11:31 ` fweimer at redhat dot com
2024-03-18 11:32 ` fweimer at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2024-03-13 12:24 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31479
--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
Patch posted:
[PATCH] linux: Add #include <sys/rseq.h> to sched_getcpu.c
<https://inbox.sourceware.org/libc-alpha/871q8es6yh.fsf@oldenburg.str.redhat.com/T/>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/31479] Missing #include <sys/rseq.h> in sched_getcpu.c may result in a loss of rseq acceleration
2024-03-13 10:28 [Bug libc/31479] New: Missing #include <sys/rseq.h> in sched_getcpu.c may result in a loss of rseq acceleration fweimer at redhat dot com
2024-03-13 10:28 ` [Bug libc/31479] " fweimer at redhat dot com
2024-03-13 12:24 ` fweimer at redhat dot com
@ 2024-03-18 11:31 ` fweimer at redhat dot com
2024-03-18 11:32 ` fweimer at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2024-03-18 11:31 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31479
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://issues.redhat.com/b
| |rowse/RHEL-28119
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/31479] Missing #include <sys/rseq.h> in sched_getcpu.c may result in a loss of rseq acceleration
2024-03-13 10:28 [Bug libc/31479] New: Missing #include <sys/rseq.h> in sched_getcpu.c may result in a loss of rseq acceleration fweimer at redhat dot com
` (2 preceding siblings ...)
2024-03-18 11:31 ` fweimer at redhat dot com
@ 2024-03-18 11:32 ` fweimer at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2024-03-18 11:32 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31479
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |2.40
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for 2.40 via:
commit 7a76f218677d149d8b7875b336722108239f7ee9
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Mar 15 19:08:24 2024 +0100
linux: Use rseq area unconditionally in sched_getcpu (bug 31479)
Originally, nptl/descr.h included <sys/rseq.h>, but we removed that
in commit 2c6b4b272e6b4d07303af25709051c3e96288f2d ("nptl:
Unconditionally use a 32-byte rseq area"). After that, it was
not ensured that the RSEQ_SIG macro was defined during sched_getcpu.c
compilation that provided a definition. This commit always checks
the rseq area for CPU number information before using the other
approaches.
This adds an unnecessary (but well-predictable) branch on
architectures which do not define RSEQ_SIG, but its cost is small
compared to the system call. Most architectures that have vDSO
acceleration for getcpu also have rseq support.
Fixes: 2c6b4b272e6b4d07303af25709051c3e96288f2d
Fixes: 1d350aa06091211863e41169729cee1bca39f72f
Reviewed-by: Arjun Shankar <arjun@redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-18 11:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-13 10:28 [Bug libc/31479] New: Missing #include <sys/rseq.h> in sched_getcpu.c may result in a loss of rseq acceleration fweimer at redhat dot com
2024-03-13 10:28 ` [Bug libc/31479] " fweimer at redhat dot com
2024-03-13 12:24 ` fweimer at redhat dot com
2024-03-18 11:31 ` fweimer at redhat dot com
2024-03-18 11:32 ` fweimer at redhat dot com
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).