From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83553 invoked by alias); 11 Jan 2019 01:12:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 83544 invoked by uid 89); 11 Jan 2019 01:12:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:mathieu X-HELO: mail.efficios.com DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com D16B0B13D7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1547169116; bh=5bxH1y6PYC+dPfcY7T5ddmGiLf8DM/EUNZcq2rbSLkI=; h=Date:From:To:Message-ID:MIME-Version; b=ite1JuyrZvmIbG0QhMIRqedvQj4P7hNV1Dht6ZcAZRRsm2h5fgElteZYnSutck9lI m1di0JaaG33UCFh5cFZ73LjmWjwsrNPawP6N0iEne/9bQzKvdd/oL6POA/+t4PlF9S 6hbzLDY3oP2maMcGQGfZlcu/6Klqx3jG8wyoZWDwJXcu/e4QFnMCZfYrgEhGCQbfA6 jhAdcq1hS0kdKys7WS3UR5vXSWRXqy+sw7HhcMiAOEOd+SgVVec1+ShuZK9OqopP3z ziC7mpnIQDV/qduaevBjzfmZEttbK7GqvKk//IaQcBwQtFT9gvQ/qFU/QEGrJvmuTF X4/1IZE5GfUgQ== Date: Fri, 11 Jan 2019 01:12:00 -0000 From: Mathieu Desnoyers To: Florian Weimer Cc: carlos , Joseph Myers , Szabolcs Nagy , libc-alpha , Thomas Gleixner , Ben Maurer , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Will Deacon , Dave Watson , Paul Turner , Rich Felker , linux-kernel , linux-api Message-ID: <1488546469.1564.1547169116539.JavaMail.zimbra@efficios.com> In-Reply-To: <1681283664.1380.1547152315426.JavaMail.zimbra@efficios.com> References: <20181204192141.4684-1-mathieu.desnoyers@efficios.com> <87h8fkz6qx.fsf@oldenburg2.str.redhat.com> <1681283664.1380.1547152315426.JavaMail.zimbra@efficios.com> Subject: Re: [RFC PATCH glibc 1/4] glibc: Perform rseq(2) registration at nptl init and thread creation (v4) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-01/txt/msg00237.txt.bz2 ----- On Jan 10, 2019, at 12:31 PM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote: > ----- On Dec 11, 2018, at 2:40 AM, Florian Weimer fweimer@redhat.com wrote: [...] >> >>> diff --git a/nptl/Versions b/nptl/Versions >>> index e7f691da7a..f7890f73fc 100644 >>> --- a/nptl/Versions >>> +++ b/nptl/Versions >>> @@ -277,6 +277,10 @@ libpthread { >>> cnd_timedwait; cnd_wait; tss_create; tss_delete; tss_get; tss_set; >>> } >>> >>> + GLIBC_2.29 { >>> + __rseq_refcount; >>> + } >> >> Why put this into libpthread, and __rseq_abi into libc? > > The __rseq_abi symbol should be available to the glibc memory allocator. > I plan to move the __rseq_abi to sysdeps/unix/sysv/linux/Versions instead > so it becomes Linux-specific. > > The __rseq_refcount symbol only needs to be made available to applications > and libraries linking against libpthread, because only libpthread actually > handles the rseq registration/unregistration at thread start/exit and > library initialization. > > However, considering that we want this to be Linux-specific as well, > I could move it to sysdeps/unix/sysv/linux/Versions too. > > Then it would make sense to move the __rseq_refcount symbol defined in > nptl/rseq.c to sysdeps/unix/sysv/linux/rseq.c as well and group > everything together. > > Therefore, both symbols will end up in sysdeps/unix/sysv/linux/Versions. Now that I think about it, it's important to move the rseq registration done at nptl init (in my current code) to some lower-level csu initialiation, so applications that happen _not_ to link against libpthread also get registered rseq for the main thread. Does it make sense ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com