From: Greg Kroah-Hartman Date: Mon, 20 Jun 2022 12:26:53 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v5.4.200~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c1854d06089dc5a494bc2b75ab0d6e8d4b82a59;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: powerpc-book3e-get-rid-of-include-generated-compile.h.patch --- diff --git a/queue-5.10/powerpc-book3e-get-rid-of-include-generated-compile.h.patch b/queue-5.10/powerpc-book3e-get-rid-of-include-generated-compile.h.patch new file mode 100644 index 00000000000..0731ff2d278 --- /dev/null +++ b/queue-5.10/powerpc-book3e-get-rid-of-include-generated-compile.h.patch @@ -0,0 +1,68 @@ +From 7ad4bd887d27c6b6ffbef216f19c19f8fe2b8f52 Mon Sep 17 00:00:00 2001 +From: Masahiro Yamada +Date: Sat, 4 Jun 2022 17:50:50 +0900 +Subject: powerpc/book3e: get rid of #include + +From: Masahiro Yamada + +commit 7ad4bd887d27c6b6ffbef216f19c19f8fe2b8f52 upstream. + +You cannot include here because it is generated +in init/Makefile but there is no guarantee that it happens before +arch/powerpc/mm/nohash/kaslr_booke.c is compiled for parallel builds. + +The places where you can reliably include are: + + - init/ (because init/Makefile can specify the dependency) + - arch/*/boot/ (because it is compiled after vmlinux) + +Commit f231e4333312 ("hexagon: get rid of #include ") +fixed the last breakage at that time, but powerpc re-added this. + + was unneeded because 'build_str' is almost the +same as 'linux_banner' defined in init/version.c + +Let's copy the solution from MIPS. +(get_random_boot() in arch/mips/kernel/relocate.c) + +Fixes: 6a38ea1d7b94 ("powerpc/fsl_booke/32: randomize the kernel image offset") +Signed-off-by: Masahiro Yamada +Acked-by: Scott Wood +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20220604085050.4078927-1-masahiroy@kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + arch/powerpc/mm/nohash/kaslr_booke.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +--- a/arch/powerpc/mm/nohash/kaslr_booke.c ++++ b/arch/powerpc/mm/nohash/kaslr_booke.c +@@ -18,7 +18,6 @@ + #include + #include + #include +-#include + #include + + struct regions { +@@ -36,10 +35,6 @@ struct regions { + int reserved_mem_size_cells; + }; + +-/* Simplified build-specific string for starting entropy. */ +-static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@" +- LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION; +- + struct regions __initdata regions; + + static __init void kaslr_get_cmdline(void *fdt) +@@ -72,7 +67,8 @@ static unsigned long __init get_boot_see + { + unsigned long hash = 0; + +- hash = rotate_xor(hash, build_str, sizeof(build_str)); ++ /* build-specific string for starting entropy. */ ++ hash = rotate_xor(hash, linux_banner, strlen(linux_banner)); + hash = rotate_xor(hash, fdt, fdt_totalsize(fdt)); + + return hash; diff --git a/queue-5.10/series b/queue-5.10/series index 6de0b21624b..3c1105ebbd8 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -80,3 +80,4 @@ net-sched-act_police-more-accurate-mtu-policing.patch net-openvswitch-fix-misuse-of-the-cached-connection-on-tuple-changes.patch revert-pci-make-pci_enable_ptm-private.patch igc-enable-pcie-ptm.patch +powerpc-book3e-get-rid-of-include-generated-compile.h.patch