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-fixes-for-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI fixes from Ard Biesheuvel:

- Ensure that .discard sections are really discarded in the EFI zboot
image build

- Return proper error numbers from efi-pstore

- Add __nocfi annotations to EFI runtime wrappers

* tag 'efi-fixes-for-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
efi: Add missing __nocfi annotations to runtime wrappers
efi: pstore: Return proper errors on UEFI failures
efi/libstub: zboot.lds: Discard .discard sections

+11 -11
+4 -4
drivers/firmware/efi/efi-pstore.c
··· 136 136 &size, record->buf); 137 137 if (status != EFI_SUCCESS) { 138 138 kfree(record->buf); 139 - return -EIO; 139 + return efi_status_to_err(status); 140 140 } 141 141 142 142 /* ··· 189 189 return 0; 190 190 191 191 if (status != EFI_SUCCESS) 192 - return -EIO; 192 + return efi_status_to_err(status); 193 193 194 194 /* skip variables that don't concern us */ 195 195 if (efi_guidcmp(guid, LINUX_EFI_CRASH_GUID)) ··· 227 227 record->size, record->psi->buf, 228 228 true); 229 229 efivar_unlock(); 230 - return status == EFI_SUCCESS ? 0 : -EIO; 230 + return efi_status_to_err(status); 231 231 }; 232 232 233 233 static int efi_pstore_erase(struct pstore_record *record) ··· 238 238 PSTORE_EFI_ATTRIBUTES, 0, NULL); 239 239 240 240 if (status != EFI_SUCCESS && status != EFI_NOT_FOUND) 241 - return -EIO; 241 + return efi_status_to_err(status); 242 242 return 0; 243 243 } 244 244
+1
drivers/firmware/efi/libstub/zboot.lds
··· 41 41 } 42 42 43 43 /DISCARD/ : { 44 + *(.discard .discard.*) 44 45 *(.modinfo .init.modinfo) 45 46 } 46 47 }
+6 -7
drivers/firmware/efi/runtime-wrappers.c
··· 213 213 * Calls the appropriate efi_runtime_service() with the appropriate 214 214 * arguments. 215 215 */ 216 - static void efi_call_rts(struct work_struct *work) 216 + static void __nocfi efi_call_rts(struct work_struct *work) 217 217 { 218 218 const union efi_rts_args *args = efi_rts_work.args; 219 219 efi_status_t status = EFI_NOT_FOUND; ··· 435 435 return status; 436 436 } 437 437 438 - static efi_status_t 438 + static efi_status_t __nocfi 439 439 virt_efi_set_variable_nb(efi_char16_t *name, efi_guid_t *vendor, u32 attr, 440 440 unsigned long data_size, void *data) 441 441 { ··· 469 469 return status; 470 470 } 471 471 472 - static efi_status_t 472 + static efi_status_t __nocfi 473 473 virt_efi_query_variable_info_nb(u32 attr, u64 *storage_space, 474 474 u64 *remaining_space, u64 *max_variable_size) 475 475 { ··· 499 499 return status; 500 500 } 501 501 502 - static void virt_efi_reset_system(int reset_type, 503 - efi_status_t status, 504 - unsigned long data_size, 505 - efi_char16_t *data) 502 + static void __nocfi 503 + virt_efi_reset_system(int reset_type, efi_status_t status, 504 + unsigned long data_size, efi_char16_t *data) 506 505 { 507 506 if (down_trylock(&efi_runtime_lock)) { 508 507 pr_warn("failed to invoke the reset_system() runtime service:\n"