mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 01:09:38 -05:00
EFI fixes for v5.15
Low priority fixes but fixes nonetheless: - update stub diagnostic print that is no longer accurate - avoid statically allocated buffer for CPER error record decoding - avoid sleeping on the efi_runtime semaphore when calling the ResetSystem EFI runtime service -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEE+9lifEBpyUIVN1cpw08iOZLZjyQFAmFoF6QACgkQw08iOZLZ jyQgrgv8DBU0nIiCGcWBC8WJaODZau4ife6kspD3rAmk7xMsjNcTSZ2QXooIXFbM iChzZvwrJaWCa1HyclBSjVix9IWE1zwU/sfacvbbpooxCA00/UGyboK0uKPgahPF Gy3pRcRK36mfVO14kWd5lSKD71mGS+VhMqL+Dvz9MxRCwTzanLafGb+QVuSIz2zX iHSqsUCrOIIMqOZJHB9U3vZdBEnT2xlFirm+KM4DINoxcdo0EZ/aAtnUS/hlXLl8 eWec1nSGPwmCz6Ud10WU+CbQDCT3cFB3NJd9F0lKx5nwWNRkDD/1y0Cq5KVcAFmx hsYfXOC/zyWMzBMwfeQYqCiVHWsfGjPH4HwE7hG2kloUfhzUfbHPSroDF6vpyXB/ f/K3Zj6ZJRA9V5NaZXaqgIRgpcSWasYLNwmzdNIyV4KuBwmjcjvzKP+mSYSXt7xy oo8gakoJ3qYCxpIsUOB7iCN8At+sDhuxRncg5RILrN7HXJyPIgAwJ7OVbaMAjRG2 TG58O/em =+LOo -----END PGP SIGNATURE----- Merge tag 'efi-urgent-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Borislav Petkov: "Forwarded from Ard Biesheuvel through the tip tree. Ard will send stuff directly in the near future. Low priority fixes but fixes nonetheless: - update stub diagnostic print that is no longer accurate - avoid statically allocated buffer for CPER error record decoding - avoid sleeping on the efi_runtime semaphore when calling the ResetSystem EFI runtime service" * tag 'efi-urgent-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock() efi/cper: use stack buffer for error record decoding efi/libstub: Simplify "Exiting bootservices" message
This commit is contained in:
commit
424e7d878c
3 changed files with 4 additions and 4 deletions
|
@ -25,8 +25,6 @@
|
||||||
#include <acpi/ghes.h>
|
#include <acpi/ghes.h>
|
||||||
#include <ras/ras_event.h>
|
#include <ras/ras_event.h>
|
||||||
|
|
||||||
static char rcd_decode_str[CPER_REC_LEN];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CPER record ID need to be unique even after reboot, because record
|
* CPER record ID need to be unique even after reboot, because record
|
||||||
* ID is used as index for ERST storage, while CPER records from
|
* ID is used as index for ERST storage, while CPER records from
|
||||||
|
@ -312,6 +310,7 @@ const char *cper_mem_err_unpack(struct trace_seq *p,
|
||||||
struct cper_mem_err_compact *cmem)
|
struct cper_mem_err_compact *cmem)
|
||||||
{
|
{
|
||||||
const char *ret = trace_seq_buffer_ptr(p);
|
const char *ret = trace_seq_buffer_ptr(p);
|
||||||
|
char rcd_decode_str[CPER_REC_LEN];
|
||||||
|
|
||||||
if (cper_mem_err_location(cmem, rcd_decode_str))
|
if (cper_mem_err_location(cmem, rcd_decode_str))
|
||||||
trace_seq_printf(p, "%s", rcd_decode_str);
|
trace_seq_printf(p, "%s", rcd_decode_str);
|
||||||
|
@ -326,6 +325,7 @@ static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem,
|
||||||
int len)
|
int len)
|
||||||
{
|
{
|
||||||
struct cper_mem_err_compact cmem;
|
struct cper_mem_err_compact cmem;
|
||||||
|
char rcd_decode_str[CPER_REC_LEN];
|
||||||
|
|
||||||
/* Don't trust UEFI 2.1/2.2 structure with bad validation bits */
|
/* Don't trust UEFI 2.1/2.2 structure with bad validation bits */
|
||||||
if (len == sizeof(struct cper_sec_mem_err_old) &&
|
if (len == sizeof(struct cper_sec_mem_err_old) &&
|
||||||
|
|
|
@ -271,7 +271,7 @@ efi_status_t allocate_new_fdt_and_exit_boot(void *handle,
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
efi_info("Exiting boot services and installing virtual address map...\n");
|
efi_info("Exiting boot services...\n");
|
||||||
|
|
||||||
map.map = &memory_map;
|
map.map = &memory_map;
|
||||||
status = efi_allocate_pages(MAX_FDT_SIZE, new_fdt_addr, ULONG_MAX);
|
status = efi_allocate_pages(MAX_FDT_SIZE, new_fdt_addr, ULONG_MAX);
|
||||||
|
|
|
@ -414,7 +414,7 @@ static void virt_efi_reset_system(int reset_type,
|
||||||
unsigned long data_size,
|
unsigned long data_size,
|
||||||
efi_char16_t *data)
|
efi_char16_t *data)
|
||||||
{
|
{
|
||||||
if (down_interruptible(&efi_runtime_lock)) {
|
if (down_trylock(&efi_runtime_lock)) {
|
||||||
pr_warn("failed to invoke the reset_system() runtime service:\n"
|
pr_warn("failed to invoke the reset_system() runtime service:\n"
|
||||||
"could not get exclusive access to the firmware\n");
|
"could not get exclusive access to the firmware\n");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue