* FAILED: patch "[PATCH] x86/purgatory: remove PGO flags" failed to apply to 4.19-stable tree
@ 2023-06-17 8:13 gregkh
2023-06-19 11:38 ` [PATCH 4.19.y] x86/purgatory: remove PGO flags Ricardo Ribalda
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2023-06-17 8:13 UTC (permalink / raw)
To: ribalda, akpm, aou, bhe, bp, christophe.leroy, dave.hansen,
dyoung, ebiederm, horms, hpa, mingo, mpe, nathan, ndesaulniers,
npiggin, palmer, palmer, paul.walmsley, prudo, rostedt, stable,
tglx, trix, zwisler
Cc: stable
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.19.y
git checkout FETCH_HEAD
git cherry-pick -x 97b6b9cbba40a21c1d9a344d5c1991f8cfbf136e
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2023061700-surplus-art-1fef@gregkh' --subject-prefix 'PATCH 4.19.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 97b6b9cbba40a21c1d9a344d5c1991f8cfbf136e Mon Sep 17 00:00:00 2001
From: Ricardo Ribalda <ribalda@chromium.org>
Date: Fri, 19 May 2023 16:47:37 +0200
Subject: [PATCH] x86/purgatory: remove PGO flags
If profile-guided optimization is enabled, the purgatory ends up with
multiple .text sections. This is not supported by kexec and crashes the
system.
Link: https://lkml.kernel.org/r/20230321-kexec_clang16-v7-2-b05c520b7296@chromium.org
Fixes: 930457057abe ("kernel/kexec_file.c: split up __kexec_load_puragory")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Cc: <stable@vger.kernel.org>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Baoquan He <bhe@redhat.com>
Cc: Borislav Petkov (AMD) <bp@alien8.de>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Philipp Rudo <prudo@redhat.com>
Cc: Ross Zwisler <zwisler@google.com>
Cc: Simon Horman <horms@kernel.org>
Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Rix <trix@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
index 82fec66d46d2..42abd6af1198 100644
--- a/arch/x86/purgatory/Makefile
+++ b/arch/x86/purgatory/Makefile
@@ -14,6 +14,11 @@ $(obj)/sha256.o: $(srctree)/lib/crypto/sha256.c FORCE
CFLAGS_sha256.o := -D__DISABLE_EXPORTS
+# When profile-guided optimization is enabled, llvm emits two different
+# overlapping text sections, which is not supported by kexec. Remove profile
+# optimization flags.
+KBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%,$(KBUILD_CFLAGS))
+
# When linking purgatory.ro with -r unresolved symbols are not checked,
# also link a purgatory.chk binary without -r to check for unresolved symbols.
PURGATORY_LDFLAGS := -e purgatory_start -z nodefaultlib
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 4.19.y] x86/purgatory: remove PGO flags
2023-06-17 8:13 FAILED: patch "[PATCH] x86/purgatory: remove PGO flags" failed to apply to 4.19-stable tree gregkh
@ 2023-06-19 11:38 ` Ricardo Ribalda
2023-06-21 18:36 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Ribalda @ 2023-06-19 11:38 UTC (permalink / raw)
To: stable
Cc: Ricardo Ribalda, Albert Ou, Baoquan He, Borislav Petkov,
Christophe Leroy, Dave Hansen, Dave Young, Eric W . Biederman,
H. Peter Anvin, Ingo Molnar, Michael Ellerman, Nathan Chancellor,
Nicholas Piggin, Nick Desaulniers, Palmer Dabbelt, Palmer Dabbelt,
Paul Walmsley, Philipp Rudo, Ross Zwisler, Simon Horman,
Steven Rostedt, Thomas Gleixner, Tom Rix, Andrew Morton
If profile-guided optimization is enabled, the purgatory ends up with
multiple .text sections. This is not supported by kexec and crashes the
system.
Link: https://lkml.kernel.org/r/20230321-kexec_clang16-v7-2-b05c520b7296@chromium.org
Fixes: 930457057abe ("kernel/kexec_file.c: split up __kexec_load_puragory")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Cc: <stable@vger.kernel.org>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Baoquan He <bhe@redhat.com>
Cc: Borislav Petkov (AMD) <bp@alien8.de>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Philipp Rudo <prudo@redhat.com>
Cc: Ross Zwisler <zwisler@google.com>
Cc: Simon Horman <horms@kernel.org>
Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Rix <trix@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 97b6b9cbba40a21c1d9a344d5c1991f8cfbf136e)
Signed-off-by: Ricardo Ribalda Delgado <ribalda@chromium.org>
---
arch/x86/purgatory/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
index 002f7a01af11..00f104e341e5 100644
--- a/arch/x86/purgatory/Makefile
+++ b/arch/x86/purgatory/Makefile
@@ -12,6 +12,11 @@ $(obj)/string.o: $(srctree)/arch/x86/boot/compressed/string.c FORCE
$(obj)/sha256.o: $(srctree)/lib/sha256.c FORCE
$(call if_changed_rule,cc_o_c)
+# When profile-guided optimization is enabled, llvm emits two different
+# overlapping text sections, which is not supported by kexec. Remove profile
+# optimization flags.
+KBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%,$(KBUILD_CFLAGS))
+
LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined -nostdlib -z nodefaultlib
targets += purgatory.ro
--
2.41.0.162.gfafddb0af9-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 4.19.y] x86/purgatory: remove PGO flags
2023-06-19 11:38 ` [PATCH 4.19.y] x86/purgatory: remove PGO flags Ricardo Ribalda
@ 2023-06-21 18:36 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2023-06-21 18:36 UTC (permalink / raw)
To: Ricardo Ribalda
Cc: stable, Albert Ou, Baoquan He, Borislav Petkov, Christophe Leroy,
Dave Hansen, Dave Young, Eric W . Biederman, H. Peter Anvin,
Ingo Molnar, Michael Ellerman, Nathan Chancellor, Nicholas Piggin,
Nick Desaulniers, Palmer Dabbelt, Palmer Dabbelt, Paul Walmsley,
Philipp Rudo, Ross Zwisler, Simon Horman, Steven Rostedt,
Thomas Gleixner, Tom Rix, Andrew Morton
On Mon, Jun 19, 2023 at 01:38:06PM +0200, Ricardo Ribalda wrote:
> If profile-guided optimization is enabled, the purgatory ends up with
> multiple .text sections. This is not supported by kexec and crashes the
> system.
>
> Link: https://lkml.kernel.org/r/20230321-kexec_clang16-v7-2-b05c520b7296@chromium.org
> Fixes: 930457057abe ("kernel/kexec_file.c: split up __kexec_load_puragory")
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
> Cc: <stable@vger.kernel.org>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> Cc: Baoquan He <bhe@redhat.com>
> Cc: Borislav Petkov (AMD) <bp@alien8.de>
> Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Dave Young <dyoung@redhat.com>
> Cc: Eric W. Biederman <ebiederm@xmission.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: Nick Desaulniers <ndesaulniers@google.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Palmer Dabbelt <palmer@rivosinc.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Philipp Rudo <prudo@redhat.com>
> Cc: Ross Zwisler <zwisler@google.com>
> Cc: Simon Horman <horms@kernel.org>
> Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Tom Rix <trix@redhat.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> (cherry picked from commit 97b6b9cbba40a21c1d9a344d5c1991f8cfbf136e)
> Signed-off-by: Ricardo Ribalda Delgado <ribalda@chromium.org>
> ---
> arch/x86/purgatory/Makefile | 5 +++++
> 1 file changed, 5 insertions(+)
>
Now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-21 18:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-17 8:13 FAILED: patch "[PATCH] x86/purgatory: remove PGO flags" failed to apply to 4.19-stable tree gregkh
2023-06-19 11:38 ` [PATCH 4.19.y] x86/purgatory: remove PGO flags Ricardo Ribalda
2023-06-21 18:36 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).