From: Michael Jeanson <mjeanson@efficios.com>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Sean Christopherson <seanjc@google.com>,
Peter Zijlstra <peterz@infradead.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Boqun Feng <boqun.feng@gmail.com>, Shuah Khan <shuah@kernel.org>,
Kienan Stewart <kstewart@efficios.com>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
Florian Weimer <fweimer@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] rseq/selftests: Use weak symbol reference, not definition, to link with glibc
Date: Wed, 20 Aug 2025 11:40:47 -0400 [thread overview]
Message-ID: <92cf18ee-e1ee-43ed-91e2-35e35cf97af8@efficios.com> (raw)
In-Reply-To: <62f49015-e1af-43ed-8499-507a49032662@efficios.com>
On 2025-08-20 08:55, Mathieu Desnoyers wrote:
>
> Michael, can you try it out ?
Will do.
>
> Kienan, we may want to add a configuration forcing "-fno-common" to our
> CI, this problematic pattern may be hiding other issues elsewhere. I'm
> thinking of LTTng-UST tracepoint headers and libside headers.
AFAIK, -fno-common has been the default since GCC 10 so it's already
well tested in CI, there are a few fixes from around 2020 in LTTng
related to this.
>
> Sean, do you want to contribute the fix to librseq as well ?
Librseq currently doesn't have the weak symbols like the selftests so
the fix doesn't really apply.
>
> Thanks everyone for looking into this. I'll be back from vacation next
> week and will resume normal operations. :-)
>
> Mathieu
>
>> */
>> -__weak ptrdiff_t __rseq_offset;
>> -__weak unsigned int __rseq_size;
>> -__weak unsigned int __rseq_flags;
>> +extern __weak ptrdiff_t __rseq_offset;
>> +extern __weak unsigned int __rseq_size;
>> +extern __weak unsigned int __rseq_flags;
>>
>> static const ptrdiff_t *libc_rseq_offset_p = &__rseq_offset;
>> static const unsigned int *libc_rseq_size_p = &__rseq_size;
>> @@ -209,7 +209,7 @@ void rseq_init(void)
>> * libc not having registered a restartable sequence. Try to find the
>> * symbols if that's the case.
>> */
>> - if (!*libc_rseq_size_p) {
>> + if (!libc_rseq_size_p || !*libc_rseq_size_p) {
>> libc_rseq_offset_p = dlsym(RTLD_NEXT, "__rseq_offset");
>> libc_rseq_size_p = dlsym(RTLD_NEXT, "__rseq_size");
>> libc_rseq_flags_p = dlsym(RTLD_NEXT, "__rseq_flags");
>>
>> base-commit: c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9
>
>
next prev parent reply other threads:[~2025-08-20 15:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 22:29 Sean Christopherson
2025-08-20 12:55 ` Mathieu Desnoyers
2025-08-20 15:40 ` Michael Jeanson [this message]
2025-08-20 22:03 ` Michael Jeanson
2025-09-13 17:57 ` [tip: core/rseq] " tip-bot2 for Sean Christopherson
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=92cf18ee-e1ee-43ed-91e2-35e35cf97af8@efficios.com \
--to=mjeanson@efficios.com \
--cc=boqun.feng@gmail.com \
--cc=fweimer@redhat.com \
--cc=kstewart@efficios.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=seanjc@google.com \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®