This is a note to let you know that I've just added the patch titled efi/libstub: Cast away type warning in use of max() to the 6.7-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: efi-libstub-cast-away-type-warning-in-use-of-max.patch and it can be found in the queue-6.7 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 61d130f261a3c15ae2c4b6f3ac3517d5d5b78855 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel <ardb@xxxxxxxxxx> Date: Tue, 26 Mar 2024 11:15:25 +0100 Subject: efi/libstub: Cast away type warning in use of max() From: Ard Biesheuvel <ardb@xxxxxxxxxx> commit 61d130f261a3c15ae2c4b6f3ac3517d5d5b78855 upstream. Avoid a type mismatch warning in max() by switching to max_t() and providing the type explicitly. Fixes: 3cb4a4827596abc82e ("efi/libstub: fix efi_random_alloc() ...") Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/firmware/efi/libstub/randomalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/firmware/efi/libstub/randomalloc.c +++ b/drivers/firmware/efi/libstub/randomalloc.c @@ -120,7 +120,7 @@ efi_status_t efi_random_alloc(unsigned l continue; } - target = round_up(max(md->phys_addr, alloc_min), align) + target_slot * align; + target = round_up(max_t(u64, md->phys_addr, alloc_min), align) + target_slot * align; pages = size / EFI_PAGE_SIZE; status = efi_bs_call(allocate_pages, EFI_ALLOCATE_ADDRESS, Patches currently in stable-queue which might be from ardb@xxxxxxxxxx are queue-6.7/x86-efistub-reinstate-soft-limit-for-initrd-loading.patch queue-6.7/efi-libstub-cast-away-type-warning-in-use-of-max.patch queue-6.7/x86-kconfig-remove-config_amd_mem_encrypt_active_by_default.patch queue-6.7/efi-fix-panic-in-kdump-kernel.patch queue-6.7/init-kconfig-lower-gcc-version-check-for-warray-bounds.patch queue-6.7/x86-efistub-add-missing-boot_params-for-mixed-mode-compat-entry.patch queue-6.7/arm-9352-1-iwmmxt-remove-support-for-pj4-pj4b-cores.patch queue-6.7/x86-sev-fix-position-dependent-variable-references-in-startup-code.patch queue-6.7/efi-libstub-fix-efi_random_alloc-to-allocate-memory-.patch queue-6.7/x86-efistub-call-mixed-mode-boot-services-on-the-firmware-s-stack.patch