EFI fixes for v6.10 #2
- 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 -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCZmAmwwAKCRAwbglWLn0t XNbNAQDsnOTRK4Azr0rqHUvOoB2g+0XlIL9yR+r5MwV8lAdL+QD9GJpX7p7pzT4q aT4zzzoS1h9FFUNTDtE7by18bDBElgI= =RxkM -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
a34adf6010
|
@ -136,7 +136,7 @@ static int efi_pstore_read_func(struct pstore_record *record,
|
|||
&size, record->buf);
|
||||
if (status != EFI_SUCCESS) {
|
||||
kfree(record->buf);
|
||||
return -EIO;
|
||||
return efi_status_to_err(status);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -189,7 +189,7 @@ static ssize_t efi_pstore_read(struct pstore_record *record)
|
|||
return 0;
|
||||
|
||||
if (status != EFI_SUCCESS)
|
||||
return -EIO;
|
||||
return efi_status_to_err(status);
|
||||
|
||||
/* skip variables that don't concern us */
|
||||
if (efi_guidcmp(guid, LINUX_EFI_CRASH_GUID))
|
||||
|
@ -227,7 +227,7 @@ static int efi_pstore_write(struct pstore_record *record)
|
|||
record->size, record->psi->buf,
|
||||
true);
|
||||
efivar_unlock();
|
||||
return status == EFI_SUCCESS ? 0 : -EIO;
|
||||
return efi_status_to_err(status);
|
||||
};
|
||||
|
||||
static int efi_pstore_erase(struct pstore_record *record)
|
||||
|
@ -238,7 +238,7 @@ static int efi_pstore_erase(struct pstore_record *record)
|
|||
PSTORE_EFI_ATTRIBUTES, 0, NULL);
|
||||
|
||||
if (status != EFI_SUCCESS && status != EFI_NOT_FOUND)
|
||||
return -EIO;
|
||||
return efi_status_to_err(status);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
/DISCARD/ : {
|
||||
*(.discard .discard.*)
|
||||
*(.modinfo .init.modinfo)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -213,7 +213,7 @@ extern struct semaphore __efi_uv_runtime_lock __alias(efi_runtime_lock);
|
|||
* Calls the appropriate efi_runtime_service() with the appropriate
|
||||
* arguments.
|
||||
*/
|
||||
static void efi_call_rts(struct work_struct *work)
|
||||
static void __nocfi efi_call_rts(struct work_struct *work)
|
||||
{
|
||||
const union efi_rts_args *args = efi_rts_work.args;
|
||||
efi_status_t status = EFI_NOT_FOUND;
|
||||
|
@ -435,7 +435,7 @@ static efi_status_t virt_efi_set_variable(efi_char16_t *name,
|
|||
return status;
|
||||
}
|
||||
|
||||
static efi_status_t
|
||||
static efi_status_t __nocfi
|
||||
virt_efi_set_variable_nb(efi_char16_t *name, efi_guid_t *vendor, u32 attr,
|
||||
unsigned long data_size, void *data)
|
||||
{
|
||||
|
@ -469,7 +469,7 @@ static efi_status_t virt_efi_query_variable_info(u32 attr,
|
|||
return status;
|
||||
}
|
||||
|
||||
static efi_status_t
|
||||
static efi_status_t __nocfi
|
||||
virt_efi_query_variable_info_nb(u32 attr, u64 *storage_space,
|
||||
u64 *remaining_space, u64 *max_variable_size)
|
||||
{
|
||||
|
@ -499,10 +499,9 @@ static efi_status_t virt_efi_get_next_high_mono_count(u32 *count)
|
|||
return status;
|
||||
}
|
||||
|
||||
static void virt_efi_reset_system(int reset_type,
|
||||
efi_status_t status,
|
||||
unsigned long data_size,
|
||||
efi_char16_t *data)
|
||||
static void __nocfi
|
||||
virt_efi_reset_system(int reset_type, efi_status_t status,
|
||||
unsigned long data_size, efi_char16_t *data)
|
||||
{
|
||||
if (down_trylock(&efi_runtime_lock)) {
|
||||
pr_warn("failed to invoke the reset_system() runtime service:\n"
|
||||
|
|
Loading…
Reference in New Issue