diff mbox series

[1/3] nptl: Move pthread_sigmask implementation to libc

Message ID 20200312205424.17101-1-adhemerval.zanella@linaro.org
State Dropped
Headers show
Series [1/3] nptl: Move pthread_sigmask implementation to libc | expand

Commit Message

Adhemerval Zanella March 12, 2020, 8:54 p.m. UTC
This is part of the libpthread removal project:

  <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html>

For ia64-linux-gnu, the sigblock was never exported from libphread.

Checked with a build against all affected ABIs.
---
 nptl/Makefile                                               | 3 ++-
 nptl/Versions                                               | 3 ++-
 nptl/libpthread-compat.c                                    | 6 ++++++
 sysdeps/ia64/nptl/Makefile                                  | 4 ++--
 sysdeps/unix/sysv/linux/aarch64/libc.abilist                | 1 +
 sysdeps/unix/sysv/linux/aarch64/libpthread.abilist          | 1 -
 sysdeps/unix/sysv/linux/alpha/Makefile                      | 6 +++---
 sysdeps/unix/sysv/linux/alpha/libc.abilist                  | 1 +
 sysdeps/unix/sysv/linux/alpha/libpthread.abilist            | 1 -
 sysdeps/unix/sysv/linux/arm/be/libc.abilist                 | 1 +
 sysdeps/unix/sysv/linux/arm/be/libpthread.abilist           | 1 -
 sysdeps/unix/sysv/linux/arm/le/libc.abilist                 | 1 +
 sysdeps/unix/sysv/linux/arm/le/libpthread.abilist           | 1 -
 sysdeps/unix/sysv/linux/csky/libc.abilist                   | 1 +
 sysdeps/unix/sysv/linux/csky/libpthread.abilist             | 1 -
 sysdeps/unix/sysv/linux/hppa/libc.abilist                   | 1 +
 sysdeps/unix/sysv/linux/hppa/libpthread.abilist             | 1 -
 sysdeps/unix/sysv/linux/i386/libc.abilist                   | 1 +
 sysdeps/unix/sysv/linux/i386/libpthread.abilist             | 1 -
 sysdeps/unix/sysv/linux/ia64/libc.abilist                   | 1 +
 sysdeps/unix/sysv/linux/ia64/libpthread.abilist             | 1 -
 sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c               | 3 +--
 sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist          | 1 +
 sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist    | 1 -
 sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist            | 1 +
 sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist      | 1 -
 sysdeps/unix/sysv/linux/microblaze/be/libc.abilist          | 1 +
 sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist    | 1 -
 sysdeps/unix/sysv/linux/microblaze/le/libc.abilist          | 1 +
 sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist    | 1 -
 sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist        | 1 +
 sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist      | 1 -
 sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist      | 1 +
 sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist      | 1 -
 sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist        | 1 +
 sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist        | 1 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist                  | 1 +
 sysdeps/unix/sysv/linux/nios2/libpthread.abilist            | 1 -
 sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist  | 1 +
 .../unix/sysv/linux/powerpc/powerpc32/libpthread.abilist    | 1 -
 sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist   | 1 +
 .../unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist | 1 -
 sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist   | 1 +
 .../unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist | 1 -
 sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist             | 1 +
 sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist       | 1 -
 sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist           | 1 +
 sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist     | 1 -
 sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist           | 1 +
 sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist     | 1 -
 sysdeps/unix/sysv/linux/sh/be/libc.abilist                  | 1 +
 sysdeps/unix/sysv/linux/sh/be/libpthread.abilist            | 1 -
 sysdeps/unix/sysv/linux/sh/le/libc.abilist                  | 1 +
 sysdeps/unix/sysv/linux/sh/le/libpthread.abilist            | 1 -
 sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist          | 1 +
 sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist    | 1 -
 sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist          | 1 +
 sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist    | 1 -
 sysdeps/unix/sysv/linux/x86_64/64/libc.abilist              | 1 +
 sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist        | 1 -
 sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist             | 1 +
 sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist       | 1 -
 62 files changed, 45 insertions(+), 36 deletions(-)

Comments

Florian Weimer March 13, 2020, 9:51 a.m. UTC | #1
* Adhemerval Zanella via Libc-alpha:

> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> index a4c31932cb..694efeb1e4 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> @@ -1447,6 +1447,7 @@ GLIBC_2.17 pthread_self F
>  GLIBC_2.17 pthread_setcancelstate F
>  GLIBC_2.17 pthread_setcanceltype F
>  GLIBC_2.17 pthread_setschedparam F
> +GLIBC_2.17 pthread_sigmask F
>  GLIBC_2.17 ptrace F
>  GLIBC_2.17 ptsname F
>  GLIBC_2.17 ptsname_r F
> diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
> index d65beba958..48b368acb1 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
> +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
> @@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F
>  GLIBC_2.17 pthread_setname_np F
>  GLIBC_2.17 pthread_setschedprio F
>  GLIBC_2.17 pthread_setspecific F
> -GLIBC_2.17 pthread_sigmask F
>  GLIBC_2.17 pthread_sigqueue F
>  GLIBC_2.17 pthread_spin_destroy F
>  GLIBC_2.17 pthread_spin_init F

This change is not fully compatible: Newly-linked programs may incur
lazy binding failures on older glibc versions because pthread_sigmask
is not present in libc.so.6.

In other cases, we have added a compat symbol and a new symbol
version.
Adhemerval Zanella March 13, 2020, 1:08 p.m. UTC | #2
On 13/03/2020 06:51, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
> 
>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>> index a4c31932cb..694efeb1e4 100644
>> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>> @@ -1447,6 +1447,7 @@ GLIBC_2.17 pthread_self F
>>  GLIBC_2.17 pthread_setcancelstate F
>>  GLIBC_2.17 pthread_setcanceltype F
>>  GLIBC_2.17 pthread_setschedparam F
>> +GLIBC_2.17 pthread_sigmask F
>>  GLIBC_2.17 ptrace F
>>  GLIBC_2.17 ptsname F
>>  GLIBC_2.17 ptsname_r F
>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>> index d65beba958..48b368acb1 100644
>> --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>> +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>> @@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F
>>  GLIBC_2.17 pthread_setname_np F
>>  GLIBC_2.17 pthread_setschedprio F
>>  GLIBC_2.17 pthread_setspecific F
>> -GLIBC_2.17 pthread_sigmask F
>>  GLIBC_2.17 pthread_sigqueue F
>>  GLIBC_2.17 pthread_spin_destroy F
>>  GLIBC_2.17 pthread_spin_init F
> 
> This change is not fully compatible: Newly-linked programs may incur
> lazy binding failures on older glibc versions because pthread_sigmask
> is not present in libc.so.6.

But backward compatibility is not a fully support scenario. Do we
really need to handle such cases for the libpthread removal
project?

> 
> In other cases, we have added a compat symbol and a new symbol
> version.
>
Florian Weimer March 13, 2020, 1:16 p.m. UTC | #3
* Adhemerval Zanella:

> On 13/03/2020 06:51, Florian Weimer wrote:
>> * Adhemerval Zanella via Libc-alpha:
>> 
>>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>> index a4c31932cb..694efeb1e4 100644
>>> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>> @@ -1447,6 +1447,7 @@ GLIBC_2.17 pthread_self F
>>>  GLIBC_2.17 pthread_setcancelstate F
>>>  GLIBC_2.17 pthread_setcanceltype F
>>>  GLIBC_2.17 pthread_setschedparam F
>>> +GLIBC_2.17 pthread_sigmask F
>>>  GLIBC_2.17 ptrace F
>>>  GLIBC_2.17 ptsname F
>>>  GLIBC_2.17 ptsname_r F
>>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>> index d65beba958..48b368acb1 100644
>>> --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>> +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>> @@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F
>>>  GLIBC_2.17 pthread_setname_np F
>>>  GLIBC_2.17 pthread_setschedprio F
>>>  GLIBC_2.17 pthread_setspecific F
>>> -GLIBC_2.17 pthread_sigmask F
>>>  GLIBC_2.17 pthread_sigqueue F
>>>  GLIBC_2.17 pthread_spin_destroy F
>>>  GLIBC_2.17 pthread_spin_init F
>> 
>> This change is not fully compatible: Newly-linked programs may incur
>> lazy binding failures on older glibc versions because pthread_sigmask
>> is not present in libc.so.6.
>
> But backward compatibility is not a fully support scenario. Do we
> really need to handle such cases for the libpthread removal
> project?

