Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5383734imu; Tue, 29 Jan 2019 18:41:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN7lplRdS+LXQZVbPwtNE3SrCKeNRDOZnQXBI8H1Nv6FFKKnJCxJWeT0dT9H8BP1R/mOHfk5 X-Received: by 2002:a63:ed42:: with SMTP id m2mr26069170pgk.147.1548816106401; Tue, 29 Jan 2019 18:41:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548816106; cv=none; d=google.com; s=arc-20160816; b=NA+Gz0STU3eApt8iN9cRP7+zGAeMDH8ZGHjehg2sqUJrhvWlBYbk0x2dgGHf+F/6/Y F7AQMhSZYQOF4OaWEaw7erq1rV9L1kP7DcRDVzP0RZgUfy2PL0f6/uzKsq0vrb3ZsZg4 4o14827lV0po68Rwtl56RoTuOpaVfZn7Bkkb/AhIqYhGaDqWQ1E9+ssoDZM/kQ6ggYS6 pn/Mha446odw6DWVIF2y3x8qI4+Wp+JH5bb35rNvapL9AdKel7U/SZevnKFb6RSUi4sO 6yzA9CIMgLtoN1XIpy+opkdHuAMXm3HZoyRWLPrFmrOuCP17LqOLRKwqPvW3mMe/Xvrl tvkA== 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=YEdWhHJrcf7V/TVzs+V0LhuanZp6mMKGmWihI5Mf0Z4=; b=W6XHD3KdzBUaaLgJ5i42LeZWlI3ZtCQ8LcxTMmdl7g18TWnRMSrWwt54DjLJ/jHi0t mkSTd2/7b1Hg80eSqcs9YpdalnW4BCPB3+drBSSMOg9oDw7LBwJOk/3kWMV/IdXuqhoj 7G/XnS58UXXNz+y7qItoMPrs/UsCss+NKKmqE+WfCuvelis1GL6N+9mJ40QPEgQMAWDe SfezJHduFLOq5qXYW1pgFLnk/xDjNxOvjb1uGZxW7VOBJIkQKyKTzitGLpEwiu1Zd/H0 NbzG2Es9TLPMbETquQHzC8RweZSBbXQrwosyRIlJB5uMC/R6N2rQMDQ5UeE/Y4n4bU8t 1aPg== 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 d12si214839pgf.470.2019.01.29.18.41.30; Tue, 29 Jan 2019 18:41:46 -0800 (PST) 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 S1729955AbfA3Cks (ORCPT + 99 others); Tue, 29 Jan 2019 21:40:48 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:57615 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729814AbfA3Cks (ORCPT ); Tue, 29 Jan 2019 21:40:48 -0500 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 1gofnu-0004Tv-N0 from joseph_myers@mentor.com ; Tue, 29 Jan 2019 18:40:42 -0800 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; Wed, 30 Jan 2019 02:40:38 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.90_1) (envelope-from ) id 1gofnp-0004Hs-OH; Wed, 30 Jan 2019 02:40:37 +0000 Date: Wed, 30 Jan 2019 02:40:37 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Mathieu Desnoyers CC: carlos , Florian Weimer , 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: [RFC PATCH glibc 1/4] glibc: Perform rseq(2) registration at C startup and thread creation (v6) In-Reply-To: <596949707.3888.1548812359874.JavaMail.zimbra@efficios.com> Message-ID: References: <20190121213530.23803-1-mathieu.desnoyers@efficios.com> <632671842.3079.1548781059601.JavaMail.zimbra@efficios.com> <596949707.3888.1548812359874.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-03.mgc.mentorg.com (139.181.222.3) 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 Tue, 29 Jan 2019, Mathieu Desnoyers wrote: > My thinking was to put the #error in the generic header, so architectures that > are not supported yet cannot build against rseq.h at all, so we don't end up > in a broken upgrade scenario. I'm open to alternative ways to do it though, as > long as we don't let not-yet-supported architectures build broken code. Any case with #error in installed glibc headers needs special-casing in check-installed-headers.sh (and, thus, such errors are to be discouraged). Cases where architectures commonly need their own bits/ headers, especially where those are likely to need updating for new kernel versions, are also discouraged. Furthermore, a normal check for glibc headers updates needed for a new kernel version would only involve examining uapi headers (and the non-uapi linux/socket.h for new address families, an unfortunate existing wart in this area). As far as I can see, this value isn't defined in any uapi header, which makes it especially likely to be missed in such a check. Furthermore, I'm hoping to add more glibc tests for consistency of such constants between glibc and the kernel, to ensure any such updates missing are caught automatically through test failures - but that doesn't work if the constants in question aren't in a uapi header. If this constant were in a uapi header, the glibc header could just include that - is the issue that it's not actually an interface between glibc and the kernel at all, but some kind of purely-userspace interface? We very definitely wish to keep to a minimum the cases where updates need to be done separately in glibc by each architecture maintainer (that's just a recipe for some updates getting missed accidentally) - meaning that there needs to be a clear way in which someone can tell, globally for all architectures, whether the set of such architecture-specific headers for this constant in glibc is complete and current, and when it needs updating (and this should be as similar to possible to such checks for any other header constant). -- Joseph S. Myers joseph@codesourcery.com