Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp19873imm; Thu, 20 Sep 2018 13:21:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ1/wOi3I5FxoEyYPcJ0jxhA/um2IfiW9ZCj8Zh+/d3WatylraR1yrvIeSLO+Wt3BqDVq3/ X-Received: by 2002:a63:4f64:: with SMTP id p36-v6mr37291216pgl.210.1537474894144; Thu, 20 Sep 2018 13:21:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537474894; cv=none; d=google.com; s=arc-20160816; b=r9SnoUZ2Eu6Wbc/5zgpwUGozM16YNIHF7jMi2Xyax9h0KCxqr7fUn79JKL5leGnduc zakCr2ZNNyfGl4M83sQEy6EJdJGSY9Rna0Y4sQ4hMUwlaNw2WW8AK9iXvEoM9sNPM1nz UPFX02PB+1/1YCJT1pnIyja8AjD8RPorUpV5rt2QdU+Ybc0AMBbo4fDi2q6CDa+mhMBM cAOJRigXespe4BB3EvRXH672aAM1/DPDa6xwBWwOCP4nAZuauD+bN8jAJQXLRn5NB1nn BiyZEgCHXWCD7uPlYp0IJVKqslpNl9uIp1z6TwwERhTArsEkpRv7uSsh4PeWVdhH50U9 z1Rw== 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:references :message-id:in-reply-to:subject:cc:to:from:date; bh=ImJFNlnIEyDUVZN2ZMPFCSkPjAODRU3PuLY2jNPkNt0=; b=WsKptkby47WafnC4100myuWKvzCSmtVo7xQiBix+K7p5V3SelUwLnCtA99+8MQgtxU tmDLUa30E/BvwbiMkGy0UHGERDZBECk+V5Rr6OxZ+KtzrqPfJmXSqBexhFD6DSF1hBbn TuTWlKmjstcx8GG+Ni51XqfIZKgKvHQ+r1MaV1924HhWX7bSEHVBUz62aZbC3hHhPizh SbZCYiGVC2jWb5Af41ZMMHoIqEHpffmqWL4Gld00GrSRrgewMEGtl56KYYchfnzj5uNN HB9laMUpc+x3XR9MgBpdn8Ge3s/H8Ad+3mGK6PZ4Yc6bug10ItGw/N01BySjzPGh6Mh4 0cJw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6-v6si24444809plo.264.2018.09.20.13.21.17; Thu, 20 Sep 2018 13:21:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388014AbeIUCFy (ORCPT + 99 others); Thu, 20 Sep 2018 22:05:54 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:41276 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727252AbeIUCFx (ORCPT ); Thu, 20 Sep 2018 22:05:53 -0400 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g35RA-0005Ly-MQ from joseph_myers@mentor.com ; Thu, 20 Sep 2018 13:20:32 -0700 Received: from digraph.polyomino.org.uk (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 20 Sep 2018 21:20:29 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.90_1) (envelope-from ) id 1g35R6-0005Zu-MR; Thu, 20 Sep 2018 20:20:28 +0000 Date: Thu, 20 Sep 2018 20:20:28 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Mathieu Desnoyers CC: carlos , Florian Weimer , Thomas Gleixner , Ben Maurer , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Will Deacon , Dave Watson , Paul Turner , libc-alpha , linux-kernel , linux-api Subject: Re: [RFC PATCH] glibc: Perform rseq(2) registration at nptl init and thread creation In-Reply-To: <1619649568.9014.1537474457166.JavaMail.zimbra@efficios.com> Message-ID: References: <20180919144438.1066-1-mathieu.desnoyers@efficios.com> <67473000.8399.1537375994645.JavaMail.zimbra@efficios.com> <1619649568.9014.1537474457166.JavaMail.zimbra@efficios.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Sep 2018, Mathieu Desnoyers wrote: > Are you saying glibc has an explicit check for the kernel version visible > from /proc before using specific features ? If so, how can this work with > the variety of feature backports we find in the distribution kernels out > there ? See sysdeps/unix/sysv/linux/dl-sysdep.c and sysdeps/unix/sysv/linux/dl-osinfo.h. As I said, Carlos has proposed removing that check. > For too-old headers at compile time, one possibility is that we don't event > expose the __rseq_abi TLS symbol. OTOH, if we need to keep exposing it anyway > for ABI consistency purposes, then we'd leave its cpu_id field at the initial > value (-1). But that would require that we copy linux/rseq.h into the glibc > source tree. The ABI needs to be independent of the kernel headers used. I don't think you need to copy linux/rseq.h; all you should need is to e.g. define an array of suitable size and alignment with the relevant member initialized and a suitable explanatory comment. -- Joseph S. Myers joseph@codesourcery.com