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 B4EC2C77B61 for ; Fri, 28 Apr 2023 11:49:49 +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-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=TIgfjVmtDEMFQaoFarSObFFWw3BWoPnFSBKAlCyf/Qc=; b=LONU3Mw5+oFPlM 1LKhX1fmtWqoZZ/PkYUjE6VEg11bMjiEJdcAn3UwmBsXBh3ZoAK9lU1B0jBacoTwfcf5HnV+VvRVa HsziGKYmdoe/Go/05nV1UacKeZjRBUUnU2lyM5r+mOHPiWFcFQjkvsNs52sxxB1Ixdb5jHOVV3JCF MoWIFh5bZ/JwoLCygBqxuKYkUVIPbAU5gcw491Qj+fx+9vLJS2sAkMJzlryj9GSWKAbMRLm2v7Gpg hCcDM73WNQp/GN/y6NmG972SzIBTze136Hq1xu2TElGtGuWSKs2ibk+xeEv7nquLJJVeM47OrXlcr +vVSF4PhrSDZxoFTMggQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1psMb3-009PIr-17; Fri, 28 Apr 2023 11:49:05 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1psMb0-009PFJ-0M for linux-arm-kernel@lists.infradead.org; Fri, 28 Apr 2023 11:49:03 +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 8361EC14; Fri, 28 Apr 2023 04:49:39 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.21.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1C2113F5A1; Fri, 28 Apr 2023 04:48:53 -0700 (PDT) Date: Fri, 28 Apr 2023 12:48:47 +0100 From: Mark Rutland To: Ard Biesheuvel Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Marc Zyngier , Ryan Roberts , Anshuman Khandual , Kees Cook Subject: Re: [PATCH v3 01/60] arm64: kernel: Disable latent_entropy GCC plugin in early C runtime Message-ID: References: <20230307140522.2311461-1-ardb@kernel.org> <20230307140522.2311461-2-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230428_044902_228013_27B6E562 X-CRM114-Status: GOOD ( 21.22 ) 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 Fri, Apr 28, 2023 at 11:54:16AM +0100, Ard Biesheuvel wrote: > On Fri, 28 Apr 2023 at 11:38, Mark Rutland wrote: > > > > On Tue, Mar 07, 2023 at 03:04:23PM +0100, Ard Biesheuvel wrote: > > > Avoid build issues in the early C code related to the latent_entropy GCC > > > plugin, by incorporating the C flags fragment that disables it. > > > > > > Signed-off-by: Ard Biesheuvel > > > > Just to check, are you seeing issues today? IIUC the plugin only instruments > > functions which are explicitly marked with __latent_entropy, and if we're > > seeing that happen unexpectedly (or due to that being applying to __meminit / > > __init), we might need to do likewise for other noinstr code. > > > > I don't quite remember, tbh, but it is unlikely that I would have > written or included this patch without having run into some actual > issue. Sure. Looking at the series, from patch 15 onwards you mark portions of the PI code as __init. As __init currently implies __latent_entropy (which I think is a bit crazy as of itself...), that's why this'll start to fail. It would be nice if we could mention that in the commit message, e.g. | In subsequent patches we'll mark portions of the early C code as __init. | Unfortunarely, __init implies __latent_entropy, and this would result in the | early C code being instrumented in an unsafe manner. | | Disable the latent entropy plugin for the early C code. ... though my ack stands regardless of whether we add such wording. Mark. > > Regardless, for this patch: > > > > Acked-by: Mark Rutland > > > > Thanks, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel