Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp167071imu; Mon, 26 Nov 2018 09:17:53 -0800 (PST) X-Google-Smtp-Source: AJdET5e7enGB59D8/mOi/pEEWC4Hh8nYBaAqChA4J7XlHeik0cqrXShwVuDMAFJUh9CvSwAj2K3i X-Received: by 2002:a62:d2c1:: with SMTP id c184mr29125841pfg.248.1543252673627; Mon, 26 Nov 2018 09:17:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543252673; cv=none; d=google.com; s=arc-20160816; b=nIhsndjFbbzaYbKWQjkGjNN/ArRM5xOlyUn5CXnrRjJ0NY5xw2Nh/OzDXzkIMDHKF+ vWmsv2BRklg+r/u/+KecMFU7w2tY1yXR3B6E2e3prI6tFxVchVpfDIlkZYmajaWHi5vu nRQT7LLpQNiKv7AnJhXEAmfOcOj2H6bmOru9LVHjlZi7Ql6q7HUcAyPbRBk4fIjN0zst 0ZEmV1zWKKS4YK0jVPyQ3SPiTXsovEu/N3fCcTXfi6tMF+7kf8oE/XaTJR8xpioL/fKC rJVazY0ad0WZ9CHixBORe5XMT3GeYjS2vdN6AzCvIFK3PgRl2U9mwzFmcz8bf8e1fN6s yVXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=pcnp6DiN0S3XvB1IFxAIQT9KrfocJrN2Ag0gkT+bxcU=; b=ft9yHqoNgt1UDXsXj7a2O+FNs87OIa0MMM5O8c90rst+n69CkuFVAWlNwb0ax3TWdv tHcy1EwDTbh8vSvqIkosO/o+QYT0bkVCt75E2N4vBBoOB9JlHVqCIyMZN2JWy73zH/VL 3H3Bnu3lxlScKAzxHFW0jUrpGVYQbkmbsuPOcbtnqhT3L7mNSNcqQ690ycTTQlmUDFZ2 i5VSdal020SAtlsrL/P8iinH822rxx7v0UxDBhFy8T7yCsyeYl1EpxfL7kifaDSC8UyU fNhtxyUBTbFujMaU8Z8cA5CyK1IofVvCzuvawciF/2xrh2kc5FjZ1G9tjTbNoOUPohEn QzLw== 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 34si784542pgt.455.2018.11.26.09.16.55; Mon, 26 Nov 2018 09:17:53 -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; 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 S1727190AbeK0EF6 (ORCPT + 99 others); Mon, 26 Nov 2018 23:05:58 -0500 Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:58616 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726224AbeK0EF6 (ORCPT ); Mon, 26 Nov 2018 23:05:58 -0500 Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1gRKPF-0006H9-00; Mon, 26 Nov 2018 17:10:45 +0000 Date: Mon, 26 Nov 2018 12:10:45 -0500 From: Rich Felker To: Florian Weimer Cc: Mathieu Desnoyers , carlos , Joseph Myers , Szabolcs Nagy , libc-alpha , Thomas Gleixner , Ben Maurer , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Will Deacon , Dave Watson , Paul Turner , linux-kernel , linux-api Subject: Re: [RFC PATCH v4 1/5] glibc: Perform rseq(2) registration at nptl init and thread creation Message-ID: <20181126171045.GQ23599@brightrain.aerifal.cx> References: <20181121183936.8176-1-mathieu.desnoyers@efficios.com> <20181123142843.GJ23599@brightrain.aerifal.cx> <1150466925.11664.1542992720871.JavaMail.zimbra@efficios.com> <20181123173019.GK23599@brightrain.aerifal.cx> <865273158.11687.1542995541389.JavaMail.zimbra@efficios.com> <20181123183558.GM23599@brightrain.aerifal.cx> <1758017676.12041.1543007347347.JavaMail.zimbra@efficios.com> <87bm6cqm31.fsf@oldenburg.str.redhat.com> <688718071.12798.1543247469553.JavaMail.zimbra@efficios.com> <874lc3omh5.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874lc3omh5.fsf@oldenburg.str.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 26, 2018 at 05:03:02PM +0100, Florian Weimer wrote: > * Mathieu Desnoyers: > > > So let's make __rseq_abi and __rseq_refcount strong symbols then ? > > Yes, please. (But I'm still not sure we need the reference counter.) The reference counter is needed for out-of-libc implementations interacting and using the dtor hack. An in-libc implementation doesn't need to inspect/honor the reference counter, but it does seem to need to indicate that it has a reference, if you want it to be compatible with out-of-libc implementations, so that the out-of-libc one will not unregister the rseq before libc is done with it. Alternatively another protocol could be chosen for this purpose, but if has to be something stable and agreed upon, since things would break badly if libc and the library providing rseq disagreed. Rich