So far, our approach to symbol versioning has been that if the
application (or DSO) loads, it will not fail later due to a missing
symbol.  Some RPM-based distributions have no other mechanism to
ensure correct package dependencies.
Adhemerval Zanella March 13, 2020, 1:23 p.m. UTC | #4
On 13/03/2020 10:16, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> On 13/03/2020 06:51, Florian Weimer wrote:
>>> * Adhemerval Zanella via Libc-alpha:
>>>
>>>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>>> index a4c31932cb..694efeb1e4 100644
>>>> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>>> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>>> @@ -1447,6 +1447,7 @@ GLIBC_2.17 pthread_self F
>>>>  GLIBC_2.17 pthread_setcancelstate F
>>>>  GLIBC_2.17 pthread_setcanceltype F
>>>>  GLIBC_2.17 pthread_setschedparam F
>>>> +GLIBC_2.17 pthread_sigmask F
>>>>  GLIBC_2.17 ptrace F
>>>>  GLIBC_2.17 ptsname F
>>>>  GLIBC_2.17 ptsname_r F
>>>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>>> index d65beba958..48b368acb1 100644
>>>> --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>>> +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>>> @@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F
>>>>  GLIBC_2.17 pthread_setname_np F
>>>>  GLIBC_2.17 pthread_setschedprio F
>>>>  GLIBC_2.17 pthread_setspecific F
>>>> -GLIBC_2.17 pthread_sigmask F
>>>>  GLIBC_2.17 pthread_sigqueue F
>>>>  GLIBC_2.17 pthread_spin_destroy F
>>>>  GLIBC_2.17 pthread_spin_init F
>>>
>>> This change is not fully compatible: Newly-linked programs may incur
>>> lazy binding failures on older glibc versions because pthread_sigmask
>>> is not present in libc.so.6.
>>
>> But backward compatibility is not a fully support scenario. Do we
>> really need to handle such cases for the libpthread removal
>> project?
> 
> So far, our approach to symbol versioning has been that if the
> application (or DSO) loads, it will not fail later due to a missing
> symbol.  Some RPM-based distributions have no other mechanism to
> ensure correct package dependencies.

Yes, but my understanding was exactly that new loader behaviour
(f0b2132b3524) will prevent the failure for this specific case.
What I am getting is we are adding this constraint due a rpm
limitation, is that correct?
Florian Weimer March 13, 2020, 1:24 p.m. UTC | #5
* Adhemerval Zanella:

> On 13/03/2020 10:16, Florian Weimer wrote:
>> * Adhemerval Zanella:
>> 
>>> On 13/03/2020 06:51, Florian Weimer wrote:
>>>> * Adhemerval Zanella via Libc-alpha:
>>>>
>>>>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>>>> index a4c31932cb..694efeb1e4 100644
>>>>> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>>>> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>>>> @@ -1447,6 +1447,7 @@ GLIBC_2.17 pthread_self F
>>>>>  GLIBC_2.17 pthread_setcancelstate F
>>>>>  GLIBC_2.17 pthread_setcanceltype F
>>>>>  GLIBC_2.17 pthread_setschedparam F
>>>>> +GLIBC_2.17 pthread_sigmask F
>>>>>  GLIBC_2.17 ptrace F
>>>>>  GLIBC_2.17 ptsname F
>>>>>  GLIBC_2.17 ptsname_r F
>>>>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>>>> index d65beba958..48b368acb1 100644
>>>>> --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>>>> +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>>>> @@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F
>>>>>  GLIBC_2.17 pthread_setname_np F
>>>>>  GLIBC_2.17 pthread_setschedprio F
>>>>>  GLIBC_2.17 pthread_setspecific F
>>>>> -GLIBC_2.17 pthread_sigmask F
>>>>>  GLIBC_2.17 pthread_sigqueue F
>>>>>  GLIBC_2.17 pthread_spin_destroy F
>>>>>  GLIBC_2.17 pthread_spin_init F
>>>>
>>>> This change is not fully compatible: Newly-linked programs may incur
>>>> lazy binding failures on older glibc versions because pthread_sigmask
>>>> is not present in libc.so.6.
>>>
>>> But backward compatibility is not a fully support scenario. Do we
>>> really need to handle such cases for the libpthread removal
>>> project?
>> 
>> So far, our approach to symbol versioning has been that if the
>> application (or DSO) loads, it will not fail later due to a missing
>> symbol.  Some RPM-based distributions have no other mechanism to
>> ensure correct package dependencies.
>
> Yes, but my understanding was exactly that new loader behaviour
> (f0b2132b3524) will prevent the failure for this specific case.

No, the loader behavior change is for existing binaries linked against
an old libpthread.  It cannot handle new binaries which are not linked
against libpthread, but use pthread_sigmask.  These binaries will load
only if the process has loaded libpthread for another reason.
Adhemerval Zanella March 13, 2020, 1:37 p.m. UTC | #6
On 13/03/2020 10:24, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> On 13/03/2020 10:16, Florian Weimer wrote:
>>> * Adhemerval Zanella:
>>>
>>>> On 13/03/2020 06:51, Florian Weimer wrote:
>>>>> * Adhemerval Zanella via Libc-alpha:
>>>>>
>>>>>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>>>>> index a4c31932cb..694efeb1e4 100644
>>>>>> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>>>>> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>>>>>> @@ -1447,6 +1447,7 @@ GLIBC_2.17 pthread_self F
>>>>>>  GLIBC_2.17 pthread_setcancelstate F
>>>>>>  GLIBC_2.17 pthread_setcanceltype F
>>>>>>  GLIBC_2.17 pthread_setschedparam F
>>>>>> +GLIBC_2.17 pthread_sigmask F
>>>>>>  GLIBC_2.17 ptrace F
>>>>>>  GLIBC_2.17 ptsname F
>>>>>>  GLIBC_2.17 ptsname_r F
>>>>>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>>>>> index d65beba958..48b368acb1 100644
>>>>>> --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>>>>> +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>>>>>> @@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F
>>>>>>  GLIBC_2.17 pthread_setname_np F
>>>>>>  GLIBC_2.17 pthread_setschedprio F
>>>>>>  GLIBC_2.17 pthread_setspecific F
>>>>>> -GLIBC_2.17 pthread_sigmask F
>>>>>>  GLIBC_2.17 pthread_sigqueue F
>>>>>>  GLIBC_2.17 pthread_spin_destroy F
>>>>>>  GLIBC_2.17 pthread_spin_init F
>>>>>
>>>>> This change is not fully compatible: Newly-linked programs may incur
>>>>> lazy binding failures on older glibc versions because pthread_sigmask
>>>>> is not present in libc.so.6.
>>>>
>>>> But backward compatibility is not a fully support scenario. Do we
>>>> really need to handle such cases for the libpthread removal
>>>> project?
>>>
>>> So far, our approach to symbol versioning has been that if the
>>> application (or DSO) loads, it will not fail later due to a missing
>>> symbol.  Some RPM-based distributions have no other mechanism to
>>> ensure correct package dependencies.
>>
>> Yes, but my understanding was exactly that new loader behaviour
>> (f0b2132b3524) will prevent the failure for this specific case.
> 
> No, the loader behavior change is for existing binaries linked against
> an old libpthread.  It cannot handle new binaries which are not linked
> against libpthread, but use pthread_sigmask.  These binaries will load
> only if the process has loaded libpthread for another reason.
> 

That's not what I am seeing in fact. Based on my patchset, I changed
tst-sigisemptyset.c to call pthread_sigmask:

$ readelf -a signal/tst-sigisemptyset | grep "(NEEDED)"
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

$ LD_DEBUG=all ./elf/ld-linux-x86-64.so.2 --library-path .:./math:./elf:./dlfcn:./nss:./nis:./rt:./resolv:./mathvec:./support:./crypt:./nptl signal/tst-sigisemptyset --direct
[...]
     20190:     symbol=pthread_sigmask;  lookup in file=signal/tst-sigisemptyset [0]
     20190:     symbol=pthread_sigmask;  lookup in file=./libc.so.6 [0]
[...]

And checking with maps, libpthread was not loaded.

Off course, trying to use the system loader won't work:

$ signal/tst-sigisemptyset
signal/tst-sigisemptyset: relocation error: signal/tst-sigisemptyset: symbol pthread_sigmask version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference

But it is expected.  What I am missing here?
Florian Weimer March 13, 2020, 1:40 p.m. UTC | #7
* Adhemerval Zanella:

> That's not what I am seeing in fact. Based on my patchset, I changed
> tst-sigisemptyset.c to call pthread_sigmask:
>
> $ readelf -a signal/tst-sigisemptyset | grep "(NEEDED)"
>  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
>
> $ LD_DEBUG=all ./elf/ld-linux-x86-64.so.2 --library-path .:./math:./elf:./dlfcn:./nss:./nis:./rt:./resolv:./mathvec:./support:./crypt:./nptl signal/tst-sigisemptyset --direct
> [...]
>      20190:     symbol=pthread_sigmask;  lookup in file=signal/tst-sigisemptyset [0]
>      20190:     symbol=pthread_sigmask;  lookup in file=./libc.so.6 [0]
> [...]
>
> And checking with maps, libpthread was not loaded.
>
> Off course, trying to use the system loader won't work:
>
> $ signal/tst-sigisemptyset
> signal/tst-sigisemptyset: relocation error: signal/tst-sigisemptyset: symbol pthread_sigmask version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
>
> But it is expected.  What I am missing here?

Does the test executable use lazy binding?  Is this a load-time error
or a run-time error?

Of course, there will always be an error, but the question is whether
it is a load-time error or a failure later at run time.  Our position
so far has been that glibc symbol changes will not cause lazy binding
failures (something that once had significant value, but less so with
widespread BIND_NOW usage).
Adhemerval Zanella March 13, 2020, 2:01 p.m. UTC | #8
On 13/03/2020 10:40, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> That's not what I am seeing in fact. Based on my patchset, I changed
>> tst-sigisemptyset.c to call pthread_sigmask:
>>
>> $ readelf -a signal/tst-sigisemptyset | grep "(NEEDED)"
>>  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
>>
>> $ LD_DEBUG=all ./elf/ld-linux-x86-64.so.2 --library-path .:./math:./elf:./dlfcn:./nss:./nis:./rt:./resolv:./mathvec:./support:./crypt:./nptl signal/tst-sigisemptyset --direct
>> [...]
>>      20190:     symbol=pthread_sigmask;  lookup in file=signal/tst-sigisemptyset [0]
>>      20190:     symbol=pthread_sigmask;  lookup in file=./libc.so.6 [0]
>> [...]
>>
>> And checking with maps, libpthread was not loaded.
>>
>> Off course, trying to use the system loader won't work:
>>
>> $ signal/tst-sigisemptyset
>> signal/tst-sigisemptyset: relocation error: signal/tst-sigisemptyset: symbol pthread_sigmask version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
>>
>> But it is expected.  What I am missing here?
> 
> Does the test executable use lazy binding?  Is this a load-time error
> or a run-time error?

It is using lazy biding (I am building with a toolchain built with 
buildmanyglibcs.py and default since there is no out-of-tree patches
the default is lazy).

> 
> Of course, there will always be an error, but the question is whether
> it is a load-time error or a failure later at run time.  Our position
> so far has been that glibc symbol changes will not cause lazy binding
> failures (something that once had significant value, but less so with
> widespread BIND_NOW usage).
>

Ok, I will rework the patch to force a load-time failure in such cases.
Adhemerval Zanella March 13, 2020, 4:45 p.m. UTC | #9
On 13/03/2020 06:51, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
> 
>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>> index a4c31932cb..694efeb1e4 100644
>> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>> @@ -1447,6 +1447,7 @@ GLIBC_2.17 pthread_self F
>>  GLIBC_2.17 pthread_setcancelstate F
>>  GLIBC_2.17 pthread_setcanceltype F
>>  GLIBC_2.17 pthread_setschedparam F
>> +GLIBC_2.17 pthread_sigmask F
>>  GLIBC_2.17 ptrace F
>>  GLIBC_2.17 ptsname F
>>  GLIBC_2.17 ptsname_r F
>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>> index d65beba958..48b368acb1 100644
>> --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>> +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>> @@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F
>>  GLIBC_2.17 pthread_setname_np F
>>  GLIBC_2.17 pthread_setschedprio F
>>  GLIBC_2.17 pthread_setspecific F
>> -GLIBC_2.17 pthread_sigmask F
>>  GLIBC_2.17 pthread_sigqueue F
>>  GLIBC_2.17 pthread_spin_destroy F
>>  GLIBC_2.17 pthread_spin_init F
> 
> This change is not fully compatible: Newly-linked programs may incur
> lazy binding failures on older glibc versions because pthread_sigmask
> is not present in libc.so.6.
> 
> In other cases, we have added a compat symbol and a new symbol
> version.
> 

Updated patch below:

--

This is part of the libpthread removal project:

  <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html>

A new symbol is added on glibc and a compat one on libpthread
(to force loading failure instead of lazy binding one for newly
binaries with old loaders).

For ia64-linux-gnu, the sigblock was never exported from libphread.

Checked with a build against all affected ABIs.
---
 nptl/Makefile                                        |  3 ++-
 nptl/Versions                                        |  3 +++
 nptl/libpthread-compat.c                             |  6 ++++++
 nptl/pthreadP.h                                      |  2 ++
 nptl/pthread_sigmask.c                               | 12 ++++++++++--
 sysdeps/ia64/nptl/Makefile                           |  4 ++--
 sysdeps/unix/sysv/linux/aarch64/libc.abilist         |  1 +
 sysdeps/unix/sysv/linux/aarch64/libpthread.abilist   |  1 -
 sysdeps/unix/sysv/linux/alpha/Makefile               |  6 +++---
 sysdeps/unix/sysv/linux/alpha/libc.abilist           |  1 +
 sysdeps/unix/sysv/linux/alpha/libpthread.abilist     |  1 -
 sysdeps/unix/sysv/linux/arm/be/libc.abilist          |  1 +
 sysdeps/unix/sysv/linux/arm/be/libpthread.abilist    |  1 -
 sysdeps/unix/sysv/linux/arm/le/libc.abilist          |  1 +
 sysdeps/unix/sysv/linux/arm/le/libpthread.abilist    |  1 -
 sysdeps/unix/sysv/linux/csky/libc.abilist            |  1 +
 sysdeps/unix/sysv/linux/csky/libpthread.abilist      |  1 -
 sysdeps/unix/sysv/linux/hppa/libc.abilist            |  1 +
 sysdeps/unix/sysv/linux/hppa/libpthread.abilist      |  1 -
 sysdeps/unix/sysv/linux/i386/libc.abilist            |  1 +
 sysdeps/unix/sysv/linux/i386/libpthread.abilist      |  1 -
 sysdeps/unix/sysv/linux/ia64/libc.abilist            |  1 +
 sysdeps/unix/sysv/linux/ia64/libpthread.abilist      |  1 -
 sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c        |  3 +--
 sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist   |  1 +
 .../unix/sysv/linux/m68k/coldfire/libpthread.abilist |  1 -
 sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist     |  1 +
 .../unix/sysv/linux/m68k/m680x0/libpthread.abilist   |  1 -
 sysdeps/unix/sysv/linux/microblaze/be/libc.abilist   |  1 +
 .../unix/sysv/linux/microblaze/be/libpthread.abilist |  1 -
 sysdeps/unix/sysv/linux/microblaze/le/libc.abilist   |  1 +
 .../unix/sysv/linux/microblaze/le/libpthread.abilist |  1 -
 sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist |  1 +
 .../unix/sysv/linux/mips/mips32/libpthread.abilist   |  1 -
 .../unix/sysv/linux/mips/mips32/nofpu/libc.abilist   |  1 +
 .../unix/sysv/linux/mips/mips64/libpthread.abilist   |  1 -
 sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist |  1 +
 sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist |  1 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist           |  1 +
 sysdeps/unix/sysv/linux/nios2/libpthread.abilist     |  1 -
 .../sysv/linux/powerpc/powerpc32/fpu/libc.abilist    |  1 +
 .../sysv/linux/powerpc/powerpc32/libpthread.abilist  |  1 -
 .../sysv/linux/powerpc/powerpc64/be/libc.abilist     |  1 +
 .../linux/powerpc/powerpc64/be/libpthread.abilist    |  1 -
 .../sysv/linux/powerpc/powerpc64/le/libc.abilist     |  1 +
 .../linux/powerpc/powerpc64/le/libpthread.abilist    |  1 -
 sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist      |  1 +
 .../unix/sysv/linux/riscv/rv64/libpthread.abilist    |  1 -
 sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist    |  1 +
 .../unix/sysv/linux/s390/s390-32/libpthread.abilist  |  1 -
 sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist    |  1 +
 .../unix/sysv/linux/s390/s390-64/libpthread.abilist  |  1 -
 sysdeps/unix/sysv/linux/sh/be/libc.abilist           |  1 +
 sysdeps/unix/sysv/linux/sh/be/libpthread.abilist     |  1 -
 sysdeps/unix/sysv/linux/sh/le/libc.abilist           |  1 +
 sysdeps/unix/sysv/linux/sh/le/libpthread.abilist     |  1 -
 sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist   |  1 +
 .../unix/sysv/linux/sparc/sparc32/libpthread.abilist |  1 -
 sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist   |  1 +
 .../unix/sysv/linux/sparc/sparc64/libpthread.abilist |  1 -
 sysdeps/unix/sysv/linux/x86_64/64/libc.abilist       |  1 +
 sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist |  1 -
 sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist      |  1 +
 .../unix/sysv/linux/x86_64/x32/libpthread.abilist    |  1 -
 64 files changed, 58 insertions(+), 37 deletions(-)

diff --git a/nptl/Makefile b/nptl/Makefile
index e554a3898d..4816fa254e 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -59,6 +59,7 @@ routines = \
   pthread_getschedparam \
   pthread_self \
   pthread_setschedparam \
+  pthread_sigmask \
   register-atfork \
 
 shared-only-routines = forward
@@ -123,7 +124,7 @@ libpthread-routines = nptl-init nptlfreeres vars events version pt-interp \
 		      pthread_barrierattr_setpshared \
 		      pthread_key_create pthread_key_delete \
 		      pthread_getspecific pthread_setspecific \
-		      pthread_sigmask pthread_kill pthread_sigqueue \
+		      pthread_kill pthread_sigqueue \
 		      pthread_cancel pthread_testcancel \
 		      pthread_setcancelstate pthread_setcanceltype \
 		      pthread_once \
diff --git a/nptl/Versions b/nptl/Versions
index 543dddc4ee..5ce5731eea 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -32,6 +32,9 @@ libc {
   GLIBC_2.28 {
     thrd_current; thrd_equal; thrd_sleep; thrd_yield;
   }
+  GLIBC_2.32 {
+    pthread_sigmask;
+  }
   GLIBC_PRIVATE {
     __libc_alloca_cutoff;
     # Internal libc interface to libpthread
diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c
index 512b4c77c8..92c981c2d2 100644
--- a/nptl/libpthread-compat.c
+++ b/nptl/libpthread-compat.c
@@ -36,6 +36,12 @@ __libpthread_version_placeholder (void)
    version or later, the placeholder symbol is not needed because
    there are plenty of other symbols which populate those later
    versions.  */
+
+#if (SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1))
+compat_symbol_unique (libpthread,
+		      __libpthread_version_placeholder, GLIBC_2_0);
+#endif
+
 #if (SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2))
 compat_symbol_unique (libpthread,
 		      __libpthread_version_placeholder, GLIBC_2_1_2);
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 06fb0d74c5..edec8d0501 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -482,6 +482,8 @@ extern void __pthread_testcancel (void);
 extern int __pthread_clockjoin_ex (pthread_t, void **, clockid_t,
 				   const struct timespec *, bool)
   attribute_hidden;
+extern int __pthread_sigmask (int how, const sigset_t *newmask,
+			      sigset_t *oldmask);
 
 
 #if IS_IN (libpthread)
diff --git a/nptl/pthread_sigmask.c b/nptl/pthread_sigmask.c
index c7860e02a5..2c3ba8d59b 100644
--- a/nptl/pthread_sigmask.c
+++ b/nptl/pthread_sigmask.c
@@ -20,10 +20,10 @@
 #include <signal.h>
 #include <pthreadP.h>
 #include <sysdep.h>
-
+#include <shlib-compat.h>
 
 int
-pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask)
+__pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask)
 {
   sigset_t local_newmask;
 
@@ -47,3 +47,11 @@ pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask)
 	  ? INTERNAL_SYSCALL_ERRNO (result)
 	  : 0);
 }
+
+#if IS_IN(libc)
+weak_alias (__pthread_sigmask, pthread_sigmask)
+#elif IS_IN(libpthread)
+# if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_32)
+compat_symbol (libpthread, __pthread_sigmask, pthread_sigmask, GLIBC_2_0);
+# endif
+#endif
diff --git a/sysdeps/ia64/nptl/Makefile b/sysdeps/ia64/nptl/Makefile
index b7d87c37c8..d34cb27699 100644
--- a/sysdeps/ia64/nptl/Makefile
+++ b/sysdeps/ia64/nptl/Makefile
@@ -20,6 +20,6 @@ gen-as-const-headers += tcb-offsets.sym
 endif
 
 ifeq ($(subdir),nptl)
-libpthread-routines += sysdep sigblock sigprocmask
-libpthread-shared-only-routines += sysdep sigblock sigprocmask
+libpthread-routines += sysdep
+libpthread-shared-only-routines += sysdep
 endif
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index a4c31932cb..9e8fe054fc 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2145,3 +2145,4 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
index d65beba958..48b368acb1 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
@@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F
 GLIBC_2.17 pthread_setname_np F
 GLIBC_2.17 pthread_setschedprio F
 GLIBC_2.17 pthread_setspecific F
-GLIBC_2.17 pthread_sigmask F
 GLIBC_2.17 pthread_sigqueue F
 GLIBC_2.17 pthread_spin_destroy F
 GLIBC_2.17 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 2e132e474b..92484bbe65 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -31,9 +31,9 @@ libm-routines += multc3 divtc3
 endif   # math
 
 ifeq ($(subdir),nptl)
-# pull in __syscall_error routine, __sigprocmask, sigaction stubs.
-libpthread-routines += sysdep sigprocmask rt_sigaction
-libpthread-shared-only-routines += sysdep sigprocmask rt_sigaction
+# pull in __syscall_error routine, sigaction stubs.
+libpthread-routines += sysdep rt_sigaction
+libpthread-shared-only-routines += sysdep rt_sigaction
 endif
 
 ifeq ($(subdir),conform)
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index e7f2174ac2..a33d193bac 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2225,6 +2225,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
index ffd443422d..cfffc5f529 100644
--- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index b152c0e24a..c189d349d3 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -133,6 +133,7 @@ GLIBC_2.30 twalk_r F
 GLIBC_2.31 msgctl F
 GLIBC_2.31 semctl F
 GLIBC_2.31 shmctl F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
index 129c64b0a7..050e799de8 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
@@ -186,7 +186,6 @@ GLIBC_2.4 pthread_setcanceltype F
 GLIBC_2.4 pthread_setconcurrency F
 GLIBC_2.4 pthread_setschedprio F
 GLIBC_2.4 pthread_setspecific F
-GLIBC_2.4 pthread_sigmask F
 GLIBC_2.4 pthread_spin_destroy F
 GLIBC_2.4 pthread_spin_init F
 GLIBC_2.4 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index 9371927927..ccd7e0c4c6 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -130,6 +130,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
index 129c64b0a7..050e799de8 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
@@ -186,7 +186,6 @@ GLIBC_2.4 pthread_setcanceltype F
 GLIBC_2.4 pthread_setconcurrency F
 GLIBC_2.4 pthread_setschedprio F
 GLIBC_2.4 pthread_setspecific F
-GLIBC_2.4 pthread_sigmask F
 GLIBC_2.4 pthread_spin_destroy F
 GLIBC_2.4 pthread_spin_init F
 GLIBC_2.4 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 9b3cee65bb..952dcbfd5f 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2089,3 +2089,4 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
diff --git a/sysdeps/unix/sysv/linux/csky/libpthread.abilist b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
index 8b72528819..977905a839 100644
--- a/sysdeps/unix/sysv/linux/csky/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
@@ -166,7 +166,6 @@ GLIBC_2.29 pthread_setconcurrency F
 GLIBC_2.29 pthread_setname_np F
 GLIBC_2.29 pthread_setschedprio F
 GLIBC_2.29 pthread_setspecific F
-GLIBC_2.29 pthread_sigmask F
 GLIBC_2.29 pthread_sigqueue F
 GLIBC_2.29 pthread_spin_destroy F
 GLIBC_2.29 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index df6d96fbae..ae418b3625 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2046,6 +2046,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
index 84fa775d95..558d3f0dfd 100644
--- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
@@ -136,7 +136,6 @@ GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index fcb625b6bf..f6c117b84c 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2212,6 +2212,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
index 4727bd5d43..f13fdce3a8 100644
--- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index cb556c5998..f61a10337d 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -2078,6 +2078,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
index 3d947a66aa..0c96fc3ccb 100644
--- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
@@ -136,7 +136,6 @@ GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c b/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c
index 93d1d66dd0..d9ed942963 100644
--- a/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c
+++ b/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c
@@ -34,8 +34,7 @@ __libc_unwind_longjmp (sigjmp_buf env, int val)
 
   if (env[0].__mask_was_saved)
     /* Restore the saved signal mask.  */
-    (void) __sigprocmask (SIG_SETMASK, &env[0].__saved_mask,
-			  (sigset_t *) NULL);
+    __libc_signal_restore_set (&env[0].__saved_mask);
 
   /* Call the machine-dependent function to restore machine state.  */
   __sigstack_longjmp (env[0].__jmpbuf, val ?: 1);
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index 5e3cdea246..ce9480fc42 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -134,6 +134,7 @@ GLIBC_2.30 twalk_r F
 GLIBC_2.31 msgctl F
 GLIBC_2.31 semctl F
 GLIBC_2.31 shmctl F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0x98
 GLIBC_2.4 _IO_2_1_stdin_ D 0x98
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
index 129c64b0a7..050e799de8 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
@@ -186,7 +186,6 @@ GLIBC_2.4 pthread_setcanceltype F
 GLIBC_2.4 pthread_setconcurrency F
 GLIBC_2.4 pthread_setschedprio F
 GLIBC_2.4 pthread_setspecific F
-GLIBC_2.4 pthread_sigmask F
 GLIBC_2.4 pthread_spin_destroy F
 GLIBC_2.4 pthread_spin_init F
 GLIBC_2.4 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index ea5e7a41af..413b08dc26 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2158,6 +2158,7 @@ GLIBC_2.30 twalk_r F
 GLIBC_2.31 msgctl F
 GLIBC_2.31 semctl F
 GLIBC_2.31 shmctl F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
index 4727bd5d43..f13fdce3a8 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index ac55b0acd7..0d1a909723 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2140,3 +2140,4 @@ GLIBC_2.30 twalk_r F
 GLIBC_2.31 msgctl F
 GLIBC_2.31 semctl F
 GLIBC_2.31 shmctl F
+GLIBC_2.32 pthread_sigmask F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
index 78885c05cf..87bd3ad30e 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
@@ -158,7 +158,6 @@ GLIBC_2.18 pthread_setconcurrency F
 GLIBC_2.18 pthread_setname_np F
 GLIBC_2.18 pthread_setschedprio F
 GLIBC_2.18 pthread_setspecific F
-GLIBC_2.18 pthread_sigmask F
 GLIBC_2.18 pthread_sigqueue F
 GLIBC_2.18 pthread_spin_destroy F
 GLIBC_2.18 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index f7ced487f7..7d7ce21772 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2137,3 +2137,4 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
index 78885c05cf..87bd3ad30e 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
@@ -158,7 +158,6 @@ GLIBC_2.18 pthread_setconcurrency F
 GLIBC_2.18 pthread_setname_np F
 GLIBC_2.18 pthread_setschedprio F
 GLIBC_2.18 pthread_setspecific F
-GLIBC_2.18 pthread_sigmask F
 GLIBC_2.18 pthread_sigqueue F
 GLIBC_2.18 pthread_spin_destroy F
 GLIBC_2.18 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 06c2e64edd..8c726fbb80 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2129,6 +2129,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
index 62f7a3f349..474ed999b3 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index bdfd073b86..b7e976d023 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2127,6 +2127,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
index 62f7a3f349..474ed999b3 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 3d61d4974a..6b5e7f63f1 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2135,6 +2135,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index 675acca5db..e716f67c3f 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -2129,6 +2129,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index 7fec0c9670..790354df77 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2178,3 +2178,4 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
diff --git a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
index 45ebcf5a6c..fb9c4a178a 100644
--- a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
@@ -158,7 +158,6 @@ GLIBC_2.21 pthread_setconcurrency F
 GLIBC_2.21 pthread_setname_np F
 GLIBC_2.21 pthread_setschedprio F
 GLIBC_2.21 pthread_setspecific F
-GLIBC_2.21 pthread_sigmask F
 GLIBC_2.21 pthread_sigqueue F
 GLIBC_2.21 pthread_spin_destroy F
 GLIBC_2.21 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 1e8ff6f83e..5ece7c5b38 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2185,6 +2185,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
index 2f4ed55693..65a9ef573e 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 0c86217fc6..88f5abee8c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -2048,6 +2048,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
index f4d34b1c47..fe5bf9fd47 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
@@ -157,7 +157,6 @@ GLIBC_2.3 pthread_setcancelstate F
 GLIBC_2.3 pthread_setcanceltype F
 GLIBC_2.3 pthread_setconcurrency F
 GLIBC_2.3 pthread_setspecific F
-GLIBC_2.3 pthread_sigmask F
 GLIBC_2.3 pthread_spin_destroy F
 GLIBC_2.3 pthread_spin_init F
 GLIBC_2.3 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index 2229a1dcc0..223b604a8b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -2247,3 +2247,4 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
index d65beba958..48b368acb1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
@@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F
 GLIBC_2.17 pthread_setname_np F
 GLIBC_2.17 pthread_setschedprio F
 GLIBC_2.17 pthread_setspecific F
-GLIBC_2.17 pthread_sigmask F
 GLIBC_2.17 pthread_sigqueue F
 GLIBC_2.17 pthread_spin_destroy F
 GLIBC_2.17 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index 31010e6cf7..0435e198f8 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -2107,3 +2107,4 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
index 5610e51e10..44e3719991 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
@@ -155,7 +155,6 @@ GLIBC_2.27 pthread_setconcurrency F
 GLIBC_2.27 pthread_setname_np F
 GLIBC_2.27 pthread_setschedprio F
 GLIBC_2.27 pthread_setspecific F
-GLIBC_2.27 pthread_sigmask F
 GLIBC_2.27 pthread_sigqueue F
 GLIBC_2.27 pthread_spin_destroy F
 GLIBC_2.27 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 4feca641b0..2e103c6e56 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2183,6 +2183,7 @@ GLIBC_2.30 twalk_r F
 GLIBC_2.31 msgctl F
 GLIBC_2.31 semctl F
 GLIBC_2.31 shmctl F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
index 80ad434007..0b2913ba2b 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index efe588a072..ff584e3f5d 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -2084,6 +2084,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
index daef2b5cd5..8c71cdc48d 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
@@ -138,7 +138,6 @@ GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 6bfc2b7439..2b143bb610 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2053,6 +2053,7 @@ GLIBC_2.30 twalk_r F
 GLIBC_2.31 msgctl F
 GLIBC_2.31 semctl F
 GLIBC_2.31 shmctl F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist
index 84fa775d95..558d3f0dfd 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist
@@ -136,7 +136,6 @@ GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 4b057bf4a2..35c349b307 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2050,6 +2050,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist
index 84fa775d95..558d3f0dfd 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist
@@ -136,7 +136,6 @@ GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index 49cd597fd6..52ae4795ca 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2174,6 +2174,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
index ffd443422d..cfffc5f529 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
@@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 95e68e0ba1..35896a6a4f 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -2101,6 +2101,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
index 3d947a66aa..0c96fc3ccb 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
@@ -136,7 +136,6 @@ GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 1f2dbd1451..8c6002ddb0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -2059,6 +2059,7 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
index a6bc9f4a55..2888c3150b 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
@@ -137,7 +137,6 @@ GLIBC_2.2.5 pthread_setcancelstate F
 GLIBC_2.2.5 pthread_setcanceltype F
 GLIBC_2.2.5 pthread_setconcurrency F
 GLIBC_2.2.5 pthread_setspecific F
-GLIBC_2.2.5 pthread_sigmask F
 GLIBC_2.2.5 pthread_spin_destroy F
 GLIBC_2.2.5 pthread_spin_init F
 GLIBC_2.2.5 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index 59da85a5d8..a4c3289e3c 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2158,3 +2158,4 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 pthread_sigmask F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
index 17f6ec438f..5ac72e4515 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
@@ -156,7 +156,6 @@ GLIBC_2.16 pthread_setconcurrency F
 GLIBC_2.16 pthread_setname_np F
 GLIBC_2.16 pthread_setschedprio F
 GLIBC_2.16 pthread_setspecific F
