Patch "x86/purgatory: remove PGO flags" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    x86/purgatory: remove PGO flags

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-purgatory-remove-pgo-flags.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5a54fd54f9738e184364b5467ebd072bc48f4ab0
Author: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
Date:   Fri May 19 16:47:37 2023 +0200

    x86/purgatory: remove PGO flags
    
    [ Upstream commit 97b6b9cbba40a21c1d9a344d5c1991f8cfbf136e ]
    
    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@xxxxxxxxxxxx
    Fixes: 930457057abe ("kernel/kexec_file.c: split up __kexec_load_puragory")
    Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
    Cc: <stable@xxxxxxxxxxxxxxx>
    Cc: Albert Ou <aou@xxxxxxxxxxxxxxxxx>
    Cc: Baoquan He <bhe@xxxxxxxxxx>
    Cc: Borislav Petkov (AMD) <bp@xxxxxxxxx>
    Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
    Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
    Cc: Dave Young <dyoung@xxxxxxxxxx>
    Cc: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
    Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
    Cc: Ingo Molnar <mingo@xxxxxxxxxx>
    Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Cc: Nathan Chancellor <nathan@xxxxxxxxxx>
    Cc: Nicholas Piggin <npiggin@xxxxxxxxx>
    Cc: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
    Cc: Palmer Dabbelt <palmer@xxxxxxxxxxx>
    Cc: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
    Cc: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
    Cc: Philipp Rudo <prudo@xxxxxxxxxx>
    Cc: Ross Zwisler <zwisler@xxxxxxxxxx>
    Cc: Simon Horman <horms@xxxxxxxxxx>
    Cc: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
    Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
    Cc: Tom Rix <trix@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
index d0f628601d47a..4db1940f81081 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 -nostdlib -z nodefaultlib



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux