Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2806404ybz; Mon, 27 Apr 2020 05:01:40 -0700 (PDT) X-Google-Smtp-Source: APiQypKPcRqaSEHtlNBxSWFFqcI/Z0YFLy+lt3cNZ6bZnXyeDq3Uod3c2Iyl3QX2bWPP3fDHzTGY X-Received: by 2002:a05:6402:1d89:: with SMTP id dk9mr17964287edb.382.1587988900035; Mon, 27 Apr 2020 05:01:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587988900; cv=none; d=google.com; s=arc-20160816; b=Us5VSOoD75Z5h8evZgUnW2K6OmCyeXK9FAfnIC5OFAKdX/qjwOvBLIU/3GM4vFFEu0 gy9mnUk5B+kyYA9KiI7kOa6NxjuL3CdIfN+syCJNEffYUHlUilOWl6OBpN2qY1CyMdCj WBfFsKjTPHtu6V828inokIAyFDtn9QUtmM37njgcY77yeDOOzdHUfLBKw4NcHtC2irYz waBcuUsdAiIZbc82jKLW3CW/HedCAox3jCaaAXi5BfteZvKkwrjsfHCtA6c1jCFeCptD erLmJJwo7QYxx0+asCbopNJbreWYEGvxwnfNbgVhkN+ClEKUOfaEsZC/jKlEVBj7mHzU A5QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to:date :references:subject:cc:to:from; bh=ofIg1cxN5VmdT9zE7fAuVzLCTPgYqDWCNW2wDzDV7ws=; b=OavxqjqZge04q2nDKRpRE81Z53OiEy18WyA55vNoJS+aGTas+WcjFKTZwyPZTcFcU4 2esxLJDzEp81kuxcw4piWVv0abo2eD0m2e3WspE3vIc7g+dg3ODZYzLs9sgZVT2FMEit ypRj/0o57jmFAj9zHwT5iLm9mOJAcKYG4zQFrKrp2sBLahLQkVKhmwK7/qeftpHpuCbO dENxmvP270VLm4UhbKRPDLVDsM3dkSMgbXJRKsH/r/FtCfh0dNVBMQQ/W5BXE87+z4gY fCMBvAH64aApPUf7XEYeixrKhO3ANe3uDSv4+py0XyF3rGywWzw+9L4afklU9iFaTIfI /SVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l19si7394928edr.184.2020.04.27.05.01.11; Mon, 27 Apr 2020 05:01:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727077AbgD0L7Q (ORCPT + 99 others); Mon, 27 Apr 2020 07:59:16 -0400 Received: from albireo.enyo.de ([37.24.231.21]:51092 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726786AbgD0L7Q (ORCPT ); Mon, 27 Apr 2020 07:59:16 -0400 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jT2Pj-0001h5-7F; Mon, 27 Apr 2020 11:59:07 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jT2Pj-0006cz-2z; Mon, 27 Apr 2020 13:59:07 +0200 From: Florian Weimer To: Mathieu Desnoyers via Libc-alpha Cc: Carlos O'Donell , Mathieu Desnoyers , Rich Felker , linux-api@vger.kernel.org, Boqun Feng , Will Deacon , linux-kernel@vger.kernel.org, Peter Zijlstra , Ben Maurer , Dave Watson , Thomas Gleixner , "Paul E. McKenney" , Paul Turner , Joseph Myers Subject: Re: [PATCH glibc 5/9] glibc: Perform rseq(2) registration at C startup and thread creation (v17) References: <20200326155633.18236-1-mathieu.desnoyers@efficios.com> <20200326155633.18236-6-mathieu.desnoyers@efficios.com> Date: Mon, 27 Apr 2020 13:59:07 +0200 In-Reply-To: <20200326155633.18236-6-mathieu.desnoyers@efficios.com> (Mathieu Desnoyers via Libc-alpha's message of "Thu, 26 Mar 2020 11:56:29 -0400") Message-ID: <87ftcpxhpw.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Mathieu Desnoyers via Libc-alpha: > diff --git a/elf/libc_early_init.c b/elf/libc_early_init.c > index 1ac66d895d..30466afea0 100644 > --- a/elf/libc_early_init.c > +++ b/elf/libc_early_init.c > @@ -18,10 +18,13 @@ > > #include > #include > +#include > > void > __libc_early_init (void) > { > /* Initialize ctype data. */ > __ctype_init (); > + /* Register rseq ABI to the kernel. */ > + (void) rseq_register_current_thread (); > } I think the registration must be restricted to the primary namespace. Otherwise, LD_AUDIT will register the area to the secondary libc (in the audit module), not the primary libc for the entire process. I think the easiest way to implement this for now is a flag argument for __libc_early_init (as the upstream __libc_multiple_libcs is not entirely accurate). I will submit a patch.