From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Ingo Molnar <mingo@kernel.org>, Michael Jeanson <mjeanson@efficios.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Tejun Heo <tj@kernel.org>
Subject: Re: [GIT PULL v2] Scheduler enhancements for v6.14
Date: Tue, 21 Jan 2025 10:37:05 -0500 [thread overview]
Message-ID: <f2ea764b-f333-4d01-b73e-c6ec0db0fdfa@efficios.com> (raw)
In-Reply-To: <fbbb0b40-cf40-4fa7-bd3f-828e027b19b5@efficios.com>
On 2025-01-21 06:49, Mathieu Desnoyers wrote:
> On 2025-01-21 02:23, Ingo Molnar wrote:
>>
>> * Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:
>>
>>> On 20-Jan-2025 12:07:41 PM, Ingo Molnar wrote:
>>>>
>>>> Linus,
>>>>
>>>> Please pull the latest sched/core Git tree from:
>>>>
>>>> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
>>>> sched-core-2025-01-20
>>>>
>>>> # HEAD: 7d9da040575b343085287686fa902a5b2d43c7ca psi: Fix race
>>>> when task wakes up before psi_sched_switch() adjusts flags
>>>>
>>>> Scheduler enhancements for v6.14:
>>>
>>> [...]
>>>
>>>> - RSEQ enhancements:
>>>>
>>>> - Validate read-only fields under DEBUG_RSEQ config
>>>> (Mathieu Desnoyers)
>>>
>>> FYI, a regression introduced by this commit was reported by s390x
>>> glibc developers testing against linux-next:
>>>
>>> https://sourceware.org/pipermail/libc-alpha/2025-January/163993.html
>>>
>>> I've sent a fix here:
>>>
>>> https://lore.kernel.org/lkml/20250116205956.836074-1-mathieu.desnoyers@efficios.com/
>>>
>>> The commit introducing the issue is in this PR, but not the fix.
>>
>> Indeed - with the bug RSEQ_FLAG_UNREGISTER would fail with an incorrect
>> -EFAULT return.
>>
>> I've applied your fix, and updated the pull request for Linus further
>> below. If Linus has already pulled I'll send a fixes pull request
>> separately, or Linus can apply the fix from email directly:
>>
>> Acked-by: Ingo Molnar <mingo@kernel.org>
>>
>> Or he can pull the sched-core-2025-01-21 tag below safely on top of
>> sched-core-2025-01-20, which will result in a diffstat of:
>>
>> Mathieu Desnoyers (1):
>> rseq: Fix rseq unregistration regression
>>
>> kernel/rseq.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Since I booted the scheduler tree on generic desktops and it was tested
>> on other systems as well and nothing appeared to be broken, I presume
>> RSEQ_FLAG_UNREGISTER is used only in libc syscall-testcases and in
>> specific applications?
>
> Nowadays, rseq unregistration is used by specialized applications (e.g.
> tcmalloc) which disable glibc rseq support with the glibc tunable
> and register it themselves. (GLIBC_TUNABLES=glibc.pthread.rseq=0)
>
> A recent glibc (2.35+) don't use explicit rseq unregistration, it's
> unregistered implicitly when the thread exits.
>
> I'll make a note to add a test case for GLIBC_TUNABLES=glibc.pthread.rseq=0
> in the rseq selftests and librseq to improve test coverage when using a
> recent glibc.
>
> We have all the code in there to use rseq unregistration, but it is skipped
> when glibc 2.35+ is handling the registration.
It turns out that it is covered by both librseq and glibc tests, just
not by the kernel rseq selftests:
librseq test: tests/syscall_errors_test.c
glibc test: sysdeps/unix/sysv/linux/tst-rseq-disable.c
We should import the librseq test into the kernel rseq selftests as
well. CCing Michael Jeanson who will take care of this.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
next prev parent reply other threads:[~2025-01-21 15:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 11:07 [GIT PULL] " Ingo Molnar
2025-01-20 17:26 ` Mathieu Desnoyers
2025-01-21 7:23 ` [GIT PULL v2] " Ingo Molnar
2025-01-21 11:49 ` Mathieu Desnoyers
2025-01-21 15:37 ` Mathieu Desnoyers [this message]
2025-01-21 20:57 ` Ingo Molnar
2025-01-21 19:40 ` pr-tracker-bot
2025-01-21 19:40 ` [GIT PULL] " pr-tracker-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f2ea764b-f333-4d01-b73e-c6ec0db0fdfa@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=mjeanson@efficios.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome