NEWS: Deprecate weak libpthread symbols for single-threaded checks

Message ID 875zad7yrc.fsf@oldenburg2.str.redhat.com
State New
Headers show
Series
  • NEWS: Deprecate weak libpthread symbols for single-threaded checks
Related show

Commit Message

Alistair Francis via Libc-alpha July 24, 2020, 2:50 p.m.
Recommend the new __libc_single_thread variable instead.

---
 NEWS | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Alistair Francis via Libc-alpha July 24, 2020, 4:36 p.m. | #1
On 24/07/2020 11:50, Florian Weimer via Libc-alpha wrote:
> Recommend the new __libc_single_thread variable instead.

> 

> ---

>  NEWS | 8 ++++++++

>  1 file changed, 8 insertions(+)

> 

> diff --git a/NEWS b/NEWS

> index 83aed60e19..7fb167e650 100644

> --- a/NEWS

> +++ b/NEWS

> @@ -134,6 +134,14 @@ Deprecated and removed features, and other changes affecting compatibility:

>    or contents might be overwritten on subsequent calls in the same thread or

>    if the thread is terminated.  It makes strerror MT-safe.

>  

> +* Using weak references to libpthread functions such as pthread_create

> +  or pthread_key_create to detect the singled-threaded nature of a

> +  program is an obsolescent feature.  Future versions of glibc will

> +  define pthread_create within libc.so.6 itself, so such checks will

> +  always flag the program as multi-threaded.  Applications should check

> +  the __libc_single_threaded variable declared in

> +  <sys/single_threaded.h> instead.

> +

>  * The "files" NSS module no longer supports the "key" database (used for

>    secure RPC).  The contents of the /etc/publickey file will be ignored,

>    regardless of the settings in /etc/nsswitch.conf.  (This method of

> 


Should we add it on the 'Major features' instead along with the single-threaded
entry?
Alistair Francis via Libc-alpha July 24, 2020, 8:40 p.m. | #2
On 7/24/20 12:36 PM, Adhemerval Zanella via Libc-alpha wrote:
> 

> 

> On 24/07/2020 11:50, Florian Weimer via Libc-alpha wrote:

>> Recommend the new __libc_single_thread variable instead.

>>

>> ---

>>  NEWS | 8 ++++++++

>>  1 file changed, 8 insertions(+)

>>

>> diff --git a/NEWS b/NEWS

>> index 83aed60e19..7fb167e650 100644

>> --- a/NEWS

>> +++ b/NEWS

>> @@ -134,6 +134,14 @@ Deprecated and removed features, and other changes affecting compatibility:

>>    or contents might be overwritten on subsequent calls in the same thread or

>>    if the thread is terminated.  It makes strerror MT-safe.

>>  

>> +* Using weak references to libpthread functions such as pthread_create

>> +  or pthread_key_create to detect the singled-threaded nature of a

>> +  program is an obsolescent feature.  Future versions of glibc will

>> +  define pthread_create within libc.so.6 itself, so such checks will

>> +  always flag the program as multi-threaded.  Applications should check

>> +  the __libc_single_threaded variable declared in

>> +  <sys/single_threaded.h> instead.

>> +

>>  * The "files" NSS module no longer supports the "key" database (used for

>>    secure RPC).  The contents of the /etc/publickey file will be ignored,

>>    regardless of the settings in /etc/nsswitch.conf.  (This method of

>>

> 

> Should we add it on the 'Major features' instead along with the single-threaded

> entry?


No, it's good to call it out in the deprecated features. People might only
be looking at one or the other so we should have an entry in both.


-- 
Cheers,
Carlos.
Alistair Francis via Libc-alpha July 24, 2020, 8:40 p.m. | #3
On 7/24/20 10:50 AM, Florian Weimer via Libc-alpha wrote:
> Recommend the new __libc_single_thread variable instead.

> 

> ---

>  NEWS | 8 ++++++++

>  1 file changed, 8 insertions(+)

> 

> diff --git a/NEWS b/NEWS

> index 83aed60e19..7fb167e650 100644

> --- a/NEWS

> +++ b/NEWS

> @@ -134,6 +134,14 @@ Deprecated and removed features, and other changes affecting compatibility:

>    or contents might be overwritten on subsequent calls in the same thread or

>    if the thread is terminated.  It makes strerror MT-safe.

>  

> +* Using weak references to libpthread functions such as pthread_create

> +  or pthread_key_create to detect the singled-threaded nature of a

> +  program is an obsolescent feature.  Future versions of glibc will

> +  define pthread_create within libc.so.6 itself, so such checks will

> +  always flag the program as multi-threaded.  Applications should check

> +  the __libc_single_threaded variable declared in

> +  <sys/single_threaded.h> instead.

> +

>  * The "files" NSS module no longer supports the "key" database (used for

>    secure RPC).  The contents of the /etc/publickey file will be ignored,

>    regardless of the settings in /etc/nsswitch.conf.  (This method of

> 


OK for 2.32.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>


-- 
Cheers,
Carlos.

Patch

diff --git a/NEWS b/NEWS
index 83aed60e19..7fb167e650 100644
--- a/NEWS
+++ b/NEWS
@@ -134,6 +134,14 @@  Deprecated and removed features, and other changes affecting compatibility:
   or contents might be overwritten on subsequent calls in the same thread or
   if the thread is terminated.  It makes strerror MT-safe.
 
+* Using weak references to libpthread functions such as pthread_create
+  or pthread_key_create to detect the singled-threaded nature of a
+  program is an obsolescent feature.  Future versions of glibc will
+  define pthread_create within libc.so.6 itself, so such checks will
+  always flag the program as multi-threaded.  Applications should check
+  the __libc_single_threaded variable declared in
+  <sys/single_threaded.h> instead.
+
 * The "files" NSS module no longer supports the "key" database (used for
   secure RPC).  The contents of the /etc/publickey file will be ignored,
   regardless of the settings in /etc/nsswitch.conf.  (This method of