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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 691D0C47094 for ; Thu, 10 Jun 2021 15:41:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 53BAF613E3 for ; Thu, 10 Jun 2021 15:41:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231734AbhFJPnG (ORCPT ); Thu, 10 Jun 2021 11:43:06 -0400 Received: from foss.arm.com ([217.140.110.172]:34884 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbhFJPnD (ORCPT ); Thu, 10 Jun 2021 11:43:03 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A207B1396; Thu, 10 Jun 2021 08:41:06 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 502E23F719; Thu, 10 Jun 2021 08:41:05 -0700 (PDT) Date: Thu, 10 Jun 2021 16:40:04 +0100 From: Dave Martin To: Mark Brown Cc: Catalin Marinas , Will Deacon , Szabolcs Nagy , Jeremy Linton , "H . J . Lu" , Yu-cheng Yu , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, libc-alpha@sourceware.org Subject: Re: [PATCH v2 3/3] elf: Remove has_interp property from arch_adjust_elf_prot() Message-ID: <20210610154004.GQ4187@arm.com> References: <20210604112450.13344-1-broonie@kernel.org> <20210604112450.13344-4-broonie@kernel.org> <20210609151724.GM4187@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Thu, Jun 10, 2021 at 02:34:03PM +0100, Mark Brown wrote: > On Wed, Jun 09, 2021 at 04:17:24PM +0100, Dave Martin wrote: > > On Fri, Jun 04, 2021 at 12:24:50PM +0100, Mark Brown wrote: > > > > Since we have added an is_interp flag to arch_parse_elf_property() we can > > > drop the has_interp flag from arch_elf_adjust_prot(), the only user was > > > the arm64 code which no longer needs it and any future users will be able > > > to use arch_parse_elf_properties() to determine if an interpreter is in > > > use. > > > So far so good, but can we also drop the has_interp argument from > > arch_parse_elf_properties()? > > > Cross-check with Yu-Cheng Yu's series, but I don't see this being used > > any more (except for passthrough in binfmt_elf.c). > > > Since we are treating the interpreter and main executable orthogonally > > to each other now, I don't think we should need a has_interp argument to > > pass knowledge between the interpreter and executable handling phases > > here. > > My thinking was that it might be useful for handling of some > future property in the architecture code to know if there is an > interpreter, providing the information at parse time would let it > set up whatever is needed. We've been doing this with the arm64 > BTI handling and while we're moving away from doing that I could > imagine that there may be some other case where it makes sense, > and it sounds like CET is one. It might be useful, but if the use cases are purely hypothetical then it would still seem preferable to remove it so that it doesn't just hang around forever as cruft. I guess we need to wait and see whether x86 really needs this, or just uses it as a side-effect of following the arm64 code initially. If it is quicker to stabilise this series heeping the has_interps in, then I guess we have the option to do that and remove them later on once we're satisfied they're unlikely to be useful (or not). Cheers ---Dave 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 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3362C47094 for ; Thu, 10 Jun 2021 15:42:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 91720613AE for ; Thu, 10 Jun 2021 15:42:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91720613AE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding: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-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V5LxI60kZTzTBcDSmHVDAVRxniIqCNrGh/xyNqMgJlY=; b=FfwHMduFXBR+U3 zJrQYYDDJyk5Ub0R948kgjipG0RcYnziNduS7eXZ0cgQNFMep+hhgBJTG9B93tb6022YGSEkiu7VW 9jtuYSwZkGfz7U1WOuYJf+nI2q4AT4chLkPI7jLb24QoiECzFkYJDx2OOqXlLT/wwIu2p/Rmn2C8A fEJk7rao0GIBp03j6cgyGoBd63iXwiTC/whufSKpswwl7ngi5DAdIMh8Z4SVfcaxErykyws6oaEE2 SYfzIEa+VywcuPh9NpE3/g5VHD7Zdm/VmQR5PJpJAK4pDL6UgSfYKcTlDvgV4Kqzfc/yCt5RyhGWl hC4veDcgY9zGzl8guy0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrMnv-001OZH-5S; Thu, 10 Jun 2021 15:41:11 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrMnr-001OYI-Cw for linux-arm-kernel@lists.infradead.org; Thu, 10 Jun 2021 15:41:08 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A207B1396; Thu, 10 Jun 2021 08:41:06 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 502E23F719; Thu, 10 Jun 2021 08:41:05 -0700 (PDT) Date: Thu, 10 Jun 2021 16:40:04 +0100 From: Dave Martin To: Mark Brown Cc: Catalin Marinas , Will Deacon , Szabolcs Nagy , Jeremy Linton , "H . J . Lu" , Yu-cheng Yu , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, libc-alpha@sourceware.org Subject: Re: [PATCH v2 3/3] elf: Remove has_interp property from arch_adjust_elf_prot() Message-ID: <20210610154004.GQ4187@arm.com> References: <20210604112450.13344-1-broonie@kernel.org> <20210604112450.13344-4-broonie@kernel.org> <20210609151724.GM4187@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210610_084107_506633_EF968B66 X-CRM114-Status: GOOD ( 26.36 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jun 10, 2021 at 02:34:03PM +0100, Mark Brown wrote: > On Wed, Jun 09, 2021 at 04:17:24PM +0100, Dave Martin wrote: > > On Fri, Jun 04, 2021 at 12:24:50PM +0100, Mark Brown wrote: > > > > Since we have added an is_interp flag to arch_parse_elf_property() we can > > > drop the has_interp flag from arch_elf_adjust_prot(), the only user was > > > the arm64 code which no longer needs it and any future users will be able > > > to use arch_parse_elf_properties() to determine if an interpreter is in > > > use. > > > So far so good, but can we also drop the has_interp argument from > > arch_parse_elf_properties()? > > > Cross-check with Yu-Cheng Yu's series, but I don't see this being used > > any more (except for passthrough in binfmt_elf.c). > > > Since we are treating the interpreter and main executable orthogonally > > to each other now, I don't think we should need a has_interp argument to > > pass knowledge between the interpreter and executable handling phases > > here. > > My thinking was that it might be useful for handling of some > future property in the architecture code to know if there is an > interpreter, providing the information at parse time would let it > set up whatever is needed. We've been doing this with the arm64 > BTI handling and while we're moving away from doing that I could > imagine that there may be some other case where it makes sense, > and it sounds like CET is one. It might be useful, but if the use cases are purely hypothetical then it would still seem preferable to remove it so that it doesn't just hang around forever as cruft. I guess we need to wait and see whether x86 really needs this, or just uses it as a side-effect of following the arm64 code initially. If it is quicker to stabilise this series heeping the has_interps in, then I guess we have the option to do that and remove them later on once we're satisfied they're unlikely to be useful (or not). Cheers ---Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel