Re: [GIT PULL v2] Scheduler enhancements for v6.14

From: Ingo Molnar
Date: Tue Jan 21 2025 - 15:57:26 EST



* Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:

> > > 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.

Thank you! Linus just pulled the v2 pull request, so all should be good
upstream.

Ingo