]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 14:21:12 +0000 (16:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 14:21:12 +0000 (16:21 +0200)
added patches:
random-only-call-boot_init_stack_canary-once.patch

queue-4.9/random-only-call-boot_init_stack_canary-once.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/random-only-call-boot_init_stack_canary-once.patch b/queue-4.9/random-only-call-boot_init_stack_canary-once.patch
new file mode 100644 (file)
index 0000000..62c05a2
--- /dev/null
@@ -0,0 +1,44 @@
+From hegtvedt@cisco.com  Wed Aug  3 16:20:33 2022
+From: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
+Date: Wed,  3 Aug 2022 16:01:51 +0200
+Subject: random: only call boot_init_stack_canary() once
+To: linux-kernel@vger.kernel.org
+Cc: gregkh@linuxfoundation.org, Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
+Message-ID: <20220803140151.687558-1-hegtvedt@cisco.com>
+
+From: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
+
+In commit 166a592cad36 ("random: move rand_initialize() earlier") the
+boot_init_stack_canary() call was added after the new random_init()
+call.
+
+However, the upstream commit d55535232c3d ("random: move
+rand_initialize() earlier") also included removing the earlier call to
+boot_init_stack_canary(), making sure this call is done after
+random_init().
+
+Hence fix what I assume is a wrong merge conflict resolution on the
+linux-4.9.y stable branch.
+
+Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ init/main.c |    7 -------
+ 1 file changed, 7 deletions(-)
+
+--- a/init/main.c
++++ b/init/main.c
+@@ -500,13 +500,6 @@ asmlinkage __visible void __init start_k
+       page_address_init();
+       pr_notice("%s", linux_banner);
+       setup_arch(&command_line);
+-      /*
+-       * Set up the the initial canary and entropy after arch
+-       * and after adding latent and command line entropy.
+-       */
+-      add_latent_entropy();
+-      add_device_randomness(command_line, strlen(command_line));
+-      boot_init_stack_canary();
+       mm_init_cpumask(&init_mm);
+       setup_command_line(command_line);
+       setup_nr_cpu_ids();
index e8edd880501115fc99410638e01f5efe68304909..fbfc3ad8c81d65bfe2e45a20e3f1b73eadd9fff4 100644 (file)
@@ -20,3 +20,4 @@ init-move-stack-canary-initialization-after-setup_arch.patch
 init-main.c-extract-early-boot-entropy-from-the-passed-cmdline.patch
 acpi-video-force-backlight-native-for-some-tongfang-devices.patch
 acpi-video-shortening-quirk-list-by-identifying-clevo-by-board_name-only.patch
+random-only-call-boot_init_stack_canary-once.patch