Re: [RFC PATCH] UAPI: Document auxvec AT_* namespace policy and note reservations

From: Rich Felker
Date: Wed May 16 2018 - 10:56:46 EST


On Wed, May 16, 2018 at 03:20:47PM +0100, Dave Martin wrote:
> There are constraints on defining AT_* auxvec tags that are not
> obvious to the casual maintainer of either the global
> <uapi/linux/auxvec.h> 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.

On the userspace side (elf.h) all the AT_* constants are in one file.
Why don't we just do the same here and eliminate the
arch/*/include/uapi/asm/auxvec.h files and likewise the need to
manually maintain consistency of the comments about reservations?

If there are reasons not to do that, I'm not opposed to this patch
as-is.

Rich