Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2003784rwr; Fri, 28 Apr 2023 05:04:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5+gN7NVb1i86RYNSODmxhdgGJFJuyS8jMqGnLQq12TMXpfVTrESTZ+sy2P0isK/Q1gGbi5 X-Received: by 2002:a0d:e645:0:b0:54f:b89e:1010 with SMTP id p66-20020a0de645000000b0054fb89e1010mr3453692ywe.23.1682683451567; Fri, 28 Apr 2023 05:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682683451; cv=none; d=google.com; s=arc-20160816; b=OkfKS3AHrq7umwyzZJkbW6Ynn+3Xp+gW0nHGriUugHZfRCM1tl8rOAfGFvmt2FLjNB dcLqhOCu3ignNma+d1X3YTRnoRMGy7uHZkkaTHHSLJDvuKkOSurc6R8ULdOAeZV8eQSD h+goAICKK5N1mpDPJZvmrWzQAqZ9PBCIg7D3XhJaK15Zs7kb8ZzKUdRQBdO80wsOcZ7Z IKDLlm9F73mWa0OnujrFk1CdcVqkYe+njCkhCP9is7jFonK33fsf1W5V70x6B+6l89RC a4X0jt4YEdrCIChrHtQBgszpauUqqYO7GNTF+St4DiNfjM1yr8I0MA9S67auSJ7NvVox 9CnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=jnR4CSqVS3G6bj5l51ubeP2a/gNZyaXkFCxj2czxSgI=; b=zu8AGeWm/KfBubYf7h5QMKDq4buCnj/G0buAi4Xwo6tUCIZUFiYTQbHg9CXREGxAzm 1DTIAQPPI3JVYRtwSKy0w40H8nMBFzM+qTqXfmrApvvVx4LgUIQENU4WaHgTEjB3iAAX OpRjhj86euLcM8sVVDH0f1l02OIMSrpIdygLwr8Mrbo/LSf1U0Spr8CeBGTig3x0g9jM V+FUc/s19D1CKvg88892tsznshGU1Nsr5qQPHUCrRKSHOc8GWA0hUBrcOSa7RtGdszRv m5I+H+Wq17Y6iLew3oCFECsX4E+bkA1q8zH+g+1RFtMxaoJF+pnhgmlq9BlwPQwppSGT E5ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w11-20020a81620b000000b0053c39fe11a5si15727178ywb.499.2023.04.28.05.03.55; Fri, 28 Apr 2023 05:04:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbjD1LtD (ORCPT + 99 others); Fri, 28 Apr 2023 07:49:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbjD1Ls6 (ORCPT ); Fri, 28 Apr 2023 07:48:58 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E59672713 for ; Fri, 28 Apr 2023 04:48:55 -0700 (PDT) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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,