lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92cf18ee-e1ee-43ed-91e2-35e35cf97af8@efficios.com>
Date: Wed, 20 Aug 2025 11:40:47 -0400
From: Michael Jeanson <mjeanson@...icios.com>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Sean Christopherson <seanjc@...gle.com>,
 Peter Zijlstra <peterz@...radead.org>, "Paul E. McKenney"
 <paulmck@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
 Shuah Khan <shuah@...nel.org>, Kienan Stewart <kstewart@...icios.com>
Cc: linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
 Florian Weimer <fweimer@...hat.com>, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] rseq/selftests: Use weak symbol reference, not
 definition, to link with glibc

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