From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH v3 02/12] ELF: Add ELF program property parsing support Date: Wed, 11 Dec 2019 13:58:03 +0000 Message-ID: <20191211135803.GD3870@sirena.org.uk> References: <1571419545-20401-1-git-send-email-Dave.Martin@arm.com> <1571419545-20401-3-git-send-email-Dave.Martin@arm.com> <201910291611.69822D5E04@keescook> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3Gf/FFewwPeBMqCJ" Return-path: Content-Disposition: inline In-Reply-To: <201910291611.69822D5E04@keescook> Sender: linux-kernel-owner@vger.kernel.org To: Kees Cook Cc: Dave Martin , Paul Elliott , Peter Zijlstra , Catalin Marinas , Yu-cheng Yu , Amit Kachhap , Vincenzo Frascino , Will Deacon , linux-arch@vger.kernel.org, Marc Zyngier , Eugene Syromiatnikov , Szabolcs Nagy , "H.J. Lu" , Andrew Jones , Arnd Bergmann , Jann Horn , Richard Henderson , Kristina =?utf-8?Q?Mart=C5=A1enko?= , Thomas Gleixner , linux-arm-kernel@lists.infradead.org List-Id: linux-arch.vger.kernel.org --3Gf/FFewwPeBMqCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Oct 29, 2019 at 04:14:47PM -0700, Kees Cook wrote: > On Fri, Oct 18, 2019 at 06:25:35PM +0100, Dave Martin wrote: A bit of a delay, sorry - I've taken this series over from Dave and wasn't on the CC so only just saw this. > > +#ifndef ELF_COMPAT > > +#define ELF_COMPAT 0 > > +#endif > Why is "compat" interesting for the arch_ callback? Shouldn't just the > unsigned long size be needed? The set of properties handled or how they should be handled may vary depending on the ABI. For example arm64 supports BTI only for AArch64 but not for AArch32 so we should only handle the property for BTI for AArch64 binaries. --3Gf/FFewwPeBMqCJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl3w9eoACgkQJNaLcl1U h9BmBgf+NNNCMclmwLDa2ZSVlL0/OBQcMH0ymsvXlLz6O8/LVbh/6UcTv2gnLRbZ 4/onE8sI1dHBBZCYuiHk3LVyQElzoci7ntsEO96/Ej4HGEGddSJcy841btZcJF+o qJD7ZnkU9MR6mk+9QNiJ1Op5JbHinr42IhFw7jdgMDzjc3/BRzOCATyUibraciEN bocm5+nKJVPYNXiWolMgRER+8JH8w7I52Agj6Ob0zjZOZi9SBuxFIXTMzVqrvnyX iLIi/RIUpxLAdnb0ZRnyowuwgMFQdX38HKBxi6WLO2hcK4HUtytWbgez6KjRpnga K5oQP5sxINKD2ERveqnVOuVM/CNbJA== =RBvh -----END PGP SIGNATURE----- --3Gf/FFewwPeBMqCJ-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com ([217.140.110.172]:59152 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727554AbfLKN6F (ORCPT ); Wed, 11 Dec 2019 08:58:05 -0500 Date: Wed, 11 Dec 2019 13:58:03 +0000 From: Mark Brown Subject: Re: [PATCH v3 02/12] ELF: Add ELF program property parsing support Message-ID: <20191211135803.GD3870@sirena.org.uk> References: <1571419545-20401-1-git-send-email-Dave.Martin@arm.com> <1571419545-20401-3-git-send-email-Dave.Martin@arm.com> <201910291611.69822D5E04@keescook> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3Gf/FFewwPeBMqCJ" Content-Disposition: inline In-Reply-To: <201910291611.69822D5E04@keescook> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Kees Cook Cc: Dave Martin , Paul Elliott , Peter Zijlstra , Catalin Marinas , Yu-cheng Yu , Amit Kachhap , Vincenzo Frascino , Will Deacon , linux-arch@vger.kernel.org, Marc Zyngier , Eugene Syromiatnikov , Szabolcs Nagy , "H.J. Lu" , Andrew Jones , Arnd Bergmann , Jann Horn , Richard Henderson , Kristina =?utf-8?Q?Mart=C5=A1enko?= , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Florian Weimer , linux-kernel@vger.kernel.org, Sudakshina Das Message-ID: <20191211135803.13wSWqHH-B_B_f38DRWWQkTa_sa3oNaa9C8mRgidOI0@z> --3Gf/FFewwPeBMqCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Oct 29, 2019 at 04:14:47PM -0700, Kees Cook wrote: > On Fri, Oct 18, 2019 at 06:25:35PM +0100, Dave Martin wrote: A bit of a delay, sorry - I've taken this series over from Dave and wasn't on the CC so only just saw this. > > +#ifndef ELF_COMPAT > > +#define ELF_COMPAT 0 > > +#endif > Why is "compat" interesting for the arch_ callback? Shouldn't just the > unsigned long size be needed? The set of properties handled or how they should be handled may vary depending on the ABI. For example arm64 supports BTI only for AArch64 but not for AArch32 so we should only handle the property for BTI for AArch64 binaries. --3Gf/FFewwPeBMqCJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl3w9eoACgkQJNaLcl1U h9BmBgf+NNNCMclmwLDa2ZSVlL0/OBQcMH0ymsvXlLz6O8/LVbh/6UcTv2gnLRbZ 4/onE8sI1dHBBZCYuiHk3LVyQElzoci7ntsEO96/Ej4HGEGddSJcy841btZcJF+o qJD7ZnkU9MR6mk+9QNiJ1Op5JbHinr42IhFw7jdgMDzjc3/BRzOCATyUibraciEN bocm5+nKJVPYNXiWolMgRER+8JH8w7I52Agj6Ob0zjZOZi9SBuxFIXTMzVqrvnyX iLIi/RIUpxLAdnb0ZRnyowuwgMFQdX38HKBxi6WLO2hcK4HUtytWbgez6KjRpnga K5oQP5sxINKD2ERveqnVOuVM/CNbJA== =RBvh -----END PGP SIGNATURE----- --3Gf/FFewwPeBMqCJ--