Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3932376imu; Mon, 14 Jan 2019 11:39:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN6Y/oiv02hrTUL14besV++Du360lsxrjoZz74D1gvKFx6pLriRSFfAoNblt0gN4OzIfCu/i X-Received: by 2002:a63:4101:: with SMTP id o1mr47786pga.447.1547494799496; Mon, 14 Jan 2019 11:39:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547494799; cv=none; d=google.com; s=arc-20160816; b=OBicztbm+NV+vFvZXATWlZqq0rkTse3kNeTso4IGeTnSaaqc8FNxnG2C8eB1lxQKuG 2ZO5E7PPdfNAfS52wP+vY0tCqnIHwH5hXyiI6jFX0addfXYxR5hNrbhmjULbV8mrkRv5 BsH83NU3eyzjk6omSBI4RIhwMai3OWMXcygHHka3VDBDiFIsfbKaYo3f0cxGyQYesbKs QRLDOk7OJ0zM1gpwrMsPbJ3L6tCgZYLOLtxUFpoK4gUwvCMwazuEufA0TSzatxIVfK2y cRUoD1X3Ixau0mm0cb7fiHCZRxHedXJIzrzuty0ZiZ0Gb+KBkYkUzT5YiWByjyhWEY+6 5hiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from; bh=vkXxLIFVRagwsUr6WoZccev6+lv6lPj00OiuDkNFqHI=; b=T4He6PbWvt2NVlnLm09jnejLlx7PYBGfPkfZWR88bvHMWzLuJ0d/45sWjb4+EDWeIh cdqeUJvatrbezhAPrzI1Yl6amcdblupRClS+7Q+Fq8d9BqMdK3d2wElAf5hKJMNJcX4h u7+Wc7QjxxyWydl3OyDhwjwCXrJQUtcLqfb2l5Nqv9/TZM7XA5Wf4sL0gd7BfwweFc2m 1nClD23qR8EBoxM+FXgp16qb6TohK4AFKqnDKKLS+ekf9dFk6PXxi/PKwJitamH+vm1v utdY/GaRBFIRFJvjxYIw+RgNNfh5Ml4THnenEJ8Fmuee9nkWIr1p5+k7Cr841ZP11Mw0 934w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si1084440plu.169.2019.01.14.11.39.43; Mon, 14 Jan 2019 11:39: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726911AbfANThM convert rfc822-to-8bit (ORCPT + 99 others); Mon, 14 Jan 2019 14:37:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47604 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726753AbfANThM (ORCPT ); Mon, 14 Jan 2019 14:37:12 -0500 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 mx1.redhat.com (Postfix) with ESMTPS id DFC6B8831D; Mon, 14 Jan 2019 19:37:11 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-116-20.ams2.redhat.com [10.36.116.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C5F4A4503; Mon, 14 Jan 2019 19:37:03 +0000 (UTC) From: Florian Weimer To: Mathieu Desnoyers 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 Subject: Re: [RFC PATCH glibc 1/4] glibc: Perform rseq(2) registration at nptl init and thread creation (v4) References: <20181204192141.4684-1-mathieu.desnoyers@efficios.com> <87h8fkz6qx.fsf@oldenburg2.str.redhat.com> <1681283664.1380.1547152315426.JavaMail.zimbra@efficios.com> <87fttv9iic.fsf@oldenburg2.str.redhat.com> <394676913.486.1547493757710.JavaMail.zimbra@efficios.com> Date: Mon, 14 Jan 2019 20:37:01 +0100 In-Reply-To: <394676913.486.1547493757710.JavaMail.zimbra@efficios.com> (Mathieu Desnoyers's message of "Mon, 14 Jan 2019 14:22:37 -0500 (EST)") Message-ID: <87y37n8202.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 14 Jan 2019 19:37:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Mathieu Desnoyers: > ----- On Jan 14, 2019, at 10:55 AM, Florian Weimer fweimer@redhat.com wrote: > >> * Mathieu Desnoyers: >> >>> Therefore, both symbols will end up in >>> sysdeps/unix/sysv/linux/Versions. >> >> I'm not sure what you mean by that. The physical location in the >> directory tree has little effect on which shared object the symbol is >> placed in; that will need other changes. > > I'm currently moving the symbol definitions to csu/rseq-sym.c. On Linux, > its content is overridden by a new sysdeps/unix/sysv/linux/rseq-sym.c > which contains both __rseq_abi and __rseq_refcount symbols. On other > platforms, it is a stub file. You don't need a stub file if you use the “ifeq ($(subdir),csu)” construct. The other question is whether this belongs into the csu subdirectory. Since TLS is not available in ld.so, the initialization would have to happen rather late, after relocation, but before ELF constructors are run. (A side effect is that the rseq area would not be usable from IFUNC resolvers.) Thanks, Florian