-GLIBC_2.16 pthread_sigmask F
 GLIBC_2.16 pthread_sigqueue F
 GLIBC_2.16 pthread_spin_destroy F
 GLIBC_2.16 pthread_spin_init F
Florian Weimer March 13, 2020, 4:46 p.m. UTC | #10
* Adhemerval Zanella:

> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> index a4c31932cb..9e8fe054fc 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> @@ -2145,3 +2145,4 @@ GLIBC_2.30 getdents64 F
>  GLIBC_2.30 gettid F
>  GLIBC_2.30 tgkill F
>  GLIBC_2.30 twalk_r F
> +GLIBC_2.32 pthread_sigmask F
> diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
> index d65beba958..48b368acb1 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
> +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
> @@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F
>  GLIBC_2.17 pthread_setname_np F
>  GLIBC_2.17 pthread_setschedprio F
>  GLIBC_2.17 pthread_setspecific F
> -GLIBC_2.17 pthread_sigmask F
>  GLIBC_2.17 pthread_sigqueue F
>  GLIBC_2.17 pthread_spin_destroy F
>  GLIBC_2.17 pthread_spin_init F

Sorry, this change definitely breaks backwards compatibility.  You
need to add pthread_sigmask to libc as a compat symbol at the base
symbol version.
Adhemerval Zanella March 13, 2020, 4:50 p.m. UTC | #11
On 13/03/2020 13:46, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>> index a4c31932cb..9e8fe054fc 100644
>> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
>> @@ -2145,3 +2145,4 @@ GLIBC_2.30 getdents64 F
>>  GLIBC_2.30 gettid F
>>  GLIBC_2.30 tgkill F
>>  GLIBC_2.30 twalk_r F
>> +GLIBC_2.32 pthread_sigmask F
>> diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>> index d65beba958..48b368acb1 100644
>> --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>> +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
>> @@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F
>>  GLIBC_2.17 pthread_setname_np F
>>  GLIBC_2.17 pthread_setschedprio F
>>  GLIBC_2.17 pthread_setspecific F
>> -GLIBC_2.17 pthread_sigmask F
>>  GLIBC_2.17 pthread_sigqueue F
>>  GLIBC_2.17 pthread_spin_destroy F
>>  GLIBC_2.17 pthread_spin_init F
> 
> Sorry, this change definitely breaks backwards compatibility.  You
> need to add pthread_sigmask to libc as a compat symbol at the base
> symbol version.

Sigh, you are right. I will send an updated version.
diff mbox series

Patch

diff --git a/nptl/Makefile b/nptl/Makefile
index e554a3898d..4816fa254e 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -59,6 +59,7 @@  routines = \
   pthread_getschedparam \
   pthread_self \
   pthread_setschedparam \
+  pthread_sigmask \
   register-atfork \
 
 shared-only-routines = forward
@@ -123,7 +124,7 @@  libpthread-routines = nptl-init nptlfreeres vars events version pt-interp \
 		      pthread_barrierattr_setpshared \
 		      pthread_key_create pthread_key_delete \
 		      pthread_getspecific pthread_setspecific \
-		      pthread_sigmask pthread_kill pthread_sigqueue \
+		      pthread_kill pthread_sigqueue \
 		      pthread_cancel pthread_testcancel \
 		      pthread_setcancelstate pthread_setcanceltype \
 		      pthread_once \
