Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp29133imu; Thu, 10 Jan 2019 17:15:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN7tuCNYlBionp/2Dg25DyUk0dXwrU8I+7XIb1esCsvSXQvZh/A90dOjGyhv3+vSmwEQYak8 X-Received: by 2002:a62:442:: with SMTP id 63mr12231521pfe.156.1547169359494; Thu, 10 Jan 2019 17:15:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547169359; cv=none; d=google.com; s=arc-20160816; b=dg2YDfPBdX/mPXtba0rTPULFN0mGVW7Qdmml3mEvrKGva1YglAzG9npVVkZcqGeMnM 7zdSxmgs5uYLvnQTqgXpGfSTqX9TgWES5a4ybT4FeBOaMk1MCNhiWq3noj4Vwbl7WEeP ZgwrZhhqoZMyZiWHrUd3YE0ChtFiqGXSGFMXraFoHLOh7sILafU5O6V23FJIiO2UmC9U YVdDU0e653Q6NWP84XkCta0BwX55mYYSAAt4B2zI5Gugs/axqbeB4ZyhdgctwLk1m//I +ygsgrhSyeeiVDlx6tSRkCiJANBgVleJ+/g5E7oSyBXQrpQbqaBv6OiyyzqPxHr/NG+N D1ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=5bxH1y6PYC+dPfcY7T5ddmGiLf8DM/EUNZcq2rbSLkI=; b=USBJtnnycuP+YyJRAlBFcKUvpCIIRq2kmHe2uIKl1AYbe1X9Aw2c7vVukXfI8Vn44X 4yvEYGZKdCPEGfrvrPW91h0TRBwUDwgxPZAewGuojyMrQnIA4wDsjGLX6yZi1HzR3h/0 gUfFA02+LoFmoAwPAQL6ikDApH47P/Tq+PzmHpGcEzEvpj9SH5h2uNfdc68ht6hn8ngL 5vitreqtLyy+8r7cwwoCrRZf++DkVLD3+c9YHCL8EgXfS2v/cJBM9qEBelfn/y57RoC1 SdIu1rLmIGum7Q66yjtJfGFqmI0G+B7/v6hS/+3Zf1lUz1NeURqgbnXZfa66+oTej0cZ Q47g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=ite1Juyr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si7729992pgk.291.2019.01.10.17.15.42; Thu, 10 Jan 2019 17:15:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=ite1Juyr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728999AbfAKBMA (ORCPT + 99 others); Thu, 10 Jan 2019 20:12:00 -0500 Received: from mail.efficios.com ([167.114.142.138]:56002 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726149AbfAKBL7 (ORCPT ); Thu, 10 Jan 2019 20:11:59 -0500 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id A40F6B13DC; Thu, 10 Jan 2019 20:11:57 -0500 (EST) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id CBRuKlDCqMWY; Thu, 10 Jan 2019 20:11:56 -0500 (EST) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id D16B0B13D7; Thu, 10 Jan 2019 20:11:56 -0500 (EST) 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== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id 5-b0uS4sn0i3; Thu, 10 Jan 2019 20:11:56 -0500 (EST) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id B2E76B13D0; Thu, 10 Jan 2019 20:11:56 -0500 (EST) Date: Thu, 10 Jan 2019 20:11:56 -0500 (EST) 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-Originating-IP: [167.114.142.138] X-Mailer: Zimbra 8.8.10_GA_3716 (ZimbraWebClient - FF52 (Linux)/8.8.10_GA_3745) Thread-Topic: glibc: Perform rseq(2) registration at nptl init and thread creation (v4) Thread-Index: u/41c6UxqVERQfSwYTdc9PnhxGpO1ktalziy Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- 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