From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D25833858CD1; Mon, 18 Mar 2024 11:32:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D25833858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710761553; bh=vIljZ4e9OiWmlgepReei187SBiXfXDgtp3fg5+aFUko=; h=From:To:Subject:Date:In-Reply-To:References:From; b=r/XgGp7oZ0snW+uf6DCLSbSWr1YmnscxY0u6BbMJ/BpO7bEMhCUhlNaUxRPiof7mc OOhPRvPSNMblErucDNtIaU3sJhzgP+Zq+y05kppUOh4isStcJZG+/g+dLmt4DQwrxy GH2fMdf2W2N1Qn1npJHFUXdxryXNMtmzrSja72t4= From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/31479] Missing #include in sched_getcpu.c may result in a loss of rseq acceleration Date: Mon, 18 Mar 2024 11:32:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.35 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: fweimer at redhat dot com X-Bugzilla-Target-Milestone: 2.40 X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: target_milestone resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31479 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.40 Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #2 from Florian Weimer --- Fixed for 2.40 via: commit 7a76f218677d149d8b7875b336722108239f7ee9 Author: Florian Weimer Date: Fri Mar 15 19:08:24 2024 +0100 linux: Use rseq area unconditionally in sched_getcpu (bug 31479) Originally, nptl/descr.h included , 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 --=20 You are receiving this mail because: You are on the CC list for the bug.=