Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3106759ybz; Mon, 27 Apr 2020 10:04:39 -0700 (PDT) X-Google-Smtp-Source: APiQypIpuquktvHbUyLe9RFwKfbf6+qAQ8MOVqCMcH5X6Nau1gUuSW/h4+ldQQIeOmZlrl5Rk7Oz X-Received: by 2002:a17:906:6a84:: with SMTP id p4mr15950902ejr.21.1588007079264; Mon, 27 Apr 2020 10:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588007079; cv=none; d=google.com; s=arc-20160816; b=Uv0QpkWvtk46ZobzG0w7g51X/RKJA3lgl5yvMTJcmn2FRVkHZ28lkbFCaZBoU4x7lg C+uCt+GBb2c7r0okxq9+I66Y42tOjIGlsaPMrQ3anGTIwJGNRmqqvipYXfX1c7y3eiFe q0sgDk5R7bGFAhnf8zfI6A84ki1TFsoW1zCpB61hi/Xxtr9fd/GCzx4QYuXp34SrmBko ER63k3J7gLxPLsUC6NBlUA3sYkSNHDNk/6Mbm5mOX1uDwdiGNrTN5ZsapcZkRJMU7AD3 9YEtHwBt59zrnDpSg2pEMeM8T364T+ZNaTe2ZJYCLw7CvQkq8gdkl1uVScJF8RzqQCZ3 kPlg== 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=DccMtGLl280/mwGx/7caxVJRDKVK9Pd/pNSQ/ZKw3Ow=; b=HMy0vVZI7RHlQ3yvMs4sLrrK39l0uBJnkz79gNRY4qzzUr293swTqJPy/wiWsirpgI yfw0mDOBJIR86GMJ8dOHbMqnsKZghS0DUycEWSNukQfV5MAAxBnfDLyb2l/Hjxh42nha 96eo1hpC2SeOI33D0v229KNenu4iJV8SSFuo6Bkk/R001wsLlMJrLNSesHNkiIEUIF7Q WDc4WpSZf/7LAMMdpLM379WE2t9rlez1dbhTDR9coLJ+TdcN0oZH1U2TTrapC9mLYE4A bUULk5eyrafJoDokKpO+cRDYsCHo9zcCXQvPWzL66oeJr7cQM07xS2707jy4XLGztwPH TXCg== 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 w16si79631ejb.521.2020.04.27.10.04.03; Mon, 27 Apr 2020 10:04:39 -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 S1726369AbgD0Q7c (ORCPT + 99 others); Mon, 27 Apr 2020 12:59:32 -0400 Received: from albireo.enyo.de ([37.24.231.21]:58106 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726360AbgD0Q7b (ORCPT ); Mon, 27 Apr 2020 12:59:31 -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 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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: