]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Oct 2022 06:57:55 +0000 (08:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Oct 2022 06:57:55 +0000 (08:57 +0200)
added patches:
efi-libstub-drop-pointless-get_memory_map-call.patch

queue-4.19/efi-libstub-drop-pointless-get_memory_map-call.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/efi-libstub-drop-pointless-get_memory_map-call.patch b/queue-4.19/efi-libstub-drop-pointless-get_memory_map-call.patch
new file mode 100644 (file)
index 0000000..d2f10fe
--- /dev/null
@@ -0,0 +1,37 @@
+From d80ca810f096ff66f451e7a3ed2f0cd9ef1ff519 Mon Sep 17 00:00:00 2001
+From: Ard Biesheuvel <ardb@kernel.org>
+Date: Thu, 15 Sep 2022 19:00:24 +0200
+Subject: efi: libstub: drop pointless get_memory_map() call
+
+From: Ard Biesheuvel <ardb@kernel.org>
+
+commit d80ca810f096ff66f451e7a3ed2f0cd9ef1ff519 upstream.
+
+Currently, the non-x86 stub code calls get_memory_map() redundantly,
+given that the data it returns is never used anywhere. So drop the call.
+
+Cc: <stable@vger.kernel.org> # v4.14+
+Fixes: 24d7c494ce46 ("efi/arm-stub: Round up FDT allocation to mapping size")
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/firmware/efi/libstub/fdt.c |    8 --------
+ 1 file changed, 8 deletions(-)
+
+--- a/drivers/firmware/efi/libstub/fdt.c
++++ b/drivers/firmware/efi/libstub/fdt.c
+@@ -301,14 +301,6 @@ efi_status_t allocate_new_fdt_and_exit_b
+               goto fail;
+       }
+-      /*
+-       * Now that we have done our final memory allocation (and free)
+-       * we can get the memory map key needed for exit_boot_services().
+-       */
+-      status = efi_get_memory_map(sys_table, &map);
+-      if (status != EFI_SUCCESS)
+-              goto fail_free_new_fdt;
+-
+       status = update_fdt(sys_table, (void *)fdt_addr, fdt_size,
+                           (void *)*new_fdt_addr, MAX_FDT_SIZE, cmdline_ptr,
+                           initrd_addr, initrd_size);
index 9e397519de5fffa540be7e812d8166339c22c5dc..7092370e2c03b964cd613b1b1e441ee851b7e283 100644 (file)
@@ -235,3 +235,4 @@ net-ieee802154-return-einval-for-unknown-addr-type.patch
 net-ieee802154-don-t-warn-zero-sized-raw_sendmsg.patch
 ext4-continue-to-expand-file-system-when-the-target-size-doesn-t-reach.patch
 md-replace-snprintf-with-scnprintf.patch
+efi-libstub-drop-pointless-get_memory_map-call.patch