Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3503644imm; Thu, 17 May 2018 09:45:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqvdYkOshUpvVE80HQr9tbrT33tGrzr8iydSxOX92Yr6S05amI0w4XQspYvlQeabA48FZcG X-Received: by 2002:a17:902:7444:: with SMTP id e4-v6mr5704885plt.225.1526575533039; Thu, 17 May 2018 09:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526575533; cv=none; d=google.com; s=arc-20160816; b=R52RS4jSJ4WB8Hfkt6o85AHcLvKGw40cbaFDv5TJWzIdbINgWnTfaTltOLCDf42Ua1 nYguGfUoNPjBTXZGR5mUMjY8c0ahppAHqnBGgok9YBNFO0BZzUD6D9WxOP3BN/VlbCz3 4AUE6ADswWdIaOtu9PektEvGQTHR9nRJ9cYD3S4SbQp40JT0ntzgOH7SlanqfsvgQt6G vnvjTJ1Y90Ukpm6S0WMD0Q0A8pocQKl7JSkX5jZw8LLXfRxj0qh4bNbs1bGDJ8Mgj4bS GTxZJn5BYvlDDK8IFqj6BW967InMHVjeEK0sTTLGjcFZLYWUWV7W4HDfyf1oSKHCi4Be wfyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:organization:references:in-reply-to:date:cc:to:from :message-id:arc-authentication-results; bh=pGePlg57PLXdlsjAfPDQU69l8vq9wJt0BdtxqBO1t2M=; b=aqlPzecDOr0x0YrLKiqWFRcN0riQZub9wESJ9ibSgfiNcnlId1qvf07+RjIkQEAljO Sj3zwXcgYgyU0dLb8nGkQljEXLCZMVx61EM+YLPdyecSL4pezMER7Q3+SiY/vGSOao9u 5nEflq4Qx65JwUSQkPbzuhVwBDTPVg0U1brqJjgojbCo48snJrkMv37C0CDajtYVjxZe MfxsUEqZMuqPeYoSJ+VXqOZuhZypYhCGnZrMuGKIt/pi8R36WuJuXn+5SiB4NYlbPpQ6 OyRD8jrgtU8p/TBTJpC5ChCDuo+73yoFLQQFc02Ysg55oqd4/YSS68eo5M8ON/jIIO4H PjiA== 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 f64-v6si5671457pfa.252.2018.05.17.09.45.18; Thu, 17 May 2018 09:45:32 -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 S1752810AbeEQQnf (ORCPT + 99 others); Thu, 17 May 2018 12:43:35 -0400 Received: from ou.quest-ce.net ([195.154.187.82]:36022 "EHLO ou.quest-ce.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbeEQQnb (ORCPT ); Thu, 17 May 2018 12:43:31 -0400 X-Greylist: delayed 2568 seconds by postgrey-1.27 at vger.kernel.org; Thu, 17 May 2018 12:43:30 EDT Received: from lns-bzn-54-82-251-90-223.adsl.proxad.net ([82.251.90.223] helo=test.quest-ce.net) by ou.quest-ce.net with esmtpsa (TLS1.1:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1fJLKP-000CH4-4K; Thu, 17 May 2018 18:00:31 +0200 Message-ID: From: Yann Droneaud To: Dave Martin , linux-kernel@vger.kernel.org Cc: x86@kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , Michal Simek , Ralf Baechle , James Hogan , Greentime Hu , Vincent Chen , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Palmer Dabbelt , Albert Ou , Martin Schwidefsky , Heiko Carstens , Yoshinori Sato , Rich Felker , "David S. Miller" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Chris Zankel , Max Filippov , Michael Kerrisk Date: Thu, 17 May 2018 18:00:28 +0200 In-Reply-To: <1526480447-18185-1-git-send-email-Dave.Martin@arm.com> References: <1526480447-18185-1-git-send-email-Dave.Martin@arm.com> Organization: OPTEYA Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1 (3.28.1-2.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 82.251.90.223 X-SA-Exim-Mail-From: ydroneaud@opteya.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on ou.quest-ce.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Subject: Re: [RFC PATCH] UAPI: Document auxvec AT_* namespace policy and note reservations X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ou.quest-ce.net) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Le mercredi 16 mai 2018 à 15:20 +0100, Dave Martin a écrit : > There are constraints on defining AT_* auxvec tags that are not > obvious to the casual maintainer of either the global > or the arch-specific headers. This is likely > to lead to mistakes. (I certainly fell foul of it...) > > For the benefit of future maintainers, this patch collects the > relevant information in one place, documenting how the namespace > needs to be managed, and noting all the values currently in use. > > Maintaining a global list may result in some merge conflicts, but > AT_* values are not added frequently. I'm open to suggestions on > the best approach. > > I also assume that values 38 and 39 may have been used for > historical purposes, such as an architecture that is no longer > supported. If they have definitely never been used for anything, > they could be removed from the "reserved" list. > Some of those AT_* values are described in getauxval(3) man-page: http://man7.org/linux/man-pages/man3/getauxval.3.html https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/man3/g etauxval.3?id=4eae8eb731386d81797d5c30365426722410874e And glibc provides with definitions for almost all AT_*, regardless of the current target architecture: https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/elf.h;h=954f3266f7 11ab83996670ea504a17dcf668e061;hb=23158b08a0908f381459f273a984c6fd32836 3cb#l1135 Also, despite not being listed as a reserved namespace by POSIX, one should try to avoid name collision with other AT_ constants, those used with *at() functions (openat(), etc.): - AT_EACCESS - AT_EMPTY_PATH - AT_FDCWD - AT_NO_AUTOMOUNT - AT_REMOVEDIR - AT_STATX_DONT_SYNC - AT_STATX_FORCE_SYNC - AT_STATX_SYNC_AS_STAT - AT_SYMLINK_FOLLOW - AT_SYMLINK_NOFOLLOW http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.htm l#tag_15_02_02 https://sourceware.org/git/?p=glibc.git;a=blob;f=io/fcntl.h;h=3d239e8f0 9f7ce0a3106621be327e1ea4cd1a3e7;hb=23158b08a0908f381459f273a984c6fd3283 63cb#l142 And there's also AT_ANYNET and AT_ANYNODE from ddp (aka. AppleTalk) http://man7.org/linux/man-pages/man7/ddp.7.html Regards. -- Yann Droneaud OPTEYA