diff --git a/nptl/Versions b/nptl/Versions
index 543dddc4ee..145ee37d54 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -16,6 +16,7 @@  libc {
     pthread_mutex_lock; pthread_mutex_unlock;
     pthread_self;
     pthread_setcancelstate; pthread_setcanceltype;
+    pthread_sigmask;
   }
   GLIBC_2.1 {
     pthread_attr_init;
@@ -60,7 +61,7 @@  libpthread {
     pthread_cancel; pthread_testcancel;
     pthread_setcancelstate; pthread_setcanceltype;
 
-    pthread_sigmask; pthread_kill;
+    pthread_kill;
 
     pthread_key_create; pthread_key_delete;
     pthread_getspecific; pthread_setspecific;
diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c
index 512b4c77c8..92c981c2d2 100644
--- a/nptl/libpthread-compat.c
+++ b/nptl/libpthread-compat.c
@@ -36,6 +36,12 @@  __libpthread_version_placeholder (void)
    version or later, the placeholder symbol is not needed because
    there are plenty of other symbols which populate those later
    versions.  */
+
+#if (SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1))
+compat_symbol_unique (libpthread,
+		      __libpthread_version_placeholder, GLIBC_2_0);
+#endif
+
 #if (SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2))
 compat_symbol_unique (libpthread,
 		      __libpthread_version_placeholder, GLIBC_2_1_2);
diff --git a/sysdeps/ia64/nptl/Makefile b/sysdeps/ia64/nptl/Makefile
index b7d87c37c8..d34cb27699 100644
--- a/sysdeps/ia64/nptl/Makefile
+++ b/sysdeps/ia64/nptl/Makefile
@@ -20,6 +20,6 @@  gen-as-const-headers += tcb-offsets.sym
 endif
 
 ifeq ($(subdir),nptl)
-libpthread-routines += sysdep sigblock sigprocmask
-libpthread-shared-only-routines += sysdep sigblock sigprocmask
+libpthread-routines += sysdep
+libpthread-shared-only-routines += sysdep
 endif
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index a4c31932cb..694efeb1e4 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -1447,6 +1447,7 @@  GLIBC_2.17 pthread_self F
 GLIBC_2.17 pthread_setcancelstate F
 GLIBC_2.17 pthread_setcanceltype F
 GLIBC_2.17 pthread_setschedparam F
+GLIBC_2.17 pthread_sigmask F
 GLIBC_2.17 ptrace F
 GLIBC_2.17 ptsname F
 GLIBC_2.17 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
index d65beba958..48b368acb1 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
@@ -156,7 +156,6 @@  GLIBC_2.17 pthread_setconcurrency F
 GLIBC_2.17 pthread_setname_np F
 GLIBC_2.17 pthread_setschedprio F
 GLIBC_2.17 pthread_setspecific F
-GLIBC_2.17 pthread_sigmask F
 GLIBC_2.17 pthread_sigqueue F
 GLIBC_2.17 pthread_spin_destroy F
 GLIBC_2.17 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 2e132e474b..92484bbe65 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -31,9 +31,9 @@  libm-routines += multc3 divtc3
 endif   # math
 
 ifeq ($(subdir),nptl)
-# pull in __syscall_error routine, __sigprocmask, sigaction stubs.
-libpthread-routines += sysdep sigprocmask rt_sigaction
-libpthread-shared-only-routines += sysdep sigprocmask rt_sigaction
+# pull in __syscall_error routine, sigaction stubs.
+libpthread-routines += sysdep rt_sigaction
+libpthread-shared-only-routines += sysdep rt_sigaction
 endif
 
 ifeq ($(subdir),conform)
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index e7f2174ac2..f9f5465cc1 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -891,6 +891,7 @@  GLIBC_2.0 pthread_self F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setschedparam F
+GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 ptrace F
 GLIBC_2.0 putc F
 GLIBC_2.0 putc_unlocked F
diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
index ffd443422d..cfffc5f529 100644
--- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
@@ -71,7 +71,6 @@  GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index b152c0e24a..3ed7184464 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -1517,6 +1517,7 @@  GLIBC_2.4 pthread_self F
 GLIBC_2.4 pthread_setcancelstate F
 GLIBC_2.4 pthread_setcanceltype F
 GLIBC_2.4 pthread_setschedparam F
+GLIBC_2.4 pthread_sigmask F
 GLIBC_2.4 ptrace F
 GLIBC_2.4 ptsname F
 GLIBC_2.4 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
index 129c64b0a7..050e799de8 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
@@ -186,7 +186,6 @@  GLIBC_2.4 pthread_setcanceltype F
 GLIBC_2.4 pthread_setconcurrency F
 GLIBC_2.4 pthread_setschedprio F
 GLIBC_2.4 pthread_setspecific F
-GLIBC_2.4 pthread_sigmask F
 GLIBC_2.4 pthread_spin_destroy F
 GLIBC_2.4 pthread_spin_init F
 GLIBC_2.4 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index 9371927927..dcfa2227b2 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -1514,6 +1514,7 @@  GLIBC_2.4 pthread_self F
 GLIBC_2.4 pthread_setcancelstate F
 GLIBC_2.4 pthread_setcanceltype F
 GLIBC_2.4 pthread_setschedparam F
+GLIBC_2.4 pthread_sigmask F
 GLIBC_2.4 ptrace F
 GLIBC_2.4 ptsname F
 GLIBC_2.4 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
index 129c64b0a7..050e799de8 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
@@ -186,7 +186,6 @@  GLIBC_2.4 pthread_setcanceltype F
 GLIBC_2.4 pthread_setconcurrency F
 GLIBC_2.4 pthread_setschedprio F
 GLIBC_2.4 pthread_setspecific F
-GLIBC_2.4 pthread_sigmask F
 GLIBC_2.4 pthread_spin_destroy F
 GLIBC_2.4 pthread_spin_init F
 GLIBC_2.4 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 9b3cee65bb..b1a924bd07 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -1435,6 +1435,7 @@  GLIBC_2.29 pthread_self F
 GLIBC_2.29 pthread_setcancelstate F
 GLIBC_2.29 pthread_setcanceltype F
 GLIBC_2.29 pthread_setschedparam F
+GLIBC_2.29 pthread_sigmask F
 GLIBC_2.29 ptrace F
 GLIBC_2.29 ptsname F
 GLIBC_2.29 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/csky/libpthread.abilist b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
index 8b72528819..977905a839 100644
--- a/sysdeps/unix/sysv/linux/csky/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
@@ -166,7 +166,6 @@  GLIBC_2.29 pthread_setconcurrency F
 GLIBC_2.29 pthread_setname_np F
 GLIBC_2.29 pthread_setschedprio F
 GLIBC_2.29 pthread_setspecific F
-GLIBC_2.29 pthread_sigmask F
 GLIBC_2.29 pthread_sigqueue F
 GLIBC_2.29 pthread_spin_destroy F
 GLIBC_2.29 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index df6d96fbae..0812c5606b 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -1274,6 +1274,7 @@  GLIBC_2.2 pthread_self F
 GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setschedparam F
+GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 ptrace F
 GLIBC_2.2 ptsname F
 GLIBC_2.2 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
index 84fa775d95..558d3f0dfd 100644
--- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
@@ -136,7 +136,6 @@  GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index fcb625b6bf..661a647f06 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -868,6 +868,7 @@  GLIBC_2.0 pthread_self F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setschedparam F
+GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 ptrace F
 GLIBC_2.0 putc F
 GLIBC_2.0 putc_unlocked F
diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
index 4727bd5d43..f13fdce3a8 100644
--- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
@@ -71,7 +71,6 @@  GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index cb556c5998..d05204d5a2 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -1295,6 +1295,7 @@  GLIBC_2.2 pthread_self F
 GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setschedparam F
+GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 ptrace F
 GLIBC_2.2 ptsname F
 GLIBC_2.2 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
index 3d947a66aa..0c96fc3ccb 100644
--- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
@@ -136,7 +136,6 @@  GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c b/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c
index 93d1d66dd0..d9ed942963 100644
--- a/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c
+++ b/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c
@@ -34,8 +34,7 @@  __libc_unwind_longjmp (sigjmp_buf env, int val)
 
   if (env[0].__mask_was_saved)
     /* Restore the saved signal mask.  */
-    (void) __sigprocmask (SIG_SETMASK, &env[0].__saved_mask,
-			  (sigset_t *) NULL);
+    __libc_signal_restore_set (&env[0].__saved_mask);
 
   /* Call the machine-dependent function to restore machine state.  */
   __sigstack_longjmp (env[0].__jmpbuf, val ?: 1);
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index 5e3cdea246..1ea3f2c4e0 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -1497,6 +1497,7 @@  GLIBC_2.4 pthread_self F
 GLIBC_2.4 pthread_setcancelstate F
 GLIBC_2.4 pthread_setcanceltype F
 GLIBC_2.4 pthread_setschedparam F
+GLIBC_2.4 pthread_sigmask F
 GLIBC_2.4 ptrace F
 GLIBC_2.4 ptsname F
 GLIBC_2.4 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
index 129c64b0a7..050e799de8 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
@@ -186,7 +186,6 @@  GLIBC_2.4 pthread_setcanceltype F
 GLIBC_2.4 pthread_setconcurrency F
 GLIBC_2.4 pthread_setschedprio F
 GLIBC_2.4 pthread_setspecific F
-GLIBC_2.4 pthread_sigmask F
 GLIBC_2.4 pthread_spin_destroy F
 GLIBC_2.4 pthread_spin_init F
 GLIBC_2.4 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index ea5e7a41af..b0dd9f0b1a 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -867,6 +867,7 @@  GLIBC_2.0 pthread_self F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setschedparam F
+GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 ptrace F
 GLIBC_2.0 putc F
 GLIBC_2.0 putc_unlocked F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
index 4727bd5d43..f13fdce3a8 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
@@ -71,7 +71,6 @@  GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index ac55b0acd7..f51badd76b 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -1450,6 +1450,7 @@  GLIBC_2.18 pthread_self F
 GLIBC_2.18 pthread_setcancelstate F
 GLIBC_2.18 pthread_setcanceltype F
 GLIBC_2.18 pthread_setschedparam F
+GLIBC_2.18 pthread_sigmask F
 GLIBC_2.18 ptrace F
 GLIBC_2.18 ptsname F
 GLIBC_2.18 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
index 78885c05cf..87bd3ad30e 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
@@ -158,7 +158,6 @@  GLIBC_2.18 pthread_setconcurrency F
 GLIBC_2.18 pthread_setname_np F
 GLIBC_2.18 pthread_setschedprio F
 GLIBC_2.18 pthread_setspecific F
-GLIBC_2.18 pthread_sigmask F
 GLIBC_2.18 pthread_sigqueue F
 GLIBC_2.18 pthread_spin_destroy F
 GLIBC_2.18 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index f7ced487f7..3436dcac24 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -1450,6 +1450,7 @@  GLIBC_2.18 pthread_self F
 GLIBC_2.18 pthread_setcancelstate F
 GLIBC_2.18 pthread_setcanceltype F
 GLIBC_2.18 pthread_setschedparam F
+GLIBC_2.18 pthread_sigmask F
 GLIBC_2.18 ptrace F
 GLIBC_2.18 ptsname F
 GLIBC_2.18 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
index 78885c05cf..87bd3ad30e 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
@@ -158,7 +158,6 @@  GLIBC_2.18 pthread_setconcurrency F
 GLIBC_2.18 pthread_setname_np F
 GLIBC_2.18 pthread_setschedprio F
 GLIBC_2.18 pthread_setspecific F
-GLIBC_2.18 pthread_sigmask F
 GLIBC_2.18 pthread_sigqueue F
 GLIBC_2.18 pthread_spin_destroy F
 GLIBC_2.18 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 06c2e64edd..5d442b5ea0 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -864,6 +864,7 @@  GLIBC_2.0 pthread_self F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setschedparam F
+GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 ptrace F
 GLIBC_2.0 putc F
 GLIBC_2.0 putc_unlocked F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
index 62f7a3f349..474ed999b3 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
@@ -71,7 +71,6 @@  GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index bdfd073b86..33ca075b39 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -864,6 +864,7 @@  GLIBC_2.0 pthread_self F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setschedparam F
+GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 ptrace F
 GLIBC_2.0 putc F
 GLIBC_2.0 putc_unlocked F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
index 62f7a3f349..474ed999b3 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
@@ -71,7 +71,6 @@  GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 3d61d4974a..858fa545ef 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -864,6 +864,7 @@  GLIBC_2.0 pthread_self F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setschedparam F
+GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 ptrace F
 GLIBC_2.0 putc F
 GLIBC_2.0 putc_unlocked F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index 675acca5db..5468e89138 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -862,6 +862,7 @@  GLIBC_2.0 pthread_self F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setschedparam F
+GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 ptrace F
 GLIBC_2.0 putc F
 GLIBC_2.0 putc_unlocked F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index 7fec0c9670..d4c4e03f9c 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -1492,6 +1492,7 @@  GLIBC_2.21 pthread_self F
 GLIBC_2.21 pthread_setcancelstate F
 GLIBC_2.21 pthread_setcanceltype F
 GLIBC_2.21 pthread_setschedparam F
+GLIBC_2.21 pthread_sigmask F
 GLIBC_2.21 ptrace F
 GLIBC_2.21 ptsname F
 GLIBC_2.21 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
index 45ebcf5a6c..fb9c4a178a 100644
--- a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
@@ -158,7 +158,6 @@  GLIBC_2.21 pthread_setconcurrency F
 GLIBC_2.21 pthread_setname_np F
 GLIBC_2.21 pthread_setschedprio F
 GLIBC_2.21 pthread_setspecific F
-GLIBC_2.21 pthread_sigmask F
 GLIBC_2.21 pthread_sigqueue F
 GLIBC_2.21 pthread_spin_destroy F
 GLIBC_2.21 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 1e8ff6f83e..a1bee424d6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -875,6 +875,7 @@  GLIBC_2.0 pthread_self F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setschedparam F
+GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 ptrace F
 GLIBC_2.0 putc F
 GLIBC_2.0 putc_unlocked F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
index 2f4ed55693..65a9ef573e 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
@@ -71,7 +71,6 @@  GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 0c86217fc6..f4de9af6d6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -1380,6 +1380,7 @@  GLIBC_2.3 pthread_self F
 GLIBC_2.3 pthread_setcancelstate F
 GLIBC_2.3 pthread_setcanceltype F
 GLIBC_2.3 pthread_setschedparam F
+GLIBC_2.3 pthread_sigmask F
 GLIBC_2.3 ptrace F
 GLIBC_2.3 ptsname F
 GLIBC_2.3 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
index f4d34b1c47..fe5bf9fd47 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
@@ -157,7 +157,6 @@  GLIBC_2.3 pthread_setcancelstate F
 GLIBC_2.3 pthread_setcanceltype F
 GLIBC_2.3 pthread_setconcurrency F
 GLIBC_2.3 pthread_setspecific F
-GLIBC_2.3 pthread_sigmask F
 GLIBC_2.3 pthread_spin_destroy F
 GLIBC_2.3 pthread_spin_init F
 GLIBC_2.3 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index 2229a1dcc0..9c1ed64483 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -1536,6 +1536,7 @@  GLIBC_2.17 pthread_self F
 GLIBC_2.17 pthread_setcancelstate F
 GLIBC_2.17 pthread_setcanceltype F
 GLIBC_2.17 pthread_setschedparam F
+GLIBC_2.17 pthread_sigmask F
 GLIBC_2.17 ptrace F
 GLIBC_2.17 ptsname F
 GLIBC_2.17 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
index d65beba958..48b368acb1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
@@ -156,7 +156,6 @@  GLIBC_2.17 pthread_setconcurrency F
 GLIBC_2.17 pthread_setname_np F
 GLIBC_2.17 pthread_setschedprio F
 GLIBC_2.17 pthread_setspecific F
-GLIBC_2.17 pthread_sigmask F
 GLIBC_2.17 pthread_sigqueue F
 GLIBC_2.17 pthread_spin_destroy F
 GLIBC_2.17 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index 31010e6cf7..e2e0861cb2 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -1438,6 +1438,7 @@  GLIBC_2.27 pthread_self F
 GLIBC_2.27 pthread_setcancelstate F
 GLIBC_2.27 pthread_setcanceltype F
 GLIBC_2.27 pthread_setschedparam F
+GLIBC_2.27 pthread_sigmask F
 GLIBC_2.27 ptrace F
 GLIBC_2.27 ptsname F
 GLIBC_2.27 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
index 5610e51e10..44e3719991 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
@@ -155,7 +155,6 @@  GLIBC_2.27 pthread_setconcurrency F
 GLIBC_2.27 pthread_setname_np F
 GLIBC_2.27 pthread_setschedprio F
 GLIBC_2.27 pthread_setspecific F
-GLIBC_2.27 pthread_sigmask F
 GLIBC_2.27 pthread_sigqueue F
 GLIBC_2.27 pthread_spin_destroy F
 GLIBC_2.27 pthread_spin_init F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 4feca641b0..e45a5af0bc 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -866,6 +866,7 @@  GLIBC_2.0 pthread_self F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setschedparam F
+GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 ptrace F
 GLIBC_2.0 putc F
 GLIBC_2.0 putc_unlocked F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
index 80ad434007..0b2913ba2b 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
@@ -71,7 +71,6 @@  GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index efe588a072..b357b9bce8 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -1292,6 +1292,7 @@  GLIBC_2.2 pthread_self F
 GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setschedparam F
+GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 ptrace F
 GLIBC_2.2 ptsname F
 GLIBC_2.2 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
index daef2b5cd5..8c71cdc48d 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
@@ -138,7 +138,6 @@  GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 6bfc2b7439..f5cffdd0fc 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -1278,6 +1278,7 @@  GLIBC_2.2 pthread_self F
 GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setschedparam F
+GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 ptrace F
 GLIBC_2.2 ptsname F
 GLIBC_2.2 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist
index 84fa775d95..558d3f0dfd 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist
@@ -136,7 +136,6 @@  GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 4b057bf4a2..5ecd1fd1d7 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -1278,6 +1278,7 @@  GLIBC_2.2 pthread_self F
 GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setschedparam F
+GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 ptrace F
 GLIBC_2.2 ptsname F
 GLIBC_2.2 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist
index 84fa775d95..558d3f0dfd 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist
@@ -136,7 +136,6 @@  GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index 49cd597fd6..40c0f002ff 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -869,6 +869,7 @@  GLIBC_2.0 pthread_self F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setschedparam F
+GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 ptrace F
 GLIBC_2.0 putc F
 GLIBC_2.0 putc_unlocked F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
index ffd443422d..cfffc5f529 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
@@ -71,7 +71,6 @@  GLIBC_2.0 pthread_once F
 GLIBC_2.0 pthread_setcancelstate F
 GLIBC_2.0 pthread_setcanceltype F
 GLIBC_2.0 pthread_setspecific F
-GLIBC_2.0 pthread_sigmask F
 GLIBC_2.0 pthread_testcancel F
 GLIBC_2.0 raise F
 GLIBC_2.0 read F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 95e68e0ba1..5195921a50 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -1321,6 +1321,7 @@  GLIBC_2.2 pthread_self F
 GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setschedparam F
+GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 ptrace F
 GLIBC_2.2 ptsname F
 GLIBC_2.2 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
index 3d947a66aa..0c96fc3ccb 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
@@ -136,7 +136,6 @@  GLIBC_2.2 pthread_setcancelstate F
 GLIBC_2.2 pthread_setcanceltype F
 GLIBC_2.2 pthread_setconcurrency F
 GLIBC_2.2 pthread_setspecific F
-GLIBC_2.2 pthread_sigmask F
 GLIBC_2.2 pthread_spin_destroy F
 GLIBC_2.2 pthread_spin_init F
 GLIBC_2.2 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 1f2dbd1451..f17500e13a 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -1288,6 +1288,7 @@  GLIBC_2.2.5 pthread_self F
 GLIBC_2.2.5 pthread_setcancelstate F
 GLIBC_2.2.5 pthread_setcanceltype F
 GLIBC_2.2.5 pthread_setschedparam F
+GLIBC_2.2.5 pthread_sigmask F
 GLIBC_2.2.5 ptrace F
 GLIBC_2.2.5 ptsname F
 GLIBC_2.2.5 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
index a6bc9f4a55..2888c3150b 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
@@ -137,7 +137,6 @@  GLIBC_2.2.5 pthread_setcancelstate F
 GLIBC_2.2.5 pthread_setcanceltype F
 GLIBC_2.2.5 pthread_setconcurrency F
 GLIBC_2.2.5 pthread_setspecific F
-GLIBC_2.2.5 pthread_sigmask F
 GLIBC_2.2.5 pthread_spin_destroy F
 GLIBC_2.2.5 pthread_spin_init F
 GLIBC_2.2.5 pthread_spin_lock F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index 59da85a5d8..6a98f8e7ea 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -1455,6 +1455,7 @@  GLIBC_2.16 pthread_self F
 GLIBC_2.16 pthread_setcancelstate F
 GLIBC_2.16 pthread_setcanceltype F
 GLIBC_2.16 pthread_setschedparam F
+GLIBC_2.16 pthread_sigmask F
 GLIBC_2.16 ptrace F
 GLIBC_2.16 ptsname F
 GLIBC_2.16 ptsname_r F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
index 17f6ec438f..5ac72e4515 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
@@ -156,7 +156,6 @@  GLIBC_2.16 pthread_setconcurrency F
 GLIBC_2.16 pthread_setname_np F
 GLIBC_2.16 pthread_setschedprio F
 GLIBC_2.16 pthread_setspecific F
-GLIBC_2.16 pthread_sigmask F
 GLIBC_2.16 pthread_sigqueue F
 GLIBC_2.16 pthread_spin_destroy F
 GLIBC_2.16 pthread_spin_init F