Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5779555rwr; Mon, 1 May 2023 10:35:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4HP9DRb7xVy1al358nhmcdPGV0lETdHwu+SegiCxHu6uiqyZAC3Z+MVYCGMDR1lZE/fJhq X-Received: by 2002:a17:90a:3e4d:b0:24e:209f:565 with SMTP id t13-20020a17090a3e4d00b0024e209f0565mr347322pjm.7.1682962528988; Mon, 01 May 2023 10:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682962528; cv=none; d=google.com; s=arc-20160816; b=aZZ5ZgbXtmqbGcrYymZx6bhkAdBqBJH0Tg1HnoqvqREBdh1oy0Aod8Y0ukUpJDyJcO zAR58tF3+WfOXnF8vAGR8SCvF6QGBsN1AkbIgzAUc/DFZnXyS+0NarsyETC4NCc+cpXC qiQp9YpXb3KMy9sSxxctqBOB+6ndyejCNAp3R6FKHh90+IfbiAsO8xhnEowJkZCQJKtg QlXEtkvRiiFm0kyjGpkVeV4Cg1k1JxFXaIRxPNVY0kqO6SqSAIIvkEqmRHi36952kKnM V/w26nu8exfnDrxOYAOO6A68KMpBvuYlvNR6CxzilLVwC5wSLJ69TArg9mJEbEf1mo2r GlxA== 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:dkim-signature; bh=ghPUh+FEKxBHa55+0VVbhMh8gebw4PN39iAnExsTgXs=; b=U8Nd+xdry9IWtjRFc6oBSGxEt/dU6Ab92rBxTfzuj/uq61D2DuoHIq9lI2DxtOPBGh DfpoCOdkDrCPUa/yV9ys9t5C2Uyo1U/phgABP1PRhx9PZd8sd77lzf+oI2AZVQVBAVnl jMDapK0nWfvJoPmiWtIAn0Tj/Jo/1FGmWWdI5sjSBHiR7uQGM6bjzakDu5svatA88HdQ 8kNzKZC/7JWVnCJdi53DlS5ICXkzNksiJMCaA3KSEC4JhCuP4UJjHyVz32fArluP6MK7 zLN0RIZVBuBfu/FiispYuLrL9dK3rvLeVGqlygUHtP/qO6GsSdtudyrYzXykCYBuPlTj nBAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PutcNnBd; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n5-20020a17090ac68500b0024e0d0ebda1si1724237pjt.75.2023.05.01.10.35.15; Mon, 01 May 2023 10:35:28 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PutcNnBd; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232262AbjEAR2u (ORCPT + 99 others); Mon, 1 May 2023 13:28:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229861AbjEAR2t (ORCPT ); Mon, 1 May 2023 13:28:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91ADEAF; Mon, 1 May 2023 10:28:48 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 2D9A361171; Mon, 1 May 2023 17:28:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4347C433D2; Mon, 1 May 2023 17:28:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682962127; bh=CCSTeAPcL5yImgmfoxnZrX1sA47trLTyNX0j7mIfZ/M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PutcNnBdjLULXG6S59IVCtwQBmr3y3j8vCFtgAQbV1danI+KBSpxetCDcUWMk76XR VHaBzrrJyNO/u2PiM/AwJjPara6HwY7WlkI5grnZFJVHswbKr2+EK/TjAQvPKiBKWp /i21RhHdlV88cDkP/q5+p3pciECYlmZNQy18htMnfclSogFk/6zsItTi4hFnoKTwx3 XL1kDaW6JYq8YtONw3NoRYlQYSaxxUrzuBEME6i4YI16mRQE+1/vSvu+k/sAFyJkZM GTgiWQyqzu7J7xg+JlG8dyA+1ax+u10cV3jVxQ5xBiaUUoDq6Uu651hVo1itlD7KlX R2oK2PBSBPiJA== Date: Mon, 1 May 2023 18:28:39 +0100 From: Conor Dooley To: Ricardo Ribalda Cc: Nick Desaulniers , Eric Biederman , Philipp Rudo , Dave Young , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Nathan Chancellor , Tom Rix , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Baoquan He , Philipp Rudo , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Ross Zwisler , Steven Rostedt , Simon Horman , llvm@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, stable@vger.kernel.org Subject: Re: [PATCH v6 4/4] risc/purgatory: Add linker script Message-ID: <20230501-griminess-defiling-73b367bb2e47@spud> References: <20230321-kexec_clang16-v6-0-a2255e81ab45@chromium.org> <20230321-kexec_clang16-v6-4-a2255e81ab45@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2Xn+1gq4n0yNKfKi" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 --2Xn+1gq4n0yNKfKi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 01, 2023 at 07:18:12PM +0200, Ricardo Ribalda wrote: > On Mon, 1 May 2023 at 18:19, Nick Desaulniers w= rote: > > > > On Mon, May 1, 2023 at 5:39=E2=80=AFAM Ricardo Ribalda wrote: > > > > > > If PGO is enabled, the purgatory ends up with multiple .text sections. > > > This is not supported by kexec and crashes the system. > > > > > > Cc: stable@vger.kernel.org > > > Fixes: 930457057abe ("kernel/kexec_file.c: split up __kexec_load_pura= gory") > > > Signed-off-by: Ricardo Ribalda > > > > Hi Ricardo, > > Thanks for the series. Does this patch 4/4 need a new online commit > > description? It's not adding a linker script (maybe an earlier version > > was). > Thanks for catching this. It should have said >=20 > risc/purgatory: Remove profile optimization flags ^^ Perhaps with the omitted v added too? Also while playing the $subject nitpicking game, is it not called "profile**-guided** optimisation" (and ditto in the comments)? Cheers, Conor. > Will fix it on my local branch in case there is a next version of the > series. Otherwise, please the maintainer fix the subject. > > > --- > > > arch/riscv/purgatory/Makefile | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > diff --git a/arch/riscv/purgatory/Makefile b/arch/riscv/purgatory/Mak= efile > > > index 5730797a6b40..cf3a44121a90 100644 > > > --- a/arch/riscv/purgatory/Makefile > > > +++ b/arch/riscv/purgatory/Makefile > > > @@ -35,6 +35,11 @@ CFLAGS_sha256.o :=3D -D__DISABLE_EXPORTS > > > CFLAGS_string.o :=3D -D__DISABLE_EXPORTS > > > CFLAGS_ctype.o :=3D -D__DISABLE_EXPORTS > > > > > > +# When profile optimization is enabled, llvm emits two different ove= rlapping > > > +# text sections, which is not supported by kexec. Remove profile opt= imization > > > +# flags. > > > +KBUILD_CFLAGS :=3D $(filter-out -fprofile-sample-use=3D% -fprofile-u= se=3D%,$(KBUILD_CFLAGS)) > > > + > > > # When linking purgatory.ro with -r unresolved symbols are not check= ed, > > > # also link a purgatory.chk binary without -r to check for unresolve= d symbols. > > > PURGATORY_LDFLAGS :=3D -e purgatory_start -z nodefaultlib > > > > > > -- > > > 2.40.1.495.gc816e09b53d-goog > > > > > > > > > -- > > Thanks, > > ~Nick Desaulniers >=20 >=20 >=20 > --=20 > Ricardo Ribalda >=20 > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv --2Xn+1gq4n0yNKfKi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZE/2xwAKCRB4tDGHoIJi 0rKBAQC575nyVFklI17PZfvU+SuYFxAB+RFJK8A1hHd9GS1RpgEAgPt5XR7pInY2 HkHrcK2WfBr+2guYsn7t0z1AycqRdw4= =tPhM -----END PGP SIGNATURE----- --2Xn+1gq4n0yNKfKi--