From owner-freebsd-arch@freebsd.org Sat Sep 9 16:18:31 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A80E3E1F482 for ; Sat, 9 Sep 2017 16:18:31 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 937AF6E83B for ; Sat, 9 Sep 2017 16:18:31 +0000 (UTC) (envelope-from julian@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 8FD5DE1F481; Sat, 9 Sep 2017 16:18:31 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F7C6E1F480 for ; Sat, 9 Sep 2017 16:18:31 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 54FB66E83A; Sat, 9 Sep 2017 16:18:30 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (106-68-193-181.dyn.iinet.net.au [106.68.193.181]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v89GIQZI006043 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 9 Sep 2017 09:18:29 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: ELF auxiliary vector tags To: John Baldwin , arch@freebsd.org References: From: Julian Elischer Message-ID: <6a29f889-016e-5a72-4124-7c58b605cf6c@freebsd.org> Date: Sun, 10 Sep 2017 00:18:20 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Sep 2017 16:18:31 -0000 On 9/9/17 1:36 am, John Baldwin wrote: > Currently, each architecture defines a list of auxiliary vector tag values (AT_*) > in the respective . Most of these lists are identical except that > powerpc is missing AT_GID and AT_EGID and all the of the vectors after those two > are thus N-2 on powerpc compared to all our other architectures. > > I noticed this while working on patches to add AT_HWCAP for ARM which debuggers > can use to determine the layout of VFP registers (and which might have other > uses at runtime). > > I'd like to move AT_* to sys/elf_common.h to have a single list across all > platforms (the auxv parsing code in GDB for FreeBSD already assumes the list of > AT_* values is identical across all platforms on FreeBSD). However, it would be > convenient it powerpc could be updated to use the same values as all other > platforms. This would probably be a flag day for powerpc (breaking all existing > binaries) if we did it though, so I'm not sure if we can do that? I know Justin > changed time_t to 64-bit on 32-bit powerpc which effectively broke 32-bit > powerpc earlier, but this change would break both 32-bit and 64-bit powerpc and > is probably more disruptive (in theory some binaries might have worked with a > wrong time_t, but renumber AT_STACKPROT, etc. will probably break every binary). > > Does anyone object to making AT_* MI, and if not, can we "break" powerpc or do > we need to preserve the AT_* values on powerpc? > I'm guessing it would require a 2 or 3 step process over quite a long time period. An alias for each of the entries about the one s you mention, while still supporting the ones in old binaries and then after a couple of years removing the originals, and then after a couple of years more, moving them to the new locations (with maybe some cookie change to declare old binaries unrunable or maybe something as radical a separate image executor.