Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3919452imu; Mon, 14 Jan 2019 11:25:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN65OtyW/408O6ybpIxfkX2JVVRSS0dMsR9oBdRJ6LouAG1Nd3FATRkGIAgflbJ7PF68g0Nz X-Received: by 2002:a63:ba4d:: with SMTP id l13mr49989pgu.194.1547493923459; Mon, 14 Jan 2019 11:25:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547493923; cv=none; d=google.com; s=arc-20160816; b=BERQUhBN+pzif2WC0k+id+E0ylFc3AF6EjGUjIG09b8E0YR5rrPhUwh48YcClxHHtX QT1uXAjDuPYUWqeam/2flihxorKH7/JFlfyfsq3ljPDqWYpSwNmZBc+HUgJLNXBmbMzR ICpxzTOKRtT8NvT5xBmWEQvKwwoM/GNWsGv7ht83WyoBWArZovY6WADLrzqnuXu8xkd2 P+p2TAQe4LpFu6N9AeGP1etlgVa2WzVckD3plpVDJnEZZ2hsQgCxiCu0rFOEvg33ExhZ 3Ta4qFp79ymCXqZfZQ24JI85AZhp3LCbMFXDWee8mn6xbYP/O0TmHzCuRwu//NCYWGDT jvZg== 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=DpFoyr4ZaxTw8xyYjUlySVIEAvWzDWa4seh1yWPRLek=; b=paWeWRBuQfRRDMWppJi3SpiSWmVAaY6qYBXxNjVegQTOo8WYFTD3+k73NYZ0nW0/8H PPlMqpkHZqCSf/L5iBUAuxV+aCEp3cyXi0aAS+h36HJ0Bh1JHKqnGj3KtvMkqYdBE2m0 SepwHO1Q+15XJ4o6zG4wkadCM14O5+VNwj3Nmd0rqwueieoIXULoWUtNI1OYgGfYA4Db LNLlmupaCbkv2lGMtfGWRHGDeERQvOfTz7t8HnDEFza3zxmEWZ2xdWw62VtyUeU2At7e HbyiehZBVEK333zovR+tr/9Rd2bcEliyW3vBrciN1bdpcGb45b/IV6a27ZhzgeVi/6qS rwpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=KXSeCyeV; 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 t4si1099327pgb.97.2019.01.14.11.25.07; Mon, 14 Jan 2019 11:25:23 -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=KXSeCyeV; 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 S1726898AbfANTWk (ORCPT + 99 others); Mon, 14 Jan 2019 14:22:40 -0500 Received: from mail.efficios.com ([167.114.142.138]:44250 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbfANTWk (ORCPT ); Mon, 14 Jan 2019 14:22:40 -0500 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 9E104A3FE7; Mon, 14 Jan 2019 14:22:38 -0500 (EST) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id Oj8ZeIISCiXp; Mon, 14 Jan 2019 14:22:38 -0500 (EST) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 005BCA3FDD; Mon, 14 Jan 2019 14:22:38 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 005BCA3FDD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1547493758; bh=DpFoyr4ZaxTw8xyYjUlySVIEAvWzDWa4seh1yWPRLek=; h=Date:From:To:Message-ID:MIME-Version; b=KXSeCyeVJT4UUYzNDp0gLmauP1j0a/v80b+vMEPqRGhiibHs2d4cpgWhgj0p0euwG CqV1AXEnQFJYB8G3Oqy5+CfMWlZTauzQUmxkS+NFvCAwEqYpYKPAxJDozhnLFiFAte mF1mcQC6MzDT0LhJ9jh5eCpoANkbKTcFVbO+oPeJVcx6dwL71m4qYTLhB3Pe+vc/r6 dlvq9F1kiWVnDqDYA5D/LduAn7ibJqHdyC1ZeNAVVXr7t4zLdp21KgHPrKw8Kw+r1N BaIKb2csTAtD679g1dsWzHMVCLUMDiUQHTDnr1vOWRSoNzjqZoFmtXNFiQO6ugdUNU Q0M5DR2t3rcJA== 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 wSJTihXoUMft; Mon, 14 Jan 2019 14:22:37 -0500 (EST) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id D4E8CA3FD4; Mon, 14 Jan 2019 14:22:37 -0500 (EST) Date: Mon, 14 Jan 2019 14:22:37 -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: <394676913.486.1547493757710.JavaMail.zimbra@efficios.com> In-Reply-To: <87fttv9iic.fsf@oldenburg2.str.redhat.com> 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> 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: PppMlOnTGZSxB6fe9h0t4G40nYnmpA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- 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. >>> By the way, you could avoid the need for unregistration if you allocated >>> the rseq areas persistently, index by TID. They are quite small, so >>> with the typical PID range, maybe the wasted memory due to changing TIDs >>> would be acceptable? >> >> Would we be able to access those __rseq_abi as normal TLS IE model >> variables ? The overhead of indexing an array matters for a >> fast-path. > > No, that wouldn't be possible in this case. You would need another > indirection. Thanks for the clarification! Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com