From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5366EC433EF for ; Tue, 8 Mar 2022 12:21:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236602AbiCHMWL (ORCPT ); Tue, 8 Mar 2022 07:22:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244739AbiCHMWL (ORCPT ); Tue, 8 Mar 2022 07:22:11 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E14884507F for ; Tue, 8 Mar 2022 04:21:14 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 8B178B8189F for ; Tue, 8 Mar 2022 12:21:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A69FC340EB; Tue, 8 Mar 2022 12:21:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646742072; bh=KTP0EyNkT6c0ZeITjTnlyxXXHObFRSLXNLnpc2z3MgU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=s2FsfIoPcq5/HsoYc8XdL7m5Xwaf4NF/D53HgdT7MQz2eNAtuebxlmsXc3aQaPNBc PtcVDTProzaM89ezLSi+4to3EYsHiaqvfhuzApGU0swLNpNTgMYB60j63Qoz2JUR1X 2Rz8zAhaGjGaXu3AQt1I85lOmDhP82Zg00sBDpBUSEEaduYqGJe/sBGOaxSN5YZHsf h7upD2tTT6yYCu1gWXb5lKMhdRE6aNX3XBbCjogkjEbTz6OlWlneDRYnmrg+TtFJru Nwuhl+2XpfFqb6mXBmBv86BvG6xt6HNtcsvufisjGuASyhFijlOhjh5tb3NdlOzh3H uexWR8KAw3QXA== Date: Tue, 8 Mar 2022 12:21:04 +0000 From: Mark Brown To: Kees Cook Cc: Catalin Marinas , Will Deacon , Szabolcs Nagy , Jeremy Linton , "H . J . Lu" , Yu-cheng Yu , Eric Biederman , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, libc-alpha@sourceware.org, Dave Martin Subject: Re: [PATCH v10 1/2] elf: Allow architectures to parse properties on the main executable Message-ID: References: <20220228130606.1070960-1-broonie@kernel.org> <20220228130606.1070960-2-broonie@kernel.org> <202203071551.DBABE01@keescook> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nspsNZs5QU34na1d" Content-Disposition: inline In-Reply-To: <202203071551.DBABE01@keescook> X-Cookie: Dental health is next to mental health. Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org --nspsNZs5QU34na1d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 07, 2022 at 04:00:15PM -0800, Kees Cook wrote: > On Mon, Feb 28, 2022 at 01:06:05PM +0000, Mark Brown wrote: > > static inline int arch_parse_elf_property(u32 type, const void *data, > > size_t datasz, bool compat, > > + bool has_interp, bool is_interp, > > struct arch_elf_state *arch) > Adding more and more args to a functions like this gives me the sense > that some kind of argument structure is needed. > Once I get enough unit testing written in here, I'm hoping to refactor > a bunch of this. To the future! :) Yes, this code is not lovely. I'll leave cleanups to future work though, it seems out of scope here and I'm not sure how good an idea it is to do too much without more solid testing. --nspsNZs5QU34na1d Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmInSi8ACgkQJNaLcl1U h9C0+Qf/VvMWAajMDoxXD1JjLDqmzUdmWkqhXBT0nF0f5AuhUNhzzD903PbsCtSu X9WgiMARxaf8Iz1dwGOwAg/FKXZqYTId/6UTFAS93DYjbIYA5QRK0NlMF7KzYBLN 2gNAJZ+1QbAaOA5mpYr+KMdsXjl3b9AIMD3Rkc7BbJGViM3I0BhxMyFrqpu3BqAA fz5L/NzVa6NghfMPWINXL4SuhuxMtzkqZsupo4uhgGVNcWEHViAk64B0XvVUmBOP qP3e+1JbnMMlKjk2x3L3YxGLzWOW1laSERyVnnxQXHJPWUpIdHn4ytl8X+2/o2g/ wjVQAV7QkWUvfgVut424HnhuZX6Fww== =6C4G -----END PGP SIGNATURE----- --nspsNZs5QU34na1d-- From mboxrd@z Thu Jan 1 00:00:00 1970 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 C53FFC433EF for ; Tue, 8 Mar 2022 12:22:32 +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=mUZyQNoHu88PIwTm0em2PURZ/A7P04dOcoMRDkxPstw=; b=I4RWuBdfYWVYOv1Tab1mT+AGvi rsXhyW8ESQ4Gp1cJYejhV2w30BYTmVG7B9Mg2P1njjUYvJ3ugt6sCPtLUQeDjwksSkMIsy54WVpW9 XgC8eoFWLQYL+9vDdhb02/HBvorWvc+e+Q1Ib9xtNiKu89/NlsY23Y3iXaGA7kdhCPp1YAtPD3MOy t3cBLAmD7d4nHqScPohZ78sQygMowRd2xaUEF+UziMRLm7ktk07d835qlmqT61unbtyUIMTw5mnqa SyHnHeEtQrmfQuxIT6cdr2+cUmRx98B1yVH9VkY+VSFJa+N8TQFNWDFo+xJGReAZ3Mi0WA1nySGZK eL5VpXvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRYq9-004Kpw-2b; Tue, 08 Mar 2022 12:21:21 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRYq3-004KlN-4o for linux-arm-kernel@lists.infradead.org; Tue, 08 Mar 2022 12:21:16 +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 ams.source.kernel.org (Postfix) with ESMTPS id A0036B818A5; Tue, 8 Mar 2022 12:21:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A69FC340EB; Tue, 8 Mar 2022 12:21:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646742072; bh=KTP0EyNkT6c0ZeITjTnlyxXXHObFRSLXNLnpc2z3MgU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=s2FsfIoPcq5/HsoYc8XdL7m5Xwaf4NF/D53HgdT7MQz2eNAtuebxlmsXc3aQaPNBc PtcVDTProzaM89ezLSi+4to3EYsHiaqvfhuzApGU0swLNpNTgMYB60j63Qoz2JUR1X 2Rz8zAhaGjGaXu3AQt1I85lOmDhP82Zg00sBDpBUSEEaduYqGJe/sBGOaxSN5YZHsf h7upD2tTT6yYCu1gWXb5lKMhdRE6aNX3XBbCjogkjEbTz6OlWlneDRYnmrg+TtFJru Nwuhl+2XpfFqb6mXBmBv86BvG6xt6HNtcsvufisjGuASyhFijlOhjh5tb3NdlOzh3H uexWR8KAw3QXA== Date: Tue, 8 Mar 2022 12:21:04 +0000 From: Mark Brown To: Kees Cook Cc: Catalin Marinas , Will Deacon , Szabolcs Nagy , Jeremy Linton , "H . J . Lu" , Yu-cheng Yu , Eric Biederman , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, libc-alpha@sourceware.org, Dave Martin Subject: Re: [PATCH v10 1/2] elf: Allow architectures to parse properties on the main executable Message-ID: References: <20220228130606.1070960-1-broonie@kernel.org> <20220228130606.1070960-2-broonie@kernel.org> <202203071551.DBABE01@keescook> MIME-Version: 1.0 In-Reply-To: <202203071551.DBABE01@keescook> X-Cookie: Dental health is next to mental health. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220308_042115_384192_DAE6D338 X-CRM114-Status: GOOD ( 16.12 ) 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="===============5220924176286514408==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5220924176286514408== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nspsNZs5QU34na1d" Content-Disposition: inline --nspsNZs5QU34na1d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 07, 2022 at 04:00:15PM -0800, Kees Cook wrote: > On Mon, Feb 28, 2022 at 01:06:05PM +0000, Mark Brown wrote: > > static inline int arch_parse_elf_property(u32 type, const void *data, > > size_t datasz, bool compat, > > + bool has_interp, bool is_interp, > > struct arch_elf_state *arch) > Adding more and more args to a functions like this gives me the sense > that some kind of argument structure is needed. > Once I get enough unit testing written in here, I'm hoping to refactor > a bunch of this. To the future! :) Yes, this code is not lovely. I'll leave cleanups to future work though, it seems out of scope here and I'm not sure how good an idea it is to do too much without more solid testing. --nspsNZs5QU34na1d Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmInSi8ACgkQJNaLcl1U h9C0+Qf/VvMWAajMDoxXD1JjLDqmzUdmWkqhXBT0nF0f5AuhUNhzzD903PbsCtSu X9WgiMARxaf8Iz1dwGOwAg/FKXZqYTId/6UTFAS93DYjbIYA5QRK0NlMF7KzYBLN 2gNAJZ+1QbAaOA5mpYr+KMdsXjl3b9AIMD3Rkc7BbJGViM3I0BhxMyFrqpu3BqAA fz5L/NzVa6NghfMPWINXL4SuhuxMtzkqZsupo4uhgGVNcWEHViAk64B0XvVUmBOP qP3e+1JbnMMlKjk2x3L3YxGLzWOW1laSERyVnnxQXHJPWUpIdHn4ytl8X+2/o2g/ wjVQAV7QkWUvfgVut424HnhuZX6Fww== =6C4G -----END PGP SIGNATURE----- --nspsNZs5QU34na1d-- --===============5220924176286514408== 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 --===============5220924176286514408==--