Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp983139imm; Wed, 19 Sep 2018 10:00:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYnneJQ88Rli+boRr5o7EVISyR6tvPbg9o27S60cjA+mQI/3AkXTizjc6nPtttKxHAMQU3l X-Received: by 2002:a63:e811:: with SMTP id s17-v6mr33090702pgh.176.1537376411106; Wed, 19 Sep 2018 10:00:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537376411; cv=none; d=google.com; s=arc-20160816; b=Vlnu6BBrHOCP3y8INti514mnZyZgoq/OPE4zogVCCBWzZDqZO6SEXnyEDTFNdAiHAF TxbGs6yAp8BYv/ZZzNVGksIckVIXpEuDXEphVzWShcZlFcGdInNTAzLp9zudMIdsB/c/ nTS+JxnY9SEVD9ZEKLqrZHNwgVc1JNKrH2GvU3zFEBgP+gvsp4v9tseRPwghGKY9S9iM +uEftZJKvNtFrP/mnMF+Z6zXg97+SA2l9iy8vrrcq7pXYyotpWDFOc83nqm1PBOQIMab MkhJYi+i3mQ3Rm1/nUSijNQ0HR9qVvsbxA7JCw6vZztSKcAG6EOHI10w3wZCQ+gz+FwC 5Ipg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=+sfQ5/nCYre0ZUT8Gw63qm6ALvtfGsJmOQzhxRh3oCA=; b=g/t7z5EECK4rA6qVDQBdvQUGLSZASnFdb99nK/pYEXjNGdIlpo4eDKVqCq9qYzzIrQ IZ+IYp0w66VnfGXWASGuque2Uj59PUwaOYY2qRIrnW0jCC7E2gO+5ddPYvY1CUS1n086 ojxHJHm+RYBX1h8Hnf3x9HKANZjex4SDarRE1DNgoRgxneDAaU4FjcIGp4v2wnfEuin/ uXI/5jtOh3b3bYFgpFzbPmHtPEPJkD4iEyNC90G3kR8zWkrWvwGxXeIP72hBK3HJ9ssa hWnYGpxyAm/FFlAV5frvkvviA1FXi5kyJF0EyU18hKPI4q3fCRJ8OZbdAg8AxW8MUQyW cnGw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j30-v6si22372031pgj.73.2018.09.19.09.59.55; Wed, 19 Sep 2018 10:00:11 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732605AbeISWQX (ORCPT + 99 others); Wed, 19 Sep 2018 18:16:23 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:49215 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727675AbeISWQX (ORCPT ); Wed, 19 Sep 2018 18:16:23 -0400 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g2fTr-0003g7-HT from joseph_myers@mentor.com ; Wed, 19 Sep 2018 09:37:35 -0700 Received: from digraph.polyomino.org.uk (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 19 Sep 2018 17:37:32 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.90_1) (envelope-from ) id 1g2fTn-0007qw-G1; Wed, 19 Sep 2018 16:37:31 +0000 Date: Wed, 19 Sep 2018 16:37:31 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Mathieu Desnoyers CC: Carlos O'Donell , Florian Weimer , Thomas Gleixner , Ben Maurer , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Will Deacon , Dave Watson , Paul Turner , , , Subject: Re: [RFC PATCH] glibc: Perform rseq(2) registration at nptl init and thread creation In-Reply-To: <20180919144438.1066-1-mathieu.desnoyers@efficios.com> Message-ID: References: <20180919144438.1066-1-mathieu.desnoyers@efficios.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Sep 2018, Mathieu Desnoyers wrote: > Here is a rough prototype registering rseq(2) TLS for each thread > (including main), and unregistering for each thread (excluding > main). "rseq" stands for Restartable Sequences. A final patch would need to add documentation and tests and a NEWS entry and fix various coding style issues. > diff --git a/nptl/Versions b/nptl/Versions > index e7f691da7a..7316c2815d 100644 > --- a/nptl/Versions > +++ b/nptl/Versions > @@ -275,6 +275,7 @@ libpthread { > mtx_init; mtx_lock; mtx_timedlock; mtx_trylock; mtx_unlock; mtx_destroy; > call_once; cnd_broadcast; cnd_destroy; cnd_init; cnd_signal; > cnd_timedwait; cnd_wait; tss_create; tss_delete; tss_get; tss_set; > + __rseq_abi; __rseq_refcount; That's the GLIBC_2.28 section, but 2.28 is already out. New symbols would need to go in GLIBC_2.29 or later (and the ABI test baselines would all need updating). > diff --git a/sysdeps/unix/sysv/linux/rseq.h b/sysdeps/unix/sysv/linux/rseq.h This looks like it's coming from the Linux kernel. Can't the relevant uapi header just be used directly without copying into glibc (with due care to ensure that glibc still builds if the kernel headers used for the build are too old - you need such conditionals anyway if they don't define the relevant syscall number)? -- Joseph S. Myers joseph@codesourcery.com