Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp771871ybi; Fri, 14 Jun 2019 03:07:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjInlITR/RLUY4UnaCsyDYpRMKhj7KiGsOP1mFK1BHJapw7CAmc3cfkBskPeazhGiE+s7S X-Received: by 2002:a17:90a:b908:: with SMTP id p8mr10261863pjr.94.1560506865618; Fri, 14 Jun 2019 03:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560506865; cv=none; d=google.com; s=arc-20160816; b=bTmzuV7QLO1JJAoMeDWlcAC9RKJDYSpOu5Dcr0xZxTK+D32STQnYWY1xUTyaogK9Hd 6w50yVUu+CziIDqNabejpj9Obmwf9pRyHPlW6ev7Pq6L5MN8jzI2ezbkM1lcZfJl4Ddv ttdz+Hj1w3rsflHPMgB/yMXrDgPigSitZDpD2GNMN5awAsum4DEL5L1vdpm1JSJZiLEY dBeu3wvPqmBfRHsepMa/TOU/jqLDV21PNNiwWua1Wpr356j0Gtz0d/JpSNQloPwp0bJa 6giyuVzyAytGzQvGxlJglU+Ul19a2YHyyRKCX2xwaNxFxA0qMwSo80LznRFU9REdgbgE YgwQ== 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:message-id :in-reply-to:date:references:subject:cc:to:from; bh=ta53V9AAp337hTqp7n/WHaNgXFD54Hf/lM6p7dyWB7s=; b=y+3jPH3DrzB8vaxw2rEm0DWkj8DdXcCZFRxzDZg37HuBcC3L9kvc97u1v+jCXnZn4v ClKeunzt+KFgh9xmEIONoHmJU6rFG1jjrZIJP0lhx6UySbCIPFnkrbeEi5NBDb8NqCMy T6GFmjU6byW6/EP6MM4jRuHl/B3DKMinHq005sHYxOZN9H0cy62lZF1TsSMue3asc625 aJXBpdsCBnqPGWT8Ir9Ld6Wj0zmac7dQ04DfszbW8BorILCo9CXshn9O8zsvcWj5Wl7c +Hz+tgNzBdV3A9mQomutUbtwcuj46OsKoG6xbMIoL8/a8RO9kA9CRtU1sZBa4N/zpRCd iS3g== 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 v11si1807904plp.304.2019.06.14.03.07.28; Fri, 14 Jun 2019 03:07:45 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727330AbfFNKHC (ORCPT + 99 others); Fri, 14 Jun 2019 06:07:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36836 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727283AbfFNKHC (ORCPT ); Fri, 14 Jun 2019 06:07:02 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D6AE37E421; Fri, 14 Jun 2019 10:06:56 +0000 (UTC) Received: from oldenburg2.str.redhat.com (dhcp-192-180.str.redhat.com [10.33.192.180]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B9C841001DC8; Fri, 14 Jun 2019 10:06:46 +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: [PATCH 1/5] glibc: Perform rseq(2) registration at C startup and thread creation (v10) References: <20190503184219.19266-1-mathieu.desnoyers@efficios.com> <87muj2k4ov.fsf@oldenburg2.str.redhat.com> <1528929896.22217.1559326257155.JavaMail.zimbra@efficios.com> <87o93d4lqb.fsf@oldenburg2.str.redhat.com> <117220011.27079.1559663870037.JavaMail.zimbra@efficios.com> <87wohzorj0.fsf@oldenburg2.str.redhat.com> <914051741.43025.1560348011775.JavaMail.zimbra@efficios.com> <802638054.3032.1560506584705.JavaMail.zimbra@efficios.com> Date: Fri, 14 Jun 2019 12:06:45 +0200 In-Reply-To: <802638054.3032.1560506584705.JavaMail.zimbra@efficios.com> (Mathieu Desnoyers's message of "Fri, 14 Jun 2019 06:03:04 -0400 (EDT)") Message-ID: <87ftocwkei.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 14 Jun 2019 10:07:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Mathieu Desnoyers: > ----- On Jun 12, 2019, at 4:00 PM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote: > >> ----- On Jun 10, 2019, at 4:43 PM, carlos carlos@redhat.com wrote: >> >>> On 6/6/19 7:57 AM, Florian Weimer wrote: >>>> Let me ask the key question again: Does it matter if code observes the >>>> rseq area first without kernel support, and then with kernel support? >>>> If we don't expect any problems immediately, we do not need to worry >>>> much about the constructor ordering right now. I expect that over time, >>>> fixing this properly will become easier. >>> >>> I just wanted to chime in and say that splitting this into: >>> >>> * Ownership (__rseq_handled) >>> >>> * Initialization (__rseq_abi) >>> >>> Makes sense to me. >>> >>> I agree we need an answer to this question of ownership but not yet >>> initialized, to owned and initialized. >>> >>> I like the idea of having __rseq_handled in ld.so. >> >> Very good, so I'll implement this approach. Sorry for the delayed >> feedback, I am traveling this week. > > I had issues with cases where application or LD_PRELOAD library also > define the __rseq_handled symbol. They appear not to see the same > address as the one initialized by ld.so. What exactly did you do? How did you determine the addresses? How is __rseq_handled defined in ld.so? Thanks, Florian