From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 420C2385482C for ; Tue, 16 Mar 2021 10:12:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 420C2385482C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-417-LKhi5sr6PMaFiICbwI9NKQ-1; Tue, 16 Mar 2021 06:12:21 -0400 X-MC-Unique: LKhi5sr6PMaFiICbwI9NKQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E8E8F100C66F for ; Tue, 16 Mar 2021 10:12:20 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-163.ams2.redhat.com [10.36.112.163]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4BB3D669F2 for ; Tue, 16 Mar 2021 10:12:20 +0000 (UTC) From: Florian Weimer To: libc-stable@sourceware.org Subject: [PATCH COMMITTED 2.33] nptl: Remove private futex optimization [BZ #27304] Date: Tue, 16 Mar 2021 11:12:28 +0100 Message-ID: <87y2enpfub.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLACK autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2021 10:12:28 -0000 It is effectively used, unexcept for pthread_cond_destroy, where we do not want it; see bug 27304. The internal locks do not support a process-shared mode. This fixes commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl: Move pthread_cond_destroy implementation into libc"). Reviewed-by: Adhemerval Zanella (cherry picked from commit c4ad832276f4dadfa40904109b26a521468f66bc) --- NEWS | 1 + sysdeps/nptl/lowlevellock-futex.h | 14 +------------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 94466f43a5..62612237f8 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,7 @@ The following bugs are resolved with this release: [18435] pthread_once hangs when init routine throws an exception [23462] Static binary with dynamic string tokens ($LIB, $PLATFORM, $ORIGIN) crashes + [27304] pthread_cond_destroy does not pass private flag to futex system calls [27577] elf/ld.so --help doesn't work Version 2.33 diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h index ecb729da6b..ca96397a4a 100644 --- a/sysdeps/nptl/lowlevellock-futex.h +++ b/sysdeps/nptl/lowlevellock-futex.h @@ -50,20 +50,8 @@ #define LLL_SHARED FUTEX_PRIVATE_FLAG #ifndef __ASSEMBLER__ - -# if IS_IN (libc) || IS_IN (rtld) -/* In libc.so or ld.so all futexes are private. */ -# define __lll_private_flag(fl, private) \ - ({ \ - /* Prevent warnings in callers of this macro. */ \ - int __lll_private_flag_priv __attribute__ ((unused)); \ - __lll_private_flag_priv = (private); \ - ((fl) | FUTEX_PRIVATE_FLAG); \ - }) -# else -# define __lll_private_flag(fl, private) \ +# define __lll_private_flag(fl, private) \ (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) -# endif # define lll_futex_syscall(nargs, futexp, op, ...) \ ({ \