Thread (31 messages) 31 messages, 3 authors, 11d ago

Re: [PATCH 07/16] efi/zboot: Lift efi_cache_sync_image() from efi_zboot_decompress()

flat view

From: Jonathan Cameron <hidden>
Date: 2026-09-24 22:57:29
Also in: linux-arch, linux-doc, linux-efi, linux-integrity, linux-patches, linux-riscv

On Thu, 24 Sep 2026 10:53:10 -0300
Jason Gunthorpe [off-list ref] wrote:
The two decompressors duplicate this call and the next patch needs to
change the argument. Hoist it up to remove the duplication.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
quoted hunk ↗ jump to hunk
diff --git a/drivers/firmware/efi/libstub/zboot.c b/drivers/firmware/efi/libstub/zboot.c
index 4b76f74c56dae0..960a542881d875 100644
--- a/drivers/firmware/efi/libstub/zboot.c
+++ b/drivers/firmware/efi/libstub/zboot.c
@@ -92,9 +92,12 @@ efi_zboot_entry(efi_handle_t handle, efi_system_table_t *systab)
 	}
 
 	// Decompress the payload into the newly allocated buffer
-	status = efi_zboot_decompress((void *)image_base, alloc_size) ?:
-	         efi_stub_common(handle, image, image_base, cmdline_ptr);
-
+	status = efi_zboot_decompress((void *)image_base, alloc_size);
+	if (status == EFI_SUCCESS) {
+		efi_cache_sync_image(image_base, alloc_size);
+		status =
+			efi_stub_common(handle, image, image_base, cmdline_ptr);
Just go one character longer!
quoted hunk ↗ jump to hunk
+	}
 	efi_free(alloc_size, image_base);
 	return status;
 }
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help