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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 6AE103858D35 for ; Tue, 1 Feb 2022 20:39:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6AE103858D35 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-64-LxUvN3JxMYOOiVz3WVgWzg-1; Tue, 01 Feb 2022 15:39:21 -0500 X-MC-Unique: LxUvN3JxMYOOiVz3WVgWzg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5BAF8814404; Tue, 1 Feb 2022 20:39:20 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.205]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 47E11E2E5; Tue, 1 Feb 2022 20:39:18 +0000 (UTC) From: Florian Weimer To: Chris Kennelly Cc: Mathieu Desnoyers , Paul Turner , Peter Oskolkov , libc-alpha@sourceware.org , linux-kernel , Peter Zijlstra Subject: Re: Aligning tcmalloc with glibc 2.35 rseq ABI References: <432231420.24682.1643727496135.JavaMail.zimbra@efficios.com> Date: Tue, 01 Feb 2022 21:39:16 +0100 In-Reply-To: (Chris Kennelly's message of "Tue, 1 Feb 2022 15:33:15 -0500") Message-ID: <87mtja1fuz.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2022 20:39:28 -0000 * Chris Kennelly: > Thanks for the heads up. > > I did have a question about whether the new protocol would introduce > an extra memory reference while initializing a critical section. > > * With initial-exec TLS, I can directly reference __rseq_abi. > * With the new ABI, I might need to ask glibc for the address of the > registered rseq structure in its thread data. You can write __rseq_offset to a static/hidden variable in an ELF constructor, and then use pretty much the same assembler sequences as for initial-exec TLS on most architectures. Thanks, Florian