Patch "efi/libstub: Cast away type warning in use of max()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.1-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.1 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
@@ -119,7 +119,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.1/x86-coco-export-cc_vendor.patch
queue-6.1/efi-libstub-cast-away-type-warning-in-use-of-max.patch
queue-6.1/x86-kconfig-remove-config_amd_mem_encrypt_active_by_default.patch
queue-6.1/efi-fix-panic-in-kdump-kernel.patch
queue-6.1/init-kconfig-lower-gcc-version-check-for-warray-bounds.patch
queue-6.1/x86-efistub-add-missing-boot_params-for-mixed-mode-compat-entry.patch
queue-6.1/x86-sev-fix-position-dependent-variable-references-in-startup-code.patch
queue-6.1/efi-libstub-fix-efi_random_alloc-to-allocate-memory-.patch
queue-6.1/x86-coco-get-rid-of-accessor-functions.patch
queue-6.1/x86-efistub-call-mixed-mode-boot-services-on-the-firmware-s-stack.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux