Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'efi-urgent-2021-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull EFI fixes from Ingo Molnar:

- another missing RT_PROP table related fix, to ensure that the
efivarfs pseudo filesystem fails gracefully if variable services
are unsupported

- use the correct alignment for literal EFI GUIDs

- fix a use after unmap issue in the memreserve code

* tag 'efi-urgent-2021-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
efi: use 32-bit alignment for efi_guid_t literals
firmware/efi: Fix a use after bug in efi_mem_reserve_persistent
efivars: respect EFI_UNSUPPORTED return from firmware

+10 -3
+2 -1
drivers/firmware/efi/efi.c
··· 927 927 } 928 928 929 929 /* first try to find a slot in an existing linked list entry */ 930 - for (prsv = efi_memreserve_root->next; prsv; prsv = rsv->next) { 930 + for (prsv = efi_memreserve_root->next; prsv; ) { 931 931 rsv = memremap(prsv, sizeof(*rsv), MEMREMAP_WB); 932 932 index = atomic_fetch_add_unless(&rsv->count, 1, rsv->size); 933 933 if (index < rsv->size) { ··· 937 937 memunmap(rsv); 938 938 return efi_mem_reserve_iomem(addr, size); 939 939 } 940 + prsv = rsv->next; 940 941 memunmap(rsv); 941 942 } 942 943
+4
drivers/firmware/efi/vars.c
··· 485 485 } 486 486 487 487 break; 488 + case EFI_UNSUPPORTED: 489 + err = -EOPNOTSUPP; 490 + status = EFI_NOT_FOUND; 491 + break; 488 492 case EFI_NOT_FOUND: 489 493 break; 490 494 default:
+4 -2
include/linux/efi.h
··· 72 72 */ 73 73 typedef guid_t efi_guid_t __aligned(__alignof__(u32)); 74 74 75 - #define EFI_GUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ 76 - GUID_INIT(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) 75 + #define EFI_GUID(a, b, c, d...) (efi_guid_t){ { \ 76 + (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ 77 + (b) & 0xff, ((b) >> 8) & 0xff, \ 78 + (c) & 0xff, ((c) >> 8) & 0xff, d } } 77 79 78 80 /* 79 81 * Generic EFI table header