Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE4B6C43334 for ; Wed, 29 Jun 2022 11:45:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sHFbTFHOZW5ZH/p861NW/1a3gSEX3TeYyJs+EXPiN60=; b=li1BEhncaR1Qs2F56S5iX6HFJZ BWEr1j5B6leIk1RGJavtgtzPpvX7k+EeU+odRkfuj17rMC4d+VuoRGKtrjz1+5G9GxqMJNO/09JpE FYJbQIuoOWUyaN9EReFg9NTcZRRXCXXK8aZqgOiKyIEni7Pu21kjNHdM/GwxgROeqPkcT/5CfQfCe rYMwmLah9P+vxgCm65FQ5BR/c6LoOAeAcmDLCsuEBTKydbI0U8s7kUTX+iYVUBKSClQWpKbp0qLkW NMTYo56Bwu9qYKwEzt1xLCADksN4afIEnWe/J1o4ML70Hz+PWxc002PPKGvN7kPtZeJpD05uW0Lhe LdDBaOSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6W7p-00BY8S-Ag; Wed, 29 Jun 2022 11:44:54 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6W7M-00BXsg-7J for linux-arm-kernel@lists.infradead.org; Wed, 29 Jun 2022 11:44:25 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5B79B61A04; Wed, 29 Jun 2022 11:44:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D772C34114; Wed, 29 Jun 2022 11:44:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656503062; bh=pyS6WqjrAKdmR+9RwDG1VjmGWI1+yU+BF0cTQFgSO8k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=d2+ARPqwarVKJeKYk1NEkrvZi4mpExv3n1T4xyVJC1FepXe5jsHmAZOHXvImG02w2 lgUnfXZT89gh2bnf9XAKR6fFPme8xx7sQ/y1MS1FVLfnkcfOkZ+7QZ74TAlpgkWzSs 42mftCS7WRaiK6j3lJbjLBA3waRSd8S7MdKERi4zLwUAl3GAV9Tk5rKIb72mg8vhOB +C9Xqs6xS6t8cT5Y29ZFWP1t4k0HKfXYgwZsr2wsHmhrs0BAiu7jhTjG071Nccf+WB cTqwvvinzWmDbOXwZJ46dzpC6oAzW0ZVGXQZw0GTOeTKnnu1yXvJkd+B/Pem8VpXw5 LAN2hrVN37X/w== Date: Wed, 29 Jun 2022 12:44:18 +0100 From: Mark Brown To: Szabolcs Nagy Cc: Will Deacon , Catalin Marinas , Eric Biederman , Kees Cook , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 1/4] arm64/cpufeature: Store elf_hwcaps as an array rather than unsigned long Message-ID: References: <20220620125451.653507-1-broonie@kernel.org> <20220620125451.653507-2-broonie@kernel.org> <20220628142124.GB24116@willie-the-truck> MIME-Version: 1.0 In-Reply-To: X-Cookie: Booths for two or more. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220629_044424_404863_A475CAB1 X-CRM114-Status: GOOD ( 29.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============9097630125804392428==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============9097630125804392428== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FsZCvQjUVXQ2rLyf" Content-Disposition: inline --FsZCvQjUVXQ2rLyf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 29, 2022 at 11:01:43AM +0100, Szabolcs Nagy wrote: > the reason i slightly preferred AT_HWCAP3 was that AT_HWCAP > is a bit special in ld.so: library lookups can depend on a > glibc internal 64bit "hwcap" value that is historically > AT_HWCAP but since that does not use all bits, some targets > reused the top bits for high level platform abis which we > may want to do on aarch64 too. it should be possible to make > "hwcap" separate from AT_HWCAP (i.e. the bottom 32bits of > "hwcap" just happens to come from AT_HWCAP but the top is > defined by glibc), but that would be awkward to do in the > ld.so code if AT_HWCAP started using the top bits too. > (i think we cannot change the "hwcap" bits once they are > allocated because they are in the ld.so.cache file.) So when you were saying that bits 62 and 63 were reserved it's actually potentially all the top 32 bits but only in plain AT_HWCAP? > so the options are: > - AT_HWCAP3. (the only option that's ilp32 compatible.) It's also a precedent we can follow when we run out of bits again which does seem like a thing that will plausibly happen. > - start using top bits of AT_HWCAP2 but not of AT_HWCAP. > (this is the least amount of work for now) > - i go and fix ld.so code so top bits of internal "hwcap" > are independent of AT_HWCAP. (we might need to bump the > ld.so.cache file format version for this, which happened > 22 years ago last time.. this needs more investigation) This does sound like disproportionate effort TBH. > - start using AT_HWCAP top bits and we don't care about > the future of "hwcap" ld.so feature. this is rarely used, > but i think it may become useful. e.g. it would allow us > to define a new base line arch abi for distros (so they > can ship some libs built twice: once for base armv8.0 and > once for the new base line and ld.so would pick the right > lib based on hwcaps/feature checks). i would avoid this. --FsZCvQjUVXQ2rLyf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmK8OxEACgkQJNaLcl1U h9DDeAf8DN+Xrw3sN4RhAawV4HX6hZqPq7yHM7g0Oi4eTIDGgu85nrNc+p6h4a9K u0ekn0nQ2hBzM9qclcix11wCpW3f8ueOYN59fX8rKhdS3PqVyz3xpSL3CqGKPUtD JZPz2F/XAL/Yz/OBwB76BUflfshXNNpPY7zBLCn7vmCqFZ4Fkbh2Zt9xeD5JSJNP PnWELWNLeuyiGrpEJ3Z1RzWE3qVY8ntGkUXxqpmEOBMS9kHgpSum9iHocJj/KK79 9nm2r2/MppzzmgrInKFQZftm0lEBZ21/hED0gEkyr/sEYiT51yMZCoh1jXaMhsYP VTYdpVZ5hCAsmXIrBNAql75X4S3W4Q== =3KjU -----END PGP SIGNATURE----- --FsZCvQjUVXQ2rLyf-- --===============9097630125804392428== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============9097630125804392428==--