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] [day] [month] [year] [list]
Message-ID: <c6b703ef-8481-23bc-0b4c-dfb8d48da74f@linuxfoundation.org>
Date:   Wed, 11 Dec 2019 08:45:46 -0700
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc:     linux-kselftest <linux-kselftest@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: Linux 5.5=rc1 kselftest rseq test build failure

On 12/11/19 8:19 AM, Mathieu Desnoyers wrote:
> ----- On Dec 10, 2019, at 7:27 PM, Shuah Khan skhan@...uxfoundation.org wrote:
> 
>> Hi Mathieu,
>>
>> I am seeing rseq test build failure on Linux 5.5-rc1.
>>
>> gcc -O2 -Wall -g -I./ -I../../../../usr/include/ -L./ -Wl,-rpath=./
>> param_test.c -lpthread -lrseq -o ...tools/testing/selftests/rseq/param_test
>> param_test.c:18:21: error: static declaration of ‘gettid’ follows
>> non-static declaration
>>     18 | static inline pid_t gettid(void)
>>        |                     ^~~~~~
>> In file included from /usr/include/unistd.h:1170,
>>                   from param_test.c:11:
>> /usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: previous
>> declaration of ‘gettid’ was here
>>     34 | extern __pid_t gettid (void) __THROW;
>>        |                ^~~~~~
>> make: *** [Makefile:28: ...tools/testing/selftests/rseq/param_test] Error 1
>>
>>
>> The following obvious change fixes it. However, there could be reason
>> why this was defined here. If you think this is the right fix, I can
>> send the patch. I started seeing this with gcc version 9.2.1 20191008
> 
> This issue is caused by introduction of "gettid()" in glibc 2.30. I don't
> think we want to introduce a build dependency on glibc 2.30 for kernel
> selftests. Removing the gettid() symbol as you propose here will break
> build environments with glibc < 2.30.
> 
> We could eventually try to figure out whether the glibc headers implement
> gettid() at build time (not sure how), or we could simply rename our own
> "gettid()" to "rseq_gettid()", thus removing the namespace clash with
> glibc.
> 
> I can propose a patch renaming gettid() to rseq_gettid() is that approach
> is OK with you.
> 

Looks like you already have a patch to do this. I see it in my Inbox.
I could take that.

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