From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6E2C567B for ; Mon, 1 May 2023 17:28:47 +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> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2Xn+1gq4n0yNKfKi" Content-Disposition: inline In-Reply-To: --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--