Re: [PATCH 3/6] efi/libstub: Introduce ExitBootServices helper

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

 



* Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx> wrote:

> From: Jeffrey Hugo <jhugo@xxxxxxxxxxxxxx>
> 
> The spec allows ExitBootServices to fail with EFI_INVALID_PARAMETER if a
> race condition has occurred where the EFI has updated the memory map after
> the stub grabbed a reference to the map.  The spec defines a retry
> proceedure with specific requirements to handle this scenario.
> 
> This scenario was previously observed on x86 - commit d3768d885c6c ("x86,
> efi: retry ExitBootServices() on failure") but the current fix is not spec
> compliant and the scenario is now observed on the Qualcomm Technologies
> QDF2432 via the FDT stub which does not handle the error and thus causes
> boot failures.

It's unclear what this 'scenario' is. How does the user notice?

> Add a helper to the stub library that correctly adhears to the spec in the
> case of EFI_INVALID_PARAMETER from ExitBootServices and can be universally
> used across all stub implementations.

s/'adheres to'

> +		status = efi_call_early(exit_boot_services, handle,
> +					*map->key_ptr);

Please don't add spurious linebreaks in such a case - just keep it a bit longer 
than col80.

> +	if (status != EFI_SUCCESS)
> +		/* exit_boot_services() was called, thus cannot free*/
> +		goto fail;

Non-standard comment format and comment placement.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]