From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id D60843858D35 for ; Mon, 27 Apr 2020 16:59:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D60843858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de 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 1jT76J-0003mG-3y; Mon, 27 Apr 2020 16:59:23 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jT76J-0008BA-15; Mon, 27 Apr 2020 18:59:23 +0200 From: Florian Weimer To: Mathieu Desnoyers Cc: libc-alpha , Carlos O'Donell , Rich Felker , linux-api , Boqun Feng , Will Deacon , linux-kernel , Peter Zijlstra , Ben Maurer , Dave Watson , Thomas Gleixner , Paul , 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> <87ftcpxhpw.fsf@mid.deneb.enyo.de> <1660640739.70637.1588006030777.JavaMail.zimbra@efficios.com> Date: Mon, 27 Apr 2020 18:59:23 +0200 In-Reply-To: <1660640739.70637.1588006030777.JavaMail.zimbra@efficios.com> (Mathieu Desnoyers's message of "Mon, 27 Apr 2020 12:47:10 -0400 (EDT)") Message-ID: <87k120vp90.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-21.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2020 16:59:27 -0000 * Mathieu Desnoyers: > ----- On Apr 27, 2020, at 7:59 AM, Florian Weimer fw@deneb.enyo.de wrote: > >> * 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. > > OK, once I get the patch, I will pick it up in my series. There should be no need for that, it can be reviewed and committed separately